Problem configuring Tomcat with Spring Initializr

Using Idea Ultimate 14.1.5.

I create an new project using Spring Initializr.  During project creation I set the packaging to WAR, and I check Web on the dependencies screen.  After the project is created, I select Run -> Edit Configurations...  I then click + in the upper left to add a new configuration, and select Tomcat Server -> Local.  I get the "Warning: No artifacts configured" message.  I click the Fix button.  The Project Structure dialog appears.  I click Artifacts; but, there are no artifacts available.  Shouldn't I see both exploded and unexploded WAR artifacts?  I've tried creating a new "Web Application: Exploded"; but, when I run Tomcat, I get a message like: "$MY_PROJECT_PATH/out/artifacts/unnamed not found for the web module."  I see no place to change the path this artifact points to.

How do I fix this?

This is extremely frustrating.  I have had other time-consuming problems getting Tomcat working with Spring Boot/Tomcat applications in the recent past.  This should just work.

3 comments
Comment actions Permalink

If you create a Maven project during this process, you should import it first. After importing the generated Maven project all the artifacts should be created automatically.

0
Comment actions Permalink

I have not had to do this in the past.  How do I do this?

0
Comment actions Permalink

I noticed that the project did not have Maven support.  Went in to Add Framework Support, and checked Maven.  I then did a Maven -> Reimport, and this caused the .idea/artifacts XML files to be generated.  I could swear that, in the past, this was done automatically when creating a Srping Initializr application.  It would make sense for IntelliJ to do this since every Initializr project is also a Maven project.

Thanks, Serge.

0

Please sign in to leave a comment.