Re: mvn eclipse plugin for multimodule proyect
Barrie and Roland, I discused with my boss about not doing this work as you explained to me in this thread. We finally decided not to include the instructions that copy eclipse and weblogic into pom.xml, but into a script sh that it is called from outside. The point was that our script is not part of maven life cycle. thanks a lot for your support. 2011/4/26 Barrie Treloar baerr...@gmail.com Its always helpful to be over-specific in emails. I'm having to make assumptions about your environment that are likely incorrect and so the advice is not as good as it could be. In your original email you say it doesn't create any. referring to eclipse project files (like .project, .classpath, etc) In Roland's reply he asks whether it creates the files. In your reply you say the files are not created. Do you mean .project, .classpath, etc are not created at all? Remember that mvn eclipse:eclipse just automates what you can do manually. Have you been able to manually import the projects into eclipse and setup their classpaths? In the fourth email, you reply with a bit more detail. You say that you have a separate pom.xml for constructing the developers environment. Roland's reply I presume that the POM you are using is *not* the one you call 'parent' in your structure As he rightly points out if it is not parent, then mvn eclipse:eclipse will be working with the wrong information. If you have moved the common configuration into a profile in the parent pom.xml then you may be ok. Are the projects (A, B, C) modules of parent? If they are not modules then mvn doesn't know about them, so neither will eclipse:eclipse. However thinking about this, I don't think maven dynamically load the pom.xml files, it think it reads them all at startup. So its possible that you can't do a checkout, which creates the modules, and then invoke eclipse:eclipse in a single invocation of mvn. You need to be aware of a bug (I dont have the jira for it) where multiple executions at the same phase do not have a defined ordering. Thus, when you have everything in you profile as phase=verify, you need to carefully watch the output to see that the execution.id printed out when maven is run is the order that you expect things to be in. It is very possible that your problem is that eclipse:eclipse is being run prior to checking anything out. The only way to fix this is to use different phases. I do wonder why you are trying to automate a task that is done infrequently. Once you have manually checked out the project you never need to do this again (you only do syncs). Reasons for checking out another instance of the project may include preparing for a release, or branch, or perhaps your workflow requires bugs to be worked on in separate workspaces. Once checked out you manually run eclipse:eclipse. Reasons for re-running eclipse:eclipse are because dependencies have changed (either the project has been released, something you depend upon has bug fixes and you want a different version, or new dependencies have been added). I think you would be better off including the step by step instructions in a readme.txt file, your wiki, or a batch file. Trying to do this in Maven doesn't feel like the right thing to do. Maven manages your build lifecycle and checkout and eclipse:eclipse are not part of that build lifecycle, they are steps prior to that. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: mvn eclipse plugin for multimodule proyect
Its always helpful to be over-specific in emails. I'm having to make assumptions about your environment that are likely incorrect and so the advice is not as good as it could be. In your original email you say it doesn't create any. referring to eclipse project files (like .project, .classpath, etc) In Roland's reply he asks whether it creates the files. In your reply you say the files are not created. Do you mean .project, .classpath, etc are not created at all? Remember that mvn eclipse:eclipse just automates what you can do manually. Have you been able to manually import the projects into eclipse and setup their classpaths? In the fourth email, you reply with a bit more detail. You say that you have a separate pom.xml for constructing the developers environment. Roland's reply I presume that the POM you are using is *not* the one you call 'parent' in your structure As he rightly points out if it is not parent, then mvn eclipse:eclipse will be working with the wrong information. If you have moved the common configuration into a profile in the parent pom.xml then you may be ok. Are the projects (A, B, C) modules of parent? If they are not modules then mvn doesn't know about them, so neither will eclipse:eclipse. However thinking about this, I don't think maven dynamically load the pom.xml files, it think it reads them all at startup. So its possible that you can't do a checkout, which creates the modules, and then invoke eclipse:eclipse in a single invocation of mvn. You need to be aware of a bug (I dont have the jira for it) where multiple executions at the same phase do not have a defined ordering. Thus, when you have everything in you profile as phase=verify, you need to carefully watch the output to see that the execution.id printed out when maven is run is the order that you expect things to be in. It is very possible that your problem is that eclipse:eclipse is being run prior to checking anything out. The only way to fix this is to use different phases. I do wonder why you are trying to automate a task that is done infrequently. Once you have manually checked out the project you never need to do this again (you only do syncs). Reasons for checking out another instance of the project may include preparing for a release, or branch, or perhaps your workflow requires bugs to be worked on in separate workspaces. Once checked out you manually run eclipse:eclipse. Reasons for re-running eclipse:eclipse are because dependencies have changed (either the project has been released, something you depend upon has bug fixes and you want a different version, or new dependencies have been added). I think you would be better off including the step by step instructions in a readme.txt file, your wiki, or a batch file. Trying to do this in Maven doesn't feel like the right thing to do. Maven manages your build lifecycle and checkout and eclipse:eclipse are not part of that build lifecycle, they are steps prior to that. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: mvn eclipse plugin for multimodule proyect
thanks a lot for replaying your answer are really helpful. I am going to replay you below. 2011/4/20 Barrie Treloar baerr...@gmail.com On Wed, Apr 20, 2011 at 10:24 PM, Fernando Wermus fwer...@odeasrl.com.ar wrote: [del] I am trying to run mvn eclipse:eclipse in parent pom.xml without any success. I am not sure if pom.xml for constructing developer environment run mvn eclipse:eclipse in pom.xml parent or in itself. I am almost sure that is doing it in parent pom.xml without any success. [del] What you have described so far appears reasonable. Can you please run mvn eclipse:eclipse -Pdeveloper and paste the error output. I change that for execution idgenero-proyectos2/id phaseverify/phase configuration executablemvn/executable workingDirectory${src.modulos}/workingDirectory arguments argument-Pdesarrollo/argument argumenteclipse:eclipse/argument /arguments /configuration goals goalexec/goal /goals /execution I'd recommend against putting the eclipse configuration inside a profile. What I do instead is to put this inside build pluginManagement So that people can run mvn eclipse:eclipse without having to remember to turn on a profile Rememeber, the eclipse plugin does not participate in the standard lifecycle. What we are doing with maven in development profile is: 1. checkout trunk 2. compile 3. mvn eclipse:eclipse 4. copy weblogic to a folder As you can see, we consider that maven should resolve all the problem about having a development environment. This includes some operations that are not part of standard lifecycle. Are we taking a correct path? if not, this instructions are a part needed for developers when they construct their environment. How do you recommend is it the best way to achieve this goal? If this is for internal development inside your company, then I recommend putting this stuff into your corporate parent pom. That way any maven projects get this configuration - not just your project Personally I dont use these options below workspace.../workspace workspaceCodeStylesURLfile:///${user.home}/WorkingDirectory/${odea.cvs.branch}/env/config/IDEs/eclipse/formatting-rules.xml/workspaceCodeStylesURL By doing this you've made some assumptions that may not be valid: * that the workspace is always one directory above where you checked out the code. * that the code style file is in a fixed location on disk. Since the code style file doesn't change that regularly we do all that manually, by downloading it and installing it via Window Preferences. If you do want to automate it then check out http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html If you bundle corporate stuff into its own project, then you can use copy-resources to put them into your target/ directory and then reference them that way. It may be better to place them into a different directory than target/ so they dont get deleted when you run clean. But at least these are now project local references instead of fixed references. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: mvn eclipse plugin for multimodule proyect
Asmann, I will explain everything We have a pom.xml for constructing all the developer environment separate from the pom's projects. We have, 1. use scm to checkout all proyects and bootstrap it. 2. copy eclipse to developer machine. 3. copy app server to developer machine 4. run eclipse:eclipse and eclipse:configure-workspace to set up code style and generate all eclipse proyects. We have a pom.xml which does activities from 1 to 4 and pom.xml which are part of the proyect. Our project's structure is the following: pom.xml (parent) pom.xml (project A) pom.xml (project B) pom.xml (project C) I am trying to run mvn eclipse:eclipse in parent pom.xml without any success. I am not sure if pom.xml for constructing developer environment run mvn eclipse:eclipse in pom.xml parent or in itself. I am almost sure that is doing it in parent pom.xml without any success. thanks in advance this is my pom.xml for constructing developer environment: profile iddeveloper/id build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-scm-plugin/artifactId version1.1/version configuration username.../username password.../password checkoutDirectory.../checkoutDirectory scmVersion.../scmVersion wtpversion2.0/wtpversion scmVersionTypebranch/scmVersionType /configuration executions execution phaseverify/phase goals goalbootstrap/goal /goals /execution /executions /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId executions execution idcopio-eclipse/id phaseverify/phase configuration executablescp/executable arguments argument.../argument argument/opt/apps//argument /arguments /configuration goals goalexec/goal /goals /execution execution iddescomprimo-eclipse/id phaseverify/phase configuration executabletar/executable arguments argumentzxvf/argument argument/opt/apps/helios_jree.tar.gz/argument argument-C/argument argument/opt/apps//argument /arguments /configuration goals goalexec/goal /goals /execution ... /executions /plugin plugin artifactIdmaven-eclipse-plugin/artifactId version2.8/version executions execution idconfigure-workspace-eclipse/id phaseverify/phase configuration workspace.../workspace workspaceCodeStylesURL file:///${user.home}/WorkingDirectory/${odea.cvs.branch}/env/config/IDEs/eclipse/formatting-rules.xml /workspaceCodeStylesURL wtpmanifesttrue/wtpmanifest wtpapplicationxmltrue/wtpapplicationxml wtpversion2.0/wtpversion manifest${basedir}/src/main/resources/META-INF/MANIFEST.MF/manifest /configuration goals goalconfigure-workspace/goal goaleclipse/goal
Re: mvn eclipse plugin for multimodule proyect
Hello Fernando, You can call me 'Roland', that is my first name. ;-) If I understand correctly, you have a POM-file on your computer and run Maven on it. This will download/checkout/copy/... everything to your computer. Now, I presume that the POM you are using is *not* the one you call 'parent' in your structure, or is it? If not, I think the problem is that 'eclipse:eclipse' is called on the wrong project. If it is, there might be something else going on here. Please give me a little more background info on this! Also, I really like the idea you are having here. I do think this would be better as an archetype though, but that's just a matter of opinion. :-) Regards, Roland On 20-04-11 14:54, Fernando Wermus wrote: Asmann, I will explain everything We have a pom.xml for constructing all the developer environment separate from the pom's projects. We have, 1. use scm to checkout all proyects and bootstrap it. 2. copy eclipse to developer machine. 3. copy app server to developer machine 4. run eclipse:eclipse and eclipse:configure-workspace to set up code style and generate all eclipse proyects. We have a pom.xml which does activities from 1 to 4 and pom.xml which are part of the proyect. Our project's structure is the following: pom.xml (parent) pom.xml (project A) pom.xml (project B) pom.xml (project C) I am trying to run mvn eclipse:eclipse in parent pom.xml without any success. I am not sure if pom.xml for constructing developer environment run mvn eclipse:eclipse in pom.xml parent or in itself. I am almost sure that is doing it in parent pom.xml without any success. thanks in advance this is my pom.xml for constructing developer environment: profile iddeveloper/id build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-scm-plugin/artifactId version1.1/version configuration username.../username password.../password checkoutDirectory.../checkoutDirectory scmVersion.../scmVersion wtpversion2.0/wtpversion scmVersionTypebranch/scmVersionType /configuration executions execution phaseverify/phase goals goalbootstrap/goal /goals /execution /executions /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId executions execution idcopio-eclipse/id phaseverify/phase configuration executablescp/executable arguments argument.../argument argument/opt/apps//argument /arguments /configuration goals goalexec/goal /goals /execution execution iddescomprimo-eclipse/id phaseverify/phase configuration executabletar/executable arguments argumentzxvf/argument argument/opt/apps/helios_jree.tar.gz/argument argument-C/argument argument/opt/apps//argument /arguments /configuration goals goalexec/goal /goals /execution ... /executions /plugin plugin artifactIdmaven-eclipse-plugin/artifactId version2.8/version
Re: mvn eclipse plugin for multimodule proyect
On Wed, Apr 20, 2011 at 10:24 PM, Fernando Wermus fwer...@odeasrl.com.ar wrote: [del] I am trying to run mvn eclipse:eclipse in parent pom.xml without any success. I am not sure if pom.xml for constructing developer environment run mvn eclipse:eclipse in pom.xml parent or in itself. I am almost sure that is doing it in parent pom.xml without any success. [del] What you have described so far appears reasonable. Can you please run mvn eclipse:eclipse -Pdeveloper and paste the error output. I'd recommend against putting the eclipse configuration inside a profile. What I do instead is to put this inside build pluginManagement So that people can run mvn eclipse:eclipse without having to remember to turn on a profile Rememeber, the eclipse plugin does not participate in the standard lifecycle. If this is for internal development inside your company, then I recommend putting this stuff into your corporate parent pom. That way any maven projects get this configuration - not just your project Personally I dont use these options below workspace.../workspace workspaceCodeStylesURLfile:///${user.home}/WorkingDirectory/${odea.cvs.branch}/env/config/IDEs/eclipse/formatting-rules.xml/workspaceCodeStylesURL By doing this you've made some assumptions that may not be valid: * that the workspace is always one directory above where you checked out the code. * that the code style file is in a fixed location on disk. Since the code style file doesn't change that regularly we do all that manually, by downloading it and installing it via Window Preferences. If you do want to automate it then check out http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html If you bundle corporate stuff into its own project, then you can use copy-resources to put them into your target/ directory and then reference them that way. It may be better to place them into a different directory than target/ so they dont get deleted when you run clean. But at least these are now project local references instead of fixed references. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
mvn eclipse plugin for multimodule proyect
Hi all, I have a pom which is a multimodule proyect. I am using maven plugin eclipse for generating all the eclipse's proyects. But for reason, it doesn't create any. any help would be really appreciated
Re: mvn eclipse plugin for multimodule proyect
Doesn't it create the files or are your projects not in Eclipse? You must import the projects yourself after the build, the plugin does *not* do this for you! On 19.04.2011 17:14, Fernando Wermus wrote: Hi all, I have a pom which is a multimodule proyect. I am using maven plugin eclipse for generating all the eclipse's proyects. But for reason, it doesn't create any. any help would be really appreciated -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: mvn eclipse plugin for multimodule proyect
What it does not create are the files for each eclipse project. Thus I cannot make the import. 2011/4/19 Asmann, Roland roland.asm...@adesso.at Doesn't it create the files or are your projects not in Eclipse? You must import the projects yourself after the build, the plugin does *not* do this for you! On 19.04.2011 17:14, Fernando Wermus wrote: Hi all, I have a pom which is a multimodule proyect. I am using maven plugin eclipse for generating all the eclipse's proyects. But for reason, it doesn't create any. any help would be really appreciated -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: mvn eclipse plugin for multimodule proyect
Can you post your configuration (if any) and the command you issue to run Maven? On 19.04.2011 17:44, Fernando Wermus wrote: What it does not create are the files for each eclipse project. Thus I cannot make the import. 2011/4/19 Asmann, Roland roland.asm...@adesso.at Doesn't it create the files or are your projects not in Eclipse? You must import the projects yourself after the build, the plugin does *not* do this for you! On 19.04.2011 17:14, Fernando Wermus wrote: Hi all, I have a pom which is a multimodule proyect. I am using maven plugin eclipse for generating all the eclipse's proyects. But for reason, it doesn't create any. any help would be really appreciated -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org