[jira] (MEAR-107) Cannot generate Eclipse file with eclipse:eclipse when dependent projects are not installed in repository
[ https://jira.codehaus.org/browse/MEAR-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Scholte closed MEAR-107. --- Resolution: Not A Bug Assignee: Robert Scholte To be precise: this is not a bug of the maven-ear-plugin. When you call {{eclipse:eclipse}} the maven-ear-plugin is not used at all. It is actually the maven-eclipse-plugin which has issues with it. To confirm: there are several [integration-tests|http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-ear-plugin/src/it/] in subversion which are multi modules and succeed without {{install}}. > Cannot generate Eclipse file with eclipse:eclipse when dependent projects are > not installed in repository > - > > Key: MEAR-107 > URL: https://jira.codehaus.org/browse/MEAR-107 > Project: Maven Ear Plugin > Issue Type: Bug >Affects Versions: 2.3.2 >Reporter: Joost den Boer >Assignee: Robert Scholte > Attachments: MEAR-107-maven-ear-plugin-2.3.2.patch > > > In a multi module project, it is not possible to generate the Eclipse project > files of an Ear project when dependent projects are not installed in the > local repository. > This is caused by the GenerateApplicationXmlMojo which requires all > dependencies to be resolved before it is starten. The running of this mojo is > part of the Maven core lifecycle. Because of this bug it is also impossible > to build an ear package without installing all dependent projects in the > local repository first. > In our project we have a big multi module project. We chose not to checkin > all Eclipse project files (.project etc) in subversion. When a developer > checks out the project, he/she must be able to generate the Eclipse file > without having to compile, package and install all modules first. > It is very easy to reproduce this bug. Generate a new project using the > simple j2ee archetype and run eclipse:eclipse in the new project directory. > I created a patch for this bug. The solution is very easy. The > @requiresDependenciesResolution tag is removed from the > GenerateApplicationXmlMojo. In the AbstractEarMojo the dependencies are > resolved in the Mojo before the Ear Execution Context is created. For > dependency resolution I looked at how the Eclipse plugin and the Maven core > (for @requiresDependenciesResolution tags) implemented this. First the > dependencies are looked up in the local repository. The ear project should > only contain wars/jars of other modules and/or 3rd party libraries which are > used in those modules so it should not be necessary to download any > dependencies here. With this patch, the Ear plugin should work as it does > now. The new configuration property 'useProjectReferences' is default > 'false'. When set to 'true' in the Ear configuration, missing dependencies > are lookup in the reactor and added to the project artifacts list. > With this fix it is possible to generate application xml and create and ear > package without having to install the project modules . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MEAR-107) Cannot generate Eclipse file with eclipse:eclipse when dependent projects are not installed in repository
[ https://jira.codehaus.org/browse/MEAR-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304075#comment-304075 ] Alex Rau edited comment on MEAR-107 at 7/19/12 11:00 AM: - Seriously, can't believe this issue is still open. Any feedback on the provided patch ? Can we push this further ? Looks to me like a common use-case and the workaround (installing artifacts first) has always been smelly (I reported years ago exactly the same issue but with the site plugin). was (Author: rauar): Seriously, can't believe this issue is still open. Any feedback on the provided patch ? Can we push this further. Looks to me like a common use-case and the workaround (installing artifacts first) has always been smelly (I reported years ago exactly the same issue but with the site plugin). > Cannot generate Eclipse file with eclipse:eclipse when dependent projects are > not installed in repository > - > > Key: MEAR-107 > URL: https://jira.codehaus.org/browse/MEAR-107 > Project: Maven 2.x Ear Plugin > Issue Type: Bug >Affects Versions: 2.3.2 >Reporter: Joost den Boer > Attachments: MEAR-107-maven-ear-plugin-2.3.2.patch > > > In a multi module project, it is not possible to generate the Eclipse project > files of an Ear project when dependent projects are not installed in the > local repository. > This is caused by the GenerateApplicationXmlMojo which requires all > dependencies to be resolved before it is starten. The running of this mojo is > part of the Maven core lifecycle. Because of this bug it is also impossible > to build an ear package without installing all dependent projects in the > local repository first. > In our project we have a big multi module project. We chose not to checkin > all Eclipse project files (.project etc) in subversion. When a developer > checks out the project, he/she must be able to generate the Eclipse file > without having to compile, package and install all modules first. > It is very easy to reproduce this bug. Generate a new project using the > simple j2ee archetype and run eclipse:eclipse in the new project directory. > I created a patch for this bug. The solution is very easy. The > @requiresDependenciesResolution tag is removed from the > GenerateApplicationXmlMojo. In the AbstractEarMojo the dependencies are > resolved in the Mojo before the Ear Execution Context is created. For > dependency resolution I looked at how the Eclipse plugin and the Maven core > (for @requiresDependenciesResolution tags) implemented this. First the > dependencies are looked up in the local repository. The ear project should > only contain wars/jars of other modules and/or 3rd party libraries which are > used in those modules so it should not be necessary to download any > dependencies here. With this patch, the Ear plugin should work as it does > now. The new configuration property 'useProjectReferences' is default > 'false'. When set to 'true' in the Ear configuration, missing dependencies > are lookup in the reactor and added to the project artifacts list. > With this fix it is possible to generate application xml and create and ear > package without having to install the project modules . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MEAR-107) Cannot generate Eclipse file with eclipse:eclipse when dependent projects are not installed in repository
[ https://jira.codehaus.org/browse/MEAR-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304075#comment-304075 ] Alex Rau commented on MEAR-107: --- Seriously, can't believe this issue is still open. Any feedback on the provided patch ? Can we push this further. Looks to me like a common use-case and the workaround (installing artifacts first) has always been smelly (I reported years ago exactly the same issue but with the site plugin). > Cannot generate Eclipse file with eclipse:eclipse when dependent projects are > not installed in repository > - > > Key: MEAR-107 > URL: https://jira.codehaus.org/browse/MEAR-107 > Project: Maven 2.x Ear Plugin > Issue Type: Bug >Affects Versions: 2.3.2 >Reporter: Joost den Boer > Attachments: MEAR-107-maven-ear-plugin-2.3.2.patch > > > In a multi module project, it is not possible to generate the Eclipse project > files of an Ear project when dependent projects are not installed in the > local repository. > This is caused by the GenerateApplicationXmlMojo which requires all > dependencies to be resolved before it is starten. The running of this mojo is > part of the Maven core lifecycle. Because of this bug it is also impossible > to build an ear package without installing all dependent projects in the > local repository first. > In our project we have a big multi module project. We chose not to checkin > all Eclipse project files (.project etc) in subversion. When a developer > checks out the project, he/she must be able to generate the Eclipse file > without having to compile, package and install all modules first. > It is very easy to reproduce this bug. Generate a new project using the > simple j2ee archetype and run eclipse:eclipse in the new project directory. > I created a patch for this bug. The solution is very easy. The > @requiresDependenciesResolution tag is removed from the > GenerateApplicationXmlMojo. In the AbstractEarMojo the dependencies are > resolved in the Mojo before the Ear Execution Context is created. For > dependency resolution I looked at how the Eclipse plugin and the Maven core > (for @requiresDependenciesResolution tags) implemented this. First the > dependencies are looked up in the local repository. The ear project should > only contain wars/jars of other modules and/or 3rd party libraries which are > used in those modules so it should not be necessary to download any > dependencies here. With this patch, the Ear plugin should work as it does > now. The new configuration property 'useProjectReferences' is default > 'false'. When set to 'true' in the Ear configuration, missing dependencies > are lookup in the reactor and added to the project artifacts list. > With this fix it is possible to generate application xml and create and ear > package without having to install the project modules . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira