- This topic has 2 replies, 3 voices, and was last updated 10 years, 4 months ago by support-piotr.
-
AuthorPosts
-
rpuncelMemberI have a multi-module Maven setup, and all of the modules imported as projects in my MyEclipse workspace. I have checked the “Resolve dependencies from Workspace projects” box under project properties -> MyEclipse -> Maven4MyEclipse, but MyEclipse is still resolving all dependencies from my Maven repositories rather than workspace.
To test that this is actually not working, I took Project-A and Project-B, where Project-B depends on Project-A and both are 1) listed as modules in my aggregation pom and 2) are imported as projects in the workspace with the Maven nature enabled. I changed Project-A’s version from a 1.0.0-SNAPSHOT (which had been previously installed/deployed) to a 1.0.1-SNAPSHOT (which has never been installed or deployed). I then changed Project-B’s <version> tag for the Project-A artifact to 1.0.1-SNAPSHOT. On the command line, I verified that building both through the reactor (mvn -pl Project-A,Project-B) successfully resolves Project-A despite it not being in any repositories. However, running Project-B as Maven Compile job through MyEclipse fails to resolve.
What could be going wrong here? Is this a Maven4MyEclipse bug, or is there possibly some configuration in MyEclipse that I missed?
Thank you for your time.
support-swapnaModeratorrpuncel,
Thank you for raising it.
I have escalated it to the dev team for clarification on how the setting ‘Resolve dependencies from Workspace projects’ works. We will get back to you at the earliest.
Sorry for inconvenience caused.
support-piotrParticipantrpuncel,
Default behaviour of MyEclipse is to resolve dependencies from workspace. You need to import only the parent project through Import Maven Project wizard. The rest of modules should be automatically coonfigured and imported. When you expand “Maven Dependencies” container of your Maven java projects, you should see your Maven project/module dependencies listed there with a project icon instead of a jar icon. This means that projects are referenced from workspace. Running Maven compile will fail with missing dependencies, because this is a normal Maven process, which fails if you don’t use “-pl” parameter. You would have to run it on the root parent project and that wouldn’t prove anything. Let us know if you were able to confirm whether your projects are referenced from workspace. If not, please attach a document describing how you import the project and check if resolution happens accompanied by some screenshots.
-
AuthorPosts