`Resolve Workspace artifacts` does not work

I am using IDEA 14.1.5, and I have a multiple module maven project, and the web module depend on the other jar module, the web module can not run as expected, the project can be found here:

https://github.com/keesvandieren/intellij-tomcat7-run-workspace-resolution

Then I found that I can use the `Resolve Workspace artifacts` in idea by google, however it does not work,I have taken the screenshot ,you can check the attachment.



Attachment(s):
12.gif
6 comments
Comment actions Permalink

This issue is not specific to IntelliJ IDEA, you will get the same error when running this goal from the command line Maven.

0
Comment actions Permalink

IDEA resolves the dependencies correctly and configures the artifact with your common module:

http://i.imgur.com/OAViKmJ.png
If you start Tomcat via the corresponding run/debug configuration and deploy this artifact, everything works:

http://i.imgur.com/YF08sID.png

http://i.imgur.com/eQjXr45.png

0
Comment actions Permalink

Do you mean that I can not use the `tomcat7-maven` plugin? And I have to use a local tomcat instance instead?

And I tried it following by your screenshot, and it works, once I modify the codes in the common module, and restart the server, refresh the page, I will see the new information.

But I found this post:

http://stackoverflow.com/questions/26213254/maven-tomcat7run-for-multi-module-project-in-intellij


Seems like idea can work with `tomcat7` plugin.

Is this possible? Since  we prefer to use the embeded tomcat.

0
Comment actions Permalink

The followign Maven configuration works without errors for me:

http://i.imgur.com/WnLecYR.png

It looks like you didn't add the Make Project step as instructed.

0
Comment actions Permalink

Fine, it works now, I forget to add the `Make Project` to the before dialog. :)

0
Comment actions Permalink

Now after I set the  `Resolve workspace artifacts`,

3333.png

the `war` module can resolve the `common` module without install the `common` module, however I found that it can not find the `Spring WebApplicationInitializer `.(I have not web.xml defined, use `WebApplicationInitializer` instead)


That's to say, once I run the following commands:

mvn clean install
mvn tomcat7:run

Spring can be intialized correctly.

333.png

While once I run the `mvn tomcat7:run` with the `Resolve workspace artifacts`, it logs: No Spring WebApplicationInitializer types detected on classpath

3.png

0

Please sign in to leave a comment.