You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From discussion at #1487, maven launchers seem to be only supported when rooted in the parent module. Launchers in the parent module that reference sub-modules are supported. Launchers in the sub-modules that reference other modules are not supported.
Note: I work with sibling-structure multi-modules only. I am not familiar with the more conventional situation where sub-modules are child folders of the parent module.
The attachment, maven_repo_example.zip, contains three eclipse projects. They should be unzipped "as is", i.e., as sibling folders, then imported into eclipse. The "maven_parent" project is the parent module. "child_1" and "child_2" are sub-module projects.
Run the "maven_parent/parent-compile-success.launch". It performs a "mvn compile" rooted in the maven_parent folder. "Resolve Workspace artifacts" is selected. The operation should succeed.
Run the "child_2/child-compile-failure.launch". It performs a "mvn compile" rooted in the child_2 folder."Resolve Workspace artifacts" is selected. The operation should fail with the following error:
Could not resolve dependencies for project com.groupid.child_2:child_2:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.groupid.child_1:child_1:jar:0.0.1-SNAPSHOT (absent): Could not find artifact com.groupid.child_1:child_1:jar:0.0.1-SNAPSHOT
Since a sub-module references its parent, and the parent references all sub-modules, all sibling modules should be locatable in principle. It is desirable that launchers rooted in the sub-module should be able to reference sibling modules.
This is particularly significant because this is how eclipse creates and stores its launchers. If a developer wants to run "mvn test" in a child-module, eclipse will store that launcher in the child-module and it will not work. Only when the same launcher is moved to the parent module (and the child module referenced0 will it work.
From discussion at #1487, maven launchers seem to be only supported when rooted in the parent module. Launchers in the parent module that reference sub-modules are supported. Launchers in the sub-modules that reference other modules are not supported.
Note: I work with sibling-structure multi-modules only. I am not familiar with the more conventional situation where sub-modules are child folders of the parent module.
The attachment, maven_repo_example.zip, contains three eclipse projects. They should be unzipped "as is", i.e., as sibling folders, then imported into eclipse. The "maven_parent" project is the parent module. "child_1" and "child_2" are sub-module projects.
Run the "maven_parent/parent-compile-success.launch". It performs a "mvn compile" rooted in the maven_parent folder. "Resolve Workspace artifacts" is selected. The operation should succeed.
Run the "child_2/child-compile-failure.launch". It performs a "mvn compile" rooted in the child_2 folder."Resolve Workspace artifacts" is selected. The operation should fail with the following error:
Could not resolve dependencies for project com.groupid.child_2:child_2:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.groupid.child_1:child_1:jar:0.0.1-SNAPSHOT (absent): Could not find artifact com.groupid.child_1:child_1:jar:0.0.1-SNAPSHOT
Since a sub-module references its parent, and the parent references all sub-modules, all sibling modules should be locatable in principle. It is desirable that launchers rooted in the sub-module should be able to reference sibling modules.
This is particularly significant because this is how eclipse creates and stores its launchers. If a developer wants to run "mvn test" in a child-module, eclipse will store that launcher in the child-module and it will not work. Only when the same launcher is moved to the parent module (and the child module referenced0 will it work.
maven_repo_example.zip
The text was updated successfully, but these errors were encountered: