Invoking Maven Goals Prorammatically
Hi All, I am trying to execute clean and install maven goals for a java project from another java project by launching maven builder programmatically. I have came across Maven Invoker plugin. But I could not find any example code used to Invoke maven goals from a java project. Can some one point me to an example how to get this done using this maven invoker plugin? Thanks and Regards, Harshana Martin -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05
Re: Invoking Maven Goals Prorammatically
Hi, Try something like this: plugin artifactIdmaven-invoker-plugin/artifactId configuration goals goalclean/goal goaleclipse:clean/goal goaleclipse:eclipse/goal goalinstall/goal /goals noLogtrue/noLog streamLogstrue/streamLogs properties jboss.home${jboss.home}/jboss.home /properties /configuration executions execution idtelefon/id goals goalrun/goal /goals phasevalidate/phase configuration pom../sv-portal-telefon/pom.xml/pom /configuration /execution /executions /plugin Check the plugin description to see if you need all parameters I used or if you need some I didn't use! Roland On 07.12.2010 10:37, Harshana Eranga Martin wrote: Hi All, I am trying to execute clean and install maven goals for a java project from another java project by launching maven builder programmatically. I have came across Maven Invoker plugin. But I could not find any example code used to Invoke maven goals from a java project. Can some one point me to an example how to get this done using this maven invoker plugin? Thanks and Regards, Harshana Martin -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05 -- 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. -
Re: Invoking Maven Goals Prorammatically
Oops, misread your mail... Please ignore this post! Roland On 07.12.2010 10:40, Asmann, Roland wrote: Hi, Try something like this: plugin artifactIdmaven-invoker-plugin/artifactId configuration goals goalclean/goal goaleclipse:clean/goal goaleclipse:eclipse/goal goalinstall/goal /goals noLogtrue/noLog streamLogstrue/streamLogs properties jboss.home${jboss.home}/jboss.home /properties /configuration executions execution idtelefon/id goals goalrun/goal /goals phasevalidate/phase configuration pom../sv-portal-telefon/pom.xml/pom /configuration /execution /executions /plugin Check the plugin description to see if you need all parameters I used or if you need some I didn't use! Roland On 07.12.2010 10:37, Harshana Eranga Martin wrote: Hi All, I am trying to execute clean and install maven goals for a java project from another java project by launching maven builder programmatically. I have came across Maven Invoker plugin. But I could not find any example code used to Invoke maven goals from a java project. Can some one point me to an example how to get this done using this maven invoker plugin? Thanks and Regards, Harshana Martin -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05 -- 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. - -- 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. -
Re: Invoking Maven Goals Prorammatically
2010/12/7 Harshana Eranga Martin harshan...@gmail.com: Hi All, I am trying to execute clean and install maven goals for a java project from another java project by launching maven builder programmatically. I have came across Maven Invoker plugin. But I could not find any example code used to Invoke maven goals from a java project. Can some one point me to an example how to get this done using this maven invoker plugin? Calling Maven from Java is definitely a job for Maven Embedder (e.g. m2eclipse uses it). I can't find docs about it, though. Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoking Maven Goals Prorammatically
Hi Roland and All, It's ok. I just found this example[0]. Thanks for the input. I'll try this and let know the progress. [0]. http://maven.apache.org/shared/maven-invoker/usage.html Thanks and Regards, Harshana Martin On 7 December 2010 15:16, Asmann, Roland roland.asm...@adesso.at wrote: Oops, misread your mail... Please ignore this post! Roland On 07.12.2010 10:40, Asmann, Roland wrote: Hi, Try something like this: plugin artifactIdmaven-invoker-plugin/artifactId configuration goals goalclean/goal goaleclipse:clean/goal goaleclipse:eclipse/goal goalinstall/goal /goals noLogtrue/noLog streamLogstrue/streamLogs properties jboss.home${jboss.home}/jboss.home /properties /configuration executions execution idtelefon/id goals goalrun/goal /goals phasevalidate/phase configuration pom../sv-portal-telefon/pom.xml/pom /configuration /execution /executions /plugin Check the plugin description to see if you need all parameters I used or if you need some I didn't use! Roland On 07.12.2010 10:37, Harshana Eranga Martin wrote: Hi All, I am trying to execute clean and install maven goals for a java project from another java project by launching maven builder programmatically. I have came across Maven Invoker plugin. But I could not find any example code used to Invoke maven goals from a java project. Can some one point me to an example how to get this done using this maven invoker plugin? Thanks and Regards, Harshana Martin -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05 -- 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. - -- 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. - -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05
Re: Invoking Maven Goals Prorammatically
Hi Antonio, On 7 December 2010 15:21, Antonio Petrelli antonio.petre...@gmail.comwrote: 2010/12/7 Harshana Eranga Martin harshan...@gmail.com: Hi All, I am trying to execute clean and install maven goals for a java project from another java project by launching maven builder programmatically. I have came across Maven Invoker plugin. But I could not find any example code used to Invoke maven goals from a java project. Can some one point me to an example how to get this done using this maven invoker plugin? Calling Maven from Java is definitely a job for Maven Embedder (e.g. m2eclipse uses it). I can't find docs about it, though. Thanks for the reference. I will look in the m2eclipse code as well. Thanks and Regards, Harshana Martin Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05
Multiple JDKs
Hi all, I was wondering if anybody ever had this problem... I have a customer who is running a machine with a SUN JDK and one with an IBM JDK. Now, we've noticed there are some differences between the two, so I thought it would be best to release their artefacts for both JDKs... Question is, can I do this somehow with Maven in a single release-cycle or do I need to make separate releases? Also, they currently have a problem in that they need SUN JDK 6 for most project, where one single module MUST be built with SUN JDK 5 because of a change in some classes. They are currently running the compiler-plugin with a bootclasspath for JDK 5, which isn't beautiful but works. Is there a way to have a single module use a different JDK from the others? Thanks, -- 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: Multiple JDKs
On 7 December 2010 10:14, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I was wondering if anybody ever had this problem... I have a customer who is running a machine with a SUN JDK and one with an IBM JDK. Now, we've noticed there are some differences between the two, so I thought it would be best to release their artefacts for both JDKs... Question is, can I do this somehow with Maven in a single release-cycle or do I need to make separate releases? I would consider running the tests twice and have just one set of artifacts... Otherwise you will have a nightmare of a dependency management. Run the tests first with ibm and second with sun/oracle that way you know your artifacts work on both JREs Also, they currently have a problem in that they need SUN JDK 6 for most project, where one single module MUST be built with SUN JDK 5 because of a change in some classes. They are currently running the compiler-plugin with a bootclasspath for JDK 5, which isn't beautiful but works. Is there a way to have a single module use a different JDK from the others? Have a look at toolchains. Google is your friend. Toolchains support has been available for a while now, I know because I helped get it into a number of plugins. Another thing you might consider is using animal-sniffer-maven-plu...@mojothat way you can verify that the JRE signatures you use are only public signatures and not internal classes that are not part of the published JRE API Thanks, -- 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: Multiple JDKs
On 07.12.2010 11:29, Stephen Connolly wrote: On 7 December 2010 10:14, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I was wondering if anybody ever had this problem... I have a customer who is running a machine with a SUN JDK and one with an IBM JDK. Now, we've noticed there are some differences between the two, so I thought it would be best to release their artefacts for both JDKs... Question is, can I do this somehow with Maven in a single release-cycle or do I need to make separate releases? I would consider running the tests twice and have just one set of artifacts... Otherwise you will have a nightmare of a dependency management. Run the tests first with ibm and second with sun/oracle that way you know your artifacts work on both JREs OK, so that means I should configure my surefire to run with different JDKs? Also, with which JDK would you suggest that I run the complete build? Also, they currently have a problem in that they need SUN JDK 6 for most project, where one single module MUST be built with SUN JDK 5 because of a change in some classes. They are currently running the compiler-plugin with a bootclasspath for JDK 5, which isn't beautiful but works. Is there a way to have a single module use a different JDK from the others? Have a look at toolchains. Google is your friend. Toolchains support has been available for a while now, I know because I helped get it into a number of plugins. Another thing you might consider is using animal-sniffer-maven-plu...@mojothat way you can verify that the JRE signatures you use are only public signatures and not internal classes that are not part of the published JRE API Well, according to the customer they are definitely compiling against the API. They say there is a change in some DB drivers or something (at least something related to Oracle)... Have to inspect that a little further myself though... Thanks, -- 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
Create complicated client jar release target(s)
Hey, I don't quite know how to put this, but I'll give it a shot. Basically there are 3 client applications with Swing UI that need to get released. These have common dependencies bundled in a common dir. For this part, I don't see much of a problem, I'll get a super pom to get that working, however I'm unsure which plugin I should use. The global release structure should look like this: \application 1 \application 2 \application 3 \common However each application also has an internal release structure, which is more or less similar for each of them. The client applications all have packaging jar. The target release dir structure should go like this: \bin (holds a service wrapper, and a .bat executable) \conf (holds property files) \lib (holds the actual application jar, so the actual mvn package target) \log (the log files) For this problem someone already did an attempt with the appassembler-maven-plugin with groupId org.codehaus.mojo. Any suggestions on this matter are appreciated. -- View this message in context: http://maven.40175.n5.nabble.com/Create-complicated-client-jar-release-target-s-tp3295582p3295582.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Compiling test classes and using ${project.name}
Hello, I'm migrating our ANT + Ivy based projects to Maven and came across a strange problem with compiling test classes. Currently I have only on parent pom.xml, which controls common for all modules settings, and one child module. The child module compiles and tests perfectly as long as builddirectory is kept to default. However we prefer to keep temporary files outside of modules, therefore I changed directory as it shown below. Compilation still succeeds, but compiler plugin fails to compile test classes in test phase - it doesn't file compiled main classes. I also noticed that if the directory name is fixed (doesn't use ${project.name}) compilation of test classes succeeds either. Is it OK to use ${project.name} as I'm using? With regards, Viktor build sourceDirectorysrc/sourceDirectory testSourceDirectorytest/testSourceDirectory directory../.build/${project.name}/target/directory plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.3.2/version configuration source1.6/source target1.6/target /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.6/version configuration systemPropertyVariables com.fiserv.storage.dir${storage.dir}/com.fiserv.storage.dir log4j.configurationfile:${storage.dir}/log4j.xml/log4j.configuration com.fiserv.application.dir${com.fiserv.application.dir}/com.fiserv.application.dir com.fiserv.classes.dir${project.build.outputDirectory}/com.fiserv.classes.dir /systemPropertyVariables /configuration /plugin /plugins /build - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
2010/12/7 fhomasp thomas.peet...@realdolmen.com: I don't quite know how to put this, but I'll give it a shot. Basically there are 3 client applications with Swing UI that need to get released. These have common dependencies bundled in a common dir. For this part, I don't see much of a problem, I'll get a super pom to get that working, however I'm unsure which plugin I should use. The global release structure should look like this: \application 1 \application 2 \application 3 \common However each application also has an internal release structure, which is more or less similar for each of them. The client applications all have packaging jar. The target release dir structure should go like this: \bin (holds a service wrapper, and a .bat executable) \conf (holds property files) \lib (holds the actual application jar, so the actual mvn package target) \log (the log files) Use the maven-assembly-plugin in a separate module for each assembly you need to use: http://maven.apache.org/plugins/maven-assembly-plugin/ You can still use the appassembler plugin, but it is useful only to build launch scripts, not to create distributions. Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoking Maven Goals Prorammatically
Hi All, On 7 December 2010 15:27, Harshana Eranga Martin harshan...@gmail.comwrote: Hi Roland and All, It's ok. I just found this example[0]. Thanks for the input. I'll try this and let know the progress. [0]. http://maven.apache.org/shared/maven-invoker/usage.html I tried this and it works fine. Thanks and Regards, Harshana Martin Thanks and Regards, Harshana Martin On 7 December 2010 15:16, Asmann, Roland roland.asm...@adesso.at wrote: Oops, misread your mail... Please ignore this post! Roland On 07.12.2010 10:40, Asmann, Roland wrote: Hi, Try something like this: plugin artifactIdmaven-invoker-plugin/artifactId configuration goals goalclean/goal goaleclipse:clean/goal goaleclipse:eclipse/goal goalinstall/goal /goals noLogtrue/noLog streamLogstrue/streamLogs properties jboss.home${jboss.home}/jboss.home /properties /configuration executions execution idtelefon/id goals goalrun/goal /goals phasevalidate/phase configuration pom../sv-portal-telefon/pom.xml/pom /configuration /execution /executions /plugin Check the plugin description to see if you need all parameters I used or if you need some I didn't use! Roland On 07.12.2010 10:37, Harshana Eranga Martin wrote: Hi All, I am trying to execute clean and install maven goals for a java project from another java project by launching maven builder programmatically. I have came across Maven Invoker plugin. But I could not find any example code used to Invoke maven goals from a java project. Can some one point me to an example how to get this done using this maven invoker plugin? Thanks and Regards, Harshana Martin -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05 -- 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. - -- 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. - -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05 -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05
Re: Compiling test classes and using ${project.name}
Maven best-practice is to stick to Maven conventions. You're not doing that and therefore you're running into trouble. I'm guessing here, but you've probably run into some limitation in the testCompile goal of m-compile-p. I suggest you change your opinion regarding where Maven creates files during build and follow the Maven standard. Your life will be much easier then. /Anders On Tue, Dec 7, 2010 at 12:08, Viktor Sadovnikov vl_sadovni...@yahoo.comwrote: Hello, I'm migrating our ANT + Ivy based projects to Maven and came across a strange problem with compiling test classes. Currently I have only on parent pom.xml, which controls common for all modules settings, and one child module. The child module compiles and tests perfectly as long as builddirectory is kept to default. However we prefer to keep temporary files outside of modules, therefore I changed directory as it shown below. Compilation still succeeds, but compiler plugin fails to compile test classes in test phase - it doesn't file compiled main classes. I also noticed that if the directory name is fixed (doesn't use ${project.name}) compilation of test classes succeeds either. Is it OK to use ${project.name} as I'm using? With regards, Viktor build sourceDirectorysrc/sourceDirectory testSourceDirectorytest/testSourceDirectory directory../.build/${project.name}/target/directory plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.3.2/version configuration source1.6/source target1.6/target /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.6/version configuration systemPropertyVariables com.fiserv.storage.dir${storage.dir}/com.fiserv.storage.dir log4j.configurationfile:${storage.dir}/log4j.xml/log4j.configuration com.fiserv.application.dir${com.fiserv.application.dir}/com.fiserv.application.dir com.fiserv.classes.dir${project.build.outputDirectory}/com.fiserv.classes.dir /systemPropertyVariables /configuration /plugin /plugins /build - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Compiling test classes and using ${project.name}
project name can be anything (or nothing).. it's for sure not intended to be used in filesystem paths.. don't use it. Milos On Tue, Dec 7, 2010 at 12:36 PM, Anders Hammar and...@hammar.net wrote: Maven best-practice is to stick to Maven conventions. You're not doing that and therefore you're running into trouble. I'm guessing here, but you've probably run into some limitation in the testCompile goal of m-compile-p. I suggest you change your opinion regarding where Maven creates files during build and follow the Maven standard. Your life will be much easier then. /Anders On Tue, Dec 7, 2010 at 12:08, Viktor Sadovnikov vl_sadovni...@yahoo.comwrote: Hello, I'm migrating our ANT + Ivy based projects to Maven and came across a strange problem with compiling test classes. Currently I have only on parent pom.xml, which controls common for all modules settings, and one child module. The child module compiles and tests perfectly as long as builddirectory is kept to default. However we prefer to keep temporary files outside of modules, therefore I changed directory as it shown below. Compilation still succeeds, but compiler plugin fails to compile test classes in test phase - it doesn't file compiled main classes. I also noticed that if the directory name is fixed (doesn't use ${project.name}) compilation of test classes succeeds either. Is it OK to use ${project.name} as I'm using? With regards, Viktor build sourceDirectorysrc/sourceDirectory testSourceDirectorytest/testSourceDirectory directory../.build/${project.name}/target/directory plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.3.2/version configuration source1.6/source target1.6/target /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.6/version configuration systemPropertyVariables com.fiserv.storage.dir${storage.dir}/com.fiserv.storage.dir log4j.configurationfile:${storage.dir}/log4j.xml/log4j.configuration com.fiserv.application.dir${com.fiserv.application.dir}/com.fiserv.application.dir com.fiserv.classes.dir${project.build.outputDirectory}/com.fiserv.classes.dir /systemPropertyVariables /configuration /plugin /plugins /build - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Multiple JDKs
On 7 December 2010 10:37, Asmann, Roland roland.asm...@adesso.at wrote: On 07.12.2010 11:29, Stephen Connolly wrote: On 7 December 2010 10:14, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I was wondering if anybody ever had this problem... I have a customer who is running a machine with a SUN JDK and one with an IBM JDK. Now, we've noticed there are some differences between the two, so I thought it would be best to release their artefacts for both JDKs... Question is, can I do this somehow with Maven in a single release-cycle or do I need to make separate releases? I would consider running the tests twice and have just one set of artifacts... Otherwise you will have a nightmare of a dependency management. Run the tests first with ibm and second with sun/oracle that way you know your artifacts work on both JREs OK, so that means I should configure my surefire to run with different JDKs? Also, with which JDK would you suggest that I run the complete build? If you use toolchains, it should not matter what JRE you use to run Maven, the compiler plugin will use the toolchain you specify. The question you need to ask yourself is which JDK should the toolchain be driving, and I cannot answer that... if animal-sniffer says that they are only using the public JRE api then it does not matter which JDK you use. And if you have surefire running with both JREs then you should be safe anyway Also, they currently have a problem in that they need SUN JDK 6 for most project, where one single module MUST be built with SUN JDK 5 because of a change in some classes. They are currently running the compiler-plugin with a bootclasspath for JDK 5, which isn't beautiful but works. Is there a way to have a single module use a different JDK from the others? Have a look at toolchains. Google is your friend. Toolchains support has been available for a while now, I know because I helped get it into a number of plugins. Another thing you might consider is using animal-sniffer-maven-plu...@mojothat way you can verify that the JRE signatures you use are only public signatures and not internal classes that are not part of the published JRE API Well, according to the customer they are definitely compiling against the API. They say there is a change in some DB drivers or something (at least something related to Oracle)... Have to inspect that a little further myself though... Might be the DB driver that is depending on non-public JRE classes Thanks, -- 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
Re: Create complicated client jar release target(s)
Thanks.. That does make sense. So I'd create a release module that has a client application as dependency, that's what you mean? So one release module for one application. Kind of like an ear packaging a war, in a broad analogy then? In the super pom bundling the modules I then add these modules to the modulelist? Or only in a seperate profile meant for the release? Antonio Petrelli wrote: 2010/12/7 fhomasp thomas.peet...@realdolmen.com: I don't quite know how to put this, but I'll give it a shot. Basically there are 3 client applications with Swing UI that need to get released. These have common dependencies bundled in a common dir. For this part, I don't see much of a problem, I'll get a super pom to get that working, however I'm unsure which plugin I should use. The global release structure should look like this: \application 1 \application 2 \application 3 \common However each application also has an internal release structure, which is more or less similar for each of them. The client applications all have packaging jar. The target release dir structure should go like this: \bin (holds a service wrapper, and a .bat executable) \conf (holds property files) \lib (holds the actual application jar, so the actual mvn package target) \log (the log files) Use the maven-assembly-plugin in a separate module for each assembly you need to use: http://maven.apache.org/plugins/maven-assembly-plugin/ You can still use the appassembler plugin, but it is useful only to build launch scripts, not to create distributions. Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- View this message in context: http://maven.40175.n5.nabble.com/Create-complicated-client-jar-release-target-s-tp3295582p3295674.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
2010/12/7 fhomasp thomas.peet...@realdolmen.com: That does make sense. So I'd create a release module that has a client application as dependency, that's what you mean? Exactly. So one release module for one application. Kind of like an ear packaging a war, in a broad analogy then? Very broad, since EAR has its own package type. In the super pom bundling the modules I then add these modules to the modulelist? Or only in a seperate profile meant for the release? Add new modules to the module list. This approach proved to be the best in the long term, especially if you have a very complicated list of dependencies to include in the assembly. Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Problems uploading bundle to Sonatype
Hi all, The Pivot team is getting ready to release Apache Pivot 2.0, and we are (again) having trouble uploading our generated Maven bundles to the repository manager at https://repository.apache.org. The bundles are located here: http://people.apache.org/~tvolkert/maven/pivot/v2.0/ When I try to upload the root bundle (pivot-2.0-bundle.jar), I get the following error: Artifact upload failed. [pivot-2.0.pom.sha1, pivot-2.0.pom.asc] are invalid maven artifacts Your help would be very much appreciated in resolving this issue. Thanks, Greg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Problems uploading bundle to Sonatype
Hi all, The Pivot team is getting ready to release Apache Pivot 2.0, and we are (again) having trouble uploading our generated Maven bundles to the repository manager at https://repository.apache.org. The bundles are located here: http://people.apache.org/~tvolkert/maven/pivot/v2.0/ When I try to upload the root bundle (pivot-2.0-bundle.jar), I get the following error: Artifact upload failed. [pivot-2.0.pom.sha1, pivot-2.0.pom.asc] are invalid maven artifacts Your help would be very much appreciated in resolving this issue. Thanks, Greg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
Ok, but that would mean that the extra release modules are built whenever a mvn package or clean or ... command is invoked on the parent pom. I'm quite sure that they won't like that. Antonio Petrelli wrote: Add new modules to the module list. This approach proved to be the best in the long term, especially if you have a very complicated list of dependencies to include in the assembly. Antonio -- View this message in context: http://maven.40175.n5.nabble.com/Create-complicated-client-jar-release-target-s-tp3295582p3295706.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
2010/12/7 fhomasp thomas.peet...@realdolmen.com: Ok, but that would mean that the extra release modules are built whenever a mvn package or clean or ... command is invoked on the parent pom. I'm quite sure that they won't like that. If you don't bind the assembly:single goal to the package phase, it won't be built in package phase. I suggest you to bind it in a specific profile, that is invoked when the release is done (I mean, when you use the Maven Release plugin). Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
2010/12/7 Antonio Petrelli antonio.petre...@gmail.com: 2010/12/7 fhomasp thomas.peet...@realdolmen.com: Ok, but that would mean that the extra release modules are built whenever a mvn package or clean or ... command is invoked on the parent pom. I'm quite sure that they won't like that. If you don't bind the assembly:single goal to the package phase, it won't be built in package phase. Just forgot that, anyway, when you install the assembly module, it is still a POM-packaged Maven project, and it will be installed in the local repository, but I don't think it is much a problem, right? :-D Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
In the local repository? I guess they'll get over it :-) I think I'm going to exclude the release modules from the module list, and include them in a seperate profile like this: profiles profile idrelease/id modules moduleapp1/module moduleapp2/module moduleapp3/module moduleapp1-release/module moduleapp2-release/module moduleapp3-release/module /modules /profile /profiles Because there already is a parent pom, which is used to build the applications in development rather frequently. If I add the release modules to the standard module list they will always get included in the build process. It's better that no one sees any release being mentioned unless they invoke a build with release profile on. If any of my reasoning is flawed, by all means, point it out :-) Antonio Petrelli wrote: 2010/12/7 Antonio Petrelli antonio.petre...@gmail.com: 2010/12/7 fhomasp thomas.peet...@realdolmen.com: Ok, but that would mean that the extra release modules are built whenever a mvn package or clean or ... command is invoked on the parent pom. I'm quite sure that they won't like that. If you don't bind the assembly:single goal to the package phase, it won't be built in package phase. Just forgot that, anyway, when you install the assembly module, it is still a POM-packaged Maven project, and it will be installed in the local repository, but I don't think it is much a problem, right? :-D Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- View this message in context: http://maven.40175.n5.nabble.com/Create-complicated-client-jar-release-target-s-tp3295582p3295747.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
2010/12/7 fhomasp thomas.peet...@realdolmen.com: I think I'm going to exclude the release modules from the module list, and include them in a seperate profile like this: profiles profile idrelease/id modules moduleapp1/module moduleapp2/module moduleapp3/module moduleapp1-release/module moduleapp2-release/module moduleapp3-release/module /modules /profile /profiles If the problem is the upload to the remote repository, simply skip deployment in those modules: http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#skip Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Multiple JDKs
Hi Stephen, Stephen Connolly wrote: On 7 December 2010 10:37, Asmann, Roland roland.asm...@adesso.at wrote: On 07.12.2010 11:29, Stephen Connolly wrote: On 7 December 2010 10:14, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I was wondering if anybody ever had this problem... I have a customer who is running a machine with a SUN JDK and one with an IBM JDK. Now, we've noticed there are some differences between the two, so I thought it would be best to release their artefacts for both JDKs... Question is, can I do this somehow with Maven in a single release-cycle or do I need to make separate releases? I would consider running the tests twice and have just one set of artifacts... Otherwise you will have a nightmare of a dependency management. Run the tests first with ibm and second with sun/oracle that way you know your artifacts work on both JREs OK, so that means I should configure my surefire to run with different JDKs? Also, with which JDK would you suggest that I run the complete build? If you use toolchains, it should not matter what JRE you use to run Maven, the compiler plugin will use the toolchain you specify. The question you need to ask yourself is which JDK should the toolchain be driving, and I cannot answer that... if animal-sniffer says that they are only using the public JRE api then it does not matter which JDK you use. It does, if the JDK is not compatible. And this is the case for some parts of JDBC 3 vs. 4 (included in Java 6). And if you have surefire running with both JREs then you should be safe anyway If your module e.g. implements a JDBC Connector this is simply not possible (see commons-dbcp as precedence). Also, they currently have a problem in that they need SUN JDK 6 for most project, where one single module MUST be built with SUN JDK 5 because of a change in some classes. They are currently running the compiler-plugin with a bootclasspath for JDK 5, which isn't beautiful but works. Is there a way to have a single module use a different JDK from the others? Have a look at toolchains. Google is your friend. Toolchains support has been available for a while now, I know because I helped get it into a number of plugins. Another thing you might consider is using animal-sniffer-maven-plu...@mojothat way you can verify that the JRE signatures you use are only public signatures and not internal classes that are not part of the published JRE API Well, according to the customer they are definitely compiling against the API. They say there is a change in some DB drivers or something (at least something related to Oracle)... Have to inspect that a little further myself though... Might be the DB driver that is depending on non-public JRE classes Oracle provides two different drivers - one supporting JDBC 3, the other one JDBC 4. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
Hmm.. I don't really understand. Could you elaborate? Antonio Petrelli wrote: 2010/12/7 fhomasp thomas.peet...@realdolmen.com: I think I'm going to exclude the release modules from the module list, and include them in a seperate profile like this: profiles profile idrelease/id modules moduleapp1/module moduleapp2/module moduleapp3/module moduleapp1-release/module moduleapp2-release/module moduleapp3-release/module /modules /profile /profiles If the problem is the upload to the remote repository, simply skip deployment in those modules: http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#skip Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- View this message in context: http://maven.40175.n5.nabble.com/Create-complicated-client-jar-release-target-s-tp3295582p3295777.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
2010/12/7 fhomasp thomas.peet...@realdolmen.com: Hmm.. I don't really understand. Could you elaborate? I guess that you don't want to see those assemblies in your enterprise Maven repository, right? In this case, in each assembly module, add: build plugins ... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-deploy-plugin/artifactId configuration skiptrue/skip /configuration /plugin ... /plugins /build When you will release or, at least, deploy your parent project, deployment of modules configured this way won't be deployed. Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
Ah, I see. Well, I hadn't thought of that actually, but it's a nice suggestion. However they are rather alergic to overhead, as they won't want to build a release when they don't want to release. And I would need different credentials if I were to try and upload something to our remote Antonio Petrelli wrote: 2010/12/7 fhomasp thomas.peet...@realdolmen.com: Hmm.. I don't really understand. Could you elaborate? I guess that you don't want to see those assemblies in your enterprise Maven repository, right? In this case, in each assembly module, add: build plugins ... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-deploy-plugin/artifactId configuration skiptrue/skip /configuration /plugin ... /plugins /build When you will release or, at least, deploy your parent project, deployment of modules configured this way won't be deployed. Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- View this message in context: http://maven.40175.n5.nabble.com/Create-complicated-client-jar-release-target-s-tp3295582p3295810.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problems uploading bundle to Sonatype
On Tue, Dec 7, 2010 at 7:46 AM, Greg Brown gk_br...@verizon.net wrote: The Pivot team is getting ready to release Apache Pivot 2.0, and we are (again) having trouble uploading our generated Maven bundles to the repository manager at https://repository.apache.org. The bundles are located here: It's unlikely anyone on the Maven users list can help. You probably need reposit...@a.o -- see http://www.apache.org/dev/repository-faq.html . -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
Hey, using an assembly descriptor in the maven-assembly-plugin, how would I go about getting property files from one my client apps? I mean... These property files are of course centralized in the resources dir of that module. I'd hate to have to tell my project manager that I'll have to get these property files reduntantly into this new module... -- View this message in context: http://maven.40175.n5.nabble.com/Create-complicated-client-jar-release-target-s-tp3295582p3295850.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Create complicated client jar release target(s)
2010/12/7 fhomasp thomas.peet...@realdolmen.com: using an assembly descriptor in the maven-assembly-plugin, how would I go about getting property files from one my client apps? I mean... These property files are of course centralized in the resources dir of that module. I'd hate to have to tell my project manager that I'll have to get these property files reduntantly into this new module... If I understand you correctly, you want to copy a property inside one of your dependency inside a directory of your assembly, right? Then, prior to your assembly build, unpack part of your dependency: http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html After that, include it in your assembly. HTH Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Get a list of POMs
On Mon, Dec 6, 2010 at 9:45 PM, solo1970 sonia.lodoviche...@ericsson.com wrote: My question is if there is a way to get a list of POM files from the TOP POM in a multimodule project? You'll get more help if you describe the problem you're trying to solve rather than asking about a piece of the solution you've arrived at in isolation. What are you planning to do with this list? (And what are you looking for, a list of the full paths to the pom files? A list of module names? Artifact ids?) -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Eclipse STS License
I am not a lawyer nor do I have any connection to Springsource but there have been some questions raised about the license for Eclipse STS IDE so I did a bit of reading. Eclipse/STS is a free and very complete out-of-the-box solution for developers who want to use Maven and do not want to spend a day or two reconfiguring Eclipse to get all of the plug-ins that you need to have a smooth Maven environment, everytime you want to upgrade Eclipse. From their forum by the senior project manager: "We got some questions about what free" in the context of STS actually means. So let me try to explain: Firstly starting with version 2.0.2.RELEASE, STS is available at no cost and free for all development purposes; no strings attached." and his follow-up comment "The license allows you to use STS in a "non-production" environment. In the context of STS the term "non-production" is a bit pointless as I've never seen anybody running an IDE in their production system; as its sole purpose is to support the developer during development." The post from April 14,2010 can be read in full at: Spring Community Forums Spring Projects SpringSource Tool Suite STS License has changed?? I hope that this clarifies the situation. You can run your software in a production environment and you can use STS to develop that software. The Springsource guys have some very nice commercial tools for supporting production environments but I am not using any of these yet, so I do not have any recommendations on that side. We do use Eclipse/STS for all development of our production systems and our products for resale. We started with pure Eclipse for the first 18 months and then found Eclipse/STS. Eclipse/STS and Nexus (found it a bit later) has improved our understanding of Maven a lot and has made the development process a lot more productive. We also use Subversion, Spring and Hibernate which are well supported by Eclipse/STS. We do not use Hudson so I have no idea if there are tools in STS to assist in managing that environment. We are starting to move into the Cloud and I suspect that we may start to use some of the Springsource commercial products to manage deployment and operations if we start to have a lot of cloud servers in production. I hope that this helps make Maven a bit easier for others. Ron
Calling beanshell from maven-antrun-plugin
Crossposted to http://stackoverflow.com/questions/4377866/calling-beanshell-from-maven-antrun-plugin StackOverflow . Is it possible to call beanshell scripts from the maven-antrun-plugin? I am using Java 6 build 22, Maven 2.2.1, maven-antrun-plugin 1.6. -- View this message in context: http://maven.40175.n5.nabble.com/Calling-beanshell-from-maven-antrun-plugin-tp3295979p3295979.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Scanning for projects... hangs
where can i increase maven3 memory from? path to script file or where to add the new memory parameter. I also upgraded to maven 3.0 and I am still getting the same issue. Ideas? On Mon, Dec 6, 2010 at 5:06 PM, Ron Wheeler rwhee...@artifact-software.comwrote: We could build most of our projects with the default settings but a 1 or 2 of our builds would fail until we increased the memory limit. It is a safe thing to do and does not really cost anything. We are using a 1GB size and are not having any more problems. Ron On 06/12/2010 4:01 PM, Mahdi Yusuf wrote: I will give that a shot! I will let you know what i see. The thing is the other jobs work fine. Which is what i find curious. On Mon, Dec 6, 2010 at 1:54 PM, Timche...@gmail.com wrote: A GC overhead limit is not an out of memory. Refer to http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom for more information about it. As a work around you can try increasing Xmx as well but that's only masking the underlying problem and may have no effect. I seem to remember getting a lot of these with a previous snapshot version of maven 3 as well and upgrading fixed it. Why don't you try again with maven 3.0.1 which was released a few wks ago and see if that fixes it for you. On Mon, Dec 6, 2010 at 12:32 PM, Mahdi Yusufyusuf.ma...@gmail.com wrote: Hi Everyone, Its Monday. I would like some help figuring out an issue with my build. No only on particular job causes a hang after Scanning for projects... This issue just popped up after adding some new modules to my parent pom.xml, I have attached the output, of the build with the -X command tacked on. It says that I am running out of memory which isn't the case. Any suggestions are appreciated. - Apache Maven 3.0-SNAPSHOT (r910004; 2010-02-18 18:19:44-0500) Java version: 1.6.0_22 Java home: /usr/lib/jvm/java-6-sun-1.6.0.22/jre Default locale: en_CA, platform encoding: UTF-8 OS name: linux version: 2.6.32-26-generic arch: amd64 Family: unix [INFO] Error stacktraces are turned on. [DEBUG] Reading user settings from /home/myusuf3/.m2/settings.xml [DEBUG] Reading global settings from EMBEDDED/conf/settings.xml [DEBUG] Using local repository at /home/myusuf3/.m2/repository [INFO] Scanning for projects... [ERROR] GC overhead limit exceeded - [Help 1] java.lang.OutOfMemoryError: GC overhead limit exceeded at java.lang.String.toCharArray(String.java:2725) at org.codehaus.plexus.util.xml.pull.MXParser.defineEntityReplacementText(MXParser.java:585) at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:3787) at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4012) at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:75) at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:324) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:133) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:117) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:321) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at
Re: Get a list of POMs
Sorry about being unclear What I need is either the absolute or relative path to the pom files. The reason why I need this is because we are using clearcase and we would like to use the funtionality of the versions plugin, but we need to check-out all of the pom files of our project first. Hope this is more clear... Sonia -- View this message in context: http://maven.40175.n5.nabble.com/Get-a-list-of-POMs-tp3295200p3295992.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Scanning for projects... hangs
I also noticed that it cant find metadata: [DEBUG] Could not find metadata com.linux:com.linux.parent:2.0.0-SNAPSHOT/maven-metadata.xml Does this help. On Tue, Dec 7, 2010 at 10:45 AM, Mahdi Yusuf yusuf.ma...@gmail.com wrote: where can i increase maven3 memory from? path to script file or where to add the new memory parameter. I also upgraded to maven 3.0 and I am still getting the same issue. Ideas? On Mon, Dec 6, 2010 at 5:06 PM, Ron Wheeler rwhee...@artifact-software.com wrote: We could build most of our projects with the default settings but a 1 or 2 of our builds would fail until we increased the memory limit. It is a safe thing to do and does not really cost anything. We are using a 1GB size and are not having any more problems. Ron On 06/12/2010 4:01 PM, Mahdi Yusuf wrote: I will give that a shot! I will let you know what i see. The thing is the other jobs work fine. Which is what i find curious. On Mon, Dec 6, 2010 at 1:54 PM, Timche...@gmail.com wrote: A GC overhead limit is not an out of memory. Refer to http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom for more information about it. As a work around you can try increasing Xmx as well but that's only masking the underlying problem and may have no effect. I seem to remember getting a lot of these with a previous snapshot version of maven 3 as well and upgrading fixed it. Why don't you try again with maven 3.0.1 which was released a few wks ago and see if that fixes it for you. On Mon, Dec 6, 2010 at 12:32 PM, Mahdi Yusufyusuf.ma...@gmail.com wrote: Hi Everyone, Its Monday. I would like some help figuring out an issue with my build. No only on particular job causes a hang after Scanning for projects... This issue just popped up after adding some new modules to my parent pom.xml, I have attached the output, of the build with the -X command tacked on. It says that I am running out of memory which isn't the case. Any suggestions are appreciated. - Apache Maven 3.0-SNAPSHOT (r910004; 2010-02-18 18:19:44-0500) Java version: 1.6.0_22 Java home: /usr/lib/jvm/java-6-sun-1.6.0.22/jre Default locale: en_CA, platform encoding: UTF-8 OS name: linux version: 2.6.32-26-generic arch: amd64 Family: unix [INFO] Error stacktraces are turned on. [DEBUG] Reading user settings from /home/myusuf3/.m2/settings.xml [DEBUG] Reading global settings from EMBEDDED/conf/settings.xml [DEBUG] Using local repository at /home/myusuf3/.m2/repository [INFO] Scanning for projects... [ERROR] GC overhead limit exceeded - [Help 1] java.lang.OutOfMemoryError: GC overhead limit exceeded at java.lang.String.toCharArray(String.java:2725) at org.codehaus.plexus.util.xml.pull.MXParser.defineEntityReplacementText(MXParser.java:585) at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:3787) at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4012) at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:75) at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:324) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:133) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:117) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:321) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at
Re: Scanning for projects... hangs
On Tue, Dec 7, 2010 at 9:55 AM, Mahdi Yusuf yusuf.ma...@gmail.com wrote: I also noticed that it cant find metadata: [DEBUG] Could not find metadata com.linux:com.linux.parent:2.0.0-SNAPSHOT/maven-metadata.xml Does this help. On Tue, Dec 7, 2010 at 10:45 AM, Mahdi Yusuf yusuf.ma...@gmail.com wrote: where can i increase maven3 memory from? path to script file or where to add the new memory parameter. I also upgraded to maven 3.0 and I am still getting the same issue. Ideas? Create an environment variable called MAVEN_OPTS and use settings similar to the following: MAVEN_OPTS=-Xms512m -Xmx1024m -- Andrew Close - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Scanning for projects... hangs
On 07/12/2010 10:45 AM, Mahdi Yusuf wrote: where can i increase maven3 memory from? path to script file or where to add the new memory parameter. I also upgraded to maven 3.0 and I am still getting the same issue. Ideas? How do you run Maven? I use it inside my IDE - Eclipse and there is a setting in the properties where I specify the JRE that Eclipse uses for tasks that it initiates and I add a -Xmx1024m to the arguments (if I recall this correctly). Ron On Mon, Dec 6, 2010 at 5:06 PM, Ron Wheeler rwhee...@artifact-software.comwrote: We could build most of our projects with the default settings but a 1 or 2 of our builds would fail until we increased the memory limit. It is a safe thing to do and does not really cost anything. We are using a 1GB size and are not having any more problems. Ron On 06/12/2010 4:01 PM, Mahdi Yusuf wrote: I will give that a shot! I will let you know what i see. The thing is the other jobs work fine. Which is what i find curious. On Mon, Dec 6, 2010 at 1:54 PM, Timche...@gmail.com wrote: A GC overhead limit is not an out of memory. Refer to http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#par_gc.oom for more information about it. As a work around you can try increasing Xmx as well but that's only masking the underlying problem and may have no effect. I seem to remember getting a lot of these with a previous snapshot version of maven 3 as well and upgrading fixed it. Why don't you try again with maven 3.0.1 which was released a few wks ago and see if that fixes it for you. On Mon, Dec 6, 2010 at 12:32 PM, Mahdi Yusufyusuf.ma...@gmail.com wrote: Hi Everyone, Its Monday. I would like some help figuring out an issue with my build. No only on particular job causes a hang after Scanning for projects... This issue just popped up after adding some new modules to my parent pom.xml, I have attached the output, of the build with the -X command tacked on. It says that I am running out of memory which isn't the case. Any suggestions are appreciated. - Apache Maven 3.0-SNAPSHOT (r910004; 2010-02-18 18:19:44-0500) Java version: 1.6.0_22 Java home: /usr/lib/jvm/java-6-sun-1.6.0.22/jre Default locale: en_CA, platform encoding: UTF-8 OS name: linux version: 2.6.32-26-generic arch: amd64 Family: unix [INFO] Error stacktraces are turned on. [DEBUG] Reading user settings from /home/myusuf3/.m2/settings.xml [DEBUG] Reading global settings from EMBEDDED/conf/settings.xml [DEBUG] Using local repository at /home/myusuf3/.m2/repository [INFO] Scanning for projects... [ERROR] GC overhead limit exceeded - [Help 1] java.lang.OutOfMemoryError: GC overhead limit exceeded at java.lang.String.toCharArray(String.java:2725) at org.codehaus.plexus.util.xml.pull.MXParser.defineEntityReplacementText(MXParser.java:585) at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:3787) at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4012) at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:75) at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:324) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:133) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:117) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:321) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:384) at
[OT]Hudson looking for a home?
http://www.theserverside.com/news/thread.tss?track=NL-461ad=802114thread_id=61409asrc=EM_NLN_12983220uid=2871220 An interesting article based on the premise that ORACLE may be taking steps that are detrimental to Hudson's long-term health. Ron - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
svn multi-modules vs. or with. maven multi-modules
Hi, We used to use svn multi-module projects for a while, because they were useful in some aspects. You only had to create one branch, one tag for the whole projects. However, for my limited understanding it doesn't work well with maven (or at all): svn-home/projecthome/trunk/project1 svn-home/projecthome/trunk/project2 svn-home/projecthome/trunk/project3 this works sofar. Each projects gets its own pom and such. But the fun begins with tagging: before maven i would do it mostly manually: svn-home/projecthome/tags/tag1/project1 svn-home/projecthome/tags/tag1/project2 svn-home/projecthome/tags/tag1/project3 with maven i get svn-home/projecthome/tags/project1-tag1 svn-home/projecthome/tags/project2-tag1 svn-home/projecthome/tags/project3-tag1 therefore, do I understand it correctly, that svn-multi-projects simply don't make sense in mavens world, and i should let them go? regards Leon - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How to have release management incremental (or release) builds publish to Nexus, but not user builds?
I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds?
Of course, developers never need to run deploy goal in the first place. Anyhow, it's a commonly used practice to deploy to different locations. Create a release profile and override the distributionManagement section as needed, for example see http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml. Kalle On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) dk0...@att.com wrote: I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How do you get Intellij IDEA to exclude the filtering of large files listed in the maven pom?
I keep getting this error whenever I run unit tests in IntelliJ IDEA: */home/egervari/IdeaProjects/jobprep-stable/src/main/resources/dict/noun.txt * *Maven: File is too big to be filtered. Most likely it is a binary file and should be excluded from filtering.* The thing is, I do explicitly exclude this file: filters filtersrc/main/filters/environment.${env}.properties/filter /filters resources resource directorysrc/main/resources/directory filteringtrue/filtering excludes excludesrc/main/resources/dict**/exclude /excludes /resource /resources Is my pom.xml written incorrectly? How do I get IDEA to honor what I actually wrote? Basically what I want to achieve is make everything in that resources directory part of the classpath, but I only want to filter applicationContext.xml. Basically, I want maven/idea to not touch the other files, because there is 20 meg in there easily. Is there any way to do this? Thanks! Ken
Re: [OT]Hudson looking for a home?
On Tue, Dec 7, 2010 at 11:34 AM, Ron Wheeler rwhee...@artifact-software.com wrote: http://www.theserverside.com/news/thread.tss?track=NL-461ad=802114thread_id=61409asrc=EM_NLN_12983220uid=2871220 An interesting article based on the premise that ORACLE may be taking steps that are detrimental to Hudson's long-term health. Then again, maybe not. Sonatype has a Hudson (psuedo) fork in-house called Matrix. It's currently part of their Professional Suite offering, but they may be open sourcing pieces of it. And if Oracle ditches Hudson maybe they'll pick it up..? -- Andrew Close - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: assembly strange result
Hi, wy tried it yesterday and everything works well with the upgrade but we changed the mecanism: now we're packaging the jar as dependency. Thanks for the tip S. Thanks Kristian, i will try this on monday :-) S. Somehow this sounds like the notorious http://jira.codehaus.org/browse/PLXCOMP-149 and the attached http://jira.codehaus.org/browse/MSHARED-148 Upgrade all your plugins to the latest version. Kristian Make sure fr., 03.12.2010 kl. 20.47 +0100, skrev reno: hi, today, we encountered a strange result with the assembly plugin: we had a jar inside a project which is a part of the project. We write an assembly file to create a tar file. No problem for the part :-) the problem is: the size of the library is about 2.7 Mo. when we untar the package, the size of the library is 4.6 Mo !! Is anybody see this strange behavior ? I know that we could use deploy the library on a maven repository (we will do it next week) but i would like to know why after packaging and untaring, the size of the library increases.. (maven 2.1, jdk 5, RHEL5) Regards S. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?
-Original Message- From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] Sent: Tuesday, December 07, 2010 10:11 AM To: Maven Users List Subject: Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds? Of course, developers never need to run deploy goal in the first place. Anyhow, it's a commonly used practice to deploy to different locations. Create a release profile and override the distributionManagement section as needed, for example see http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml. So you're saying that for the release profile, we would have a non-empty distributionManagement section, which specifies our Nexus server, but the developer profile would not have that section at all (the repository section determines where they download artifacts from)? On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) dk0...@att.com wrote: I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds?
On 07/12/2010 1:00 PM, KARR, DAVID (ATTSI) wrote: I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. Sounds good I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. This assumes that your release managers can get SNAPSHOTs released in time to keep developers working together properly. I would be tempted to allow developers to release snapshots so that testing moves at a decent pace. In our small team, SNAPSHOTs get released once or twice a day while 2 people are working on getting new functionality in place. At the beginning of the development cycle, SNAPSHOTS include mock functions and stubs for utilities or web services that the user interface guys need to support their building and testing. These SNAPSHOTs get updated very quickly as the two development groups rapidly add functionality and require more functionality from the other group to move forward. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? Nexus has access controls with passwords. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Values for instantiationStrategy
I am trying to write a plugin which supports the concept of having multiple stages of a test. The actual test implementation is loaded at execute time into the mojo and then the various stages are implemented as discrete execution's. The problem I face is that I get a new instance of the mojo for each execution. I can see there is a parameter called *instantiationStrategy*which is defaulted to *once-per-session*. I've tried various other values which do not produce an error but do not do what I am looking for. Am I going about this the correct way or does anyone know what value to set for *instantiationStrategy* which will do what I am lookng for. Thanks.
Re: Calling beanshell from maven-antrun-plugin
Haven't tried it, but googling gave me this: http://scriptlandia.blogspot.com/2006/04/beanshell-plugin-for-maven2.html However, I really dislike that they've put it in the org.apache.maven groupId. I'd even go as far as saying it's completely wrong as that space belongs to the Maven project. If you want to use it, you should get the source code and change to a different groupId (your own) and re-build it. /Anders On Tue, Dec 7, 2010 at 16:41, grkuntmd g...@usa.net wrote: Crossposted to http://stackoverflow.com/questions/4377866/calling-beanshell-from-maven-antrun-plugin StackOverflow . Is it possible to call beanshell scripts from the maven-antrun-plugin? I am using Java 6 build 22, Maven 2.2.1, maven-antrun-plugin 1.6. -- View this message in context: http://maven.40175.n5.nabble.com/Calling-beanshell-from-maven-antrun-plugin-tp3295979p3295979.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Get a list of POMs
-Original Message- From: solo1970 [mailto:sonia.lodoviche...@ericsson.com] Sorry about being unclear What I need is either the absolute or relative path to the pom files. The reason why I need this is because we are using clearcase and we would like to use the funtionality of the versions plugin, but we need to check-out all of the pom files of our project first. That sounds like you just need to parse the pom.xml file and get the /project/modules/module elements. Something like mvn -q help:evaluate -Dexpression=project.modules might make that easier, but it doesn't work. (-q turns off all output, but without it maven displays lots of other stuff) eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Get a list of POMs
If you're in a Maven plugin then resolving the project path is easy... are you in a plugin or are you trying to do this from the command line etc. As Wendy stated, please cite your requirement in goal terms and then I'm sure the list will be of greater utility to you. Kind regards, Christopher - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Defining a project name when creating it from an archetype.
Hi there! I'm building an archetype and one thing that I need to take in account when creating an instance of the archetype is the directory's name generated. This is important because the artifact generated will be used in another system that the name is important. Is there way to force the articfactId to be a format like my-articfact*-hook*? The bold part is that is important for me. Thanks in advance Thiago Moreira
RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?
-Original Message- From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] Sent: Tuesday, December 07, 2010 10:11 AM To: Maven Users List Subject: Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds? Of course, developers never need to run deploy goal in the first place. Anyhow, it's a commonly used practice to deploy to different locations. Create a release profile and override the distributionManagement section as needed, for example see http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml. Ok, so when the release team runs an incremental build (not a release yet), they'll do something like this: mvn -P releaseIncremental deploy Where releaseIncremental is the profile I defined with a distributionManagement element? I tried this, but it's complaining thusly (changed project name): [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project myproject: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter - [Help 1] This is the profile I added (changed hostname): profile idreleaseIncremental/id distributionManagement snapshotRepository idnexus/id urlhttp://myhost:8081/nexus/content/groups/public/url /snapshotRepository /distributionManagement repositories repository idcentral/id urlhttp://central/url releasesenabledtrue/enabled/releases snapshotsenabledtrue/enabled/snapshots /repository /repositories pluginRepositories pluginRepository idcentral/id urlhttp://central/url releasesenabledtrue/enabled/releases snapshotsenabledtrue/enabled/snapshots /pluginRepository /pluginRepositories /profile I tried a simple-minded fix and added the following before the snapshotRepository element, but it gave the same error: repository idnexus/id urlhttp://myhost:8081/nexus/content/groups/public/url /repository On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) dk0...@att.com wrote: I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Defining a project name when creating it from an archetype.
Hi Thiago: For starters let me take a guess and say that the liferay archetypes will soon have a new addition? Secondly, I am no archetype expert but I'm guessing by the docs at guide-creating-archetypeshttp://maven.apache.org/guides/mini/guide-creating-archetypes.html you could simply add the desired extension following the artifactId property in the prototype POM. For example: artifactId${artifactId}-hook/artifactId This would have the drawback of users who actually follow the required naming convention of hooks ending up with an artifactId of my-artifact-hook-hook. Of course users who encounter the aforementioned drawback would likely regenerate without the convention and end up with a nicely named artifact. I have not tried this but it may be an option for you. -Ryan On Tue, Dec 7, 2010 at 6:35 PM, Thiago Moreira (timba) tmoreira2...@gmail.com wrote: Hi there! I'm building an archetype and one thing that I need to take in account when creating an instance of the archetype is the directory's name generated. This is important because the artifact generated will be used in another system that the name is important. Is there way to force the articfactId to be a format like my-articfact*-hook*? The bold part is that is important for me. Thanks in advance Thiago Moreira -- �...@n
Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds?
Commonly used practice? Really? I don't think so. Are the users supposed to enable different snapshot repos depending on what type of snapshot artifacts the want to use? Seems very complicated and error prone to me and simply just to difficult for the users to get right. /Anders On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen kalle.o.korho...@gmail.comwrote: Of course, developers never need to run deploy goal in the first place. Anyhow, it's a commonly used practice to deploy to different locations. Create a release profile and override the distributionManagement section as needed, for example see http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml. Kalle On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) dk0...@att.com wrote: I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?
-Original Message- From: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] On Behalf Of Anders Hammar Sent: Tuesday, December 07, 2010 9:49 PM To: Maven Users List Subject: Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds? Commonly used practice? Really? I don't think so. Are the users supposed to enable different snapshot repos depending on what type of snapshot artifacts the want to use? Seems very complicated and error prone to me and simply just to difficult for the users to get right. I took his statement to mean that developers use a default profile that's defined in a common place, and release management builds uses specialized profiles that do alternate deployments. On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen kalle.o.korho...@gmail.comwrote: Of course, developers never need to run deploy goal in the first place. Anyhow, it's a commonly used practice to deploy to different locations. Create a release profile and override the distributionManagement section as needed, for example see http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml. Kalle On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) dk0...@att.com wrote: I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? --- -- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds?
Still, I don't see this as common practice. First, developer don't normally do mvn deploy. If they do, they most likely want to deploy the snapshot for everyone to use. Secondly, you should be restricting the possibility of doing deploys through authorization. /Anders On Wed, Dec 8, 2010 at 08:02, KARR, DAVID (ATTSI) dk0...@att.com wrote: -Original Message- From: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] On Behalf Of Anders Hammar Sent: Tuesday, December 07, 2010 9:49 PM To: Maven Users List Subject: Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds? Commonly used practice? Really? I don't think so. Are the users supposed to enable different snapshot repos depending on what type of snapshot artifacts the want to use? Seems very complicated and error prone to me and simply just to difficult for the users to get right. I took his statement to mean that developers use a default profile that's defined in a common place, and release management builds uses specialized profiles that do alternate deployments. On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen kalle.o.korho...@gmail.comwrote: Of course, developers never need to run deploy goal in the first place. Anyhow, it's a commonly used practice to deploy to different locations. Create a release profile and override the distributionManagement section as needed, for example see http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml. Kalle On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) dk0...@att.com wrote: I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? --- -- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds?
The commonness of the practice is hardly the point of this thread so it baffles me why you'd want to start arguing about it, but there is a specific distributionManagement section in the release profiles of Apaches', Codehaus' parent poms and in the parent pom I linked to so I offered a tried and widely used solution to the questioner. There's nothing difficult for users in it. Kalle On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar and...@hammar.net wrote: Commonly used practice? Really? I don't think so. Are the users supposed to enable different snapshot repos depending on what type of snapshot artifacts the want to use? Seems very complicated and error prone to me and simply just to difficult for the users to get right. /Anders On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen kalle.o.korho...@gmail.comwrote: Of course, developers never need to run deploy goal in the first place. Anyhow, it's a commonly used practice to deploy to different locations. Create a release profile and override the distributionManagement section as needed, for example see http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml. Kalle On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) dk0...@att.com wrote: I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to have release management incremental (or release) builds publish to Nexus, but not user builds?
I'm arguing as I think you're sending the questioner off into the wilderness by suggesting something you call common practice, which I do not see as common practice. I'm just trying to stop someone not being a Maven expert from going down a difficult path where he/she would run into all kinds of strange behavior. I've checked both the apache parent and the codehaus parent I can't find what you're talking about. http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom http://repo2.maven.org/maven2/org/codehaus/codehaus-parent/3/codehaus-parent-3.pom /Anders On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen kalle.o.korho...@gmail.comwrote: The commonness of the practice is hardly the point of this thread so it baffles me why you'd want to start arguing about it, but there is a specific distributionManagement section in the release profiles of Apaches', Codehaus' parent poms and in the parent pom I linked to so I offered a tried and widely used solution to the questioner. There's nothing difficult for users in it. Kalle On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar and...@hammar.net wrote: Commonly used practice? Really? I don't think so. Are the users supposed to enable different snapshot repos depending on what type of snapshot artifacts the want to use? Seems very complicated and error prone to me and simply just to difficult for the users to get right. /Anders On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen kalle.o.korho...@gmail.com wrote: Of course, developers never need to run deploy goal in the first place. Anyhow, it's a commonly used practice to deploy to different locations. Create a release profile and override the distributionManagement section as needed, for example see http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml. Kalle On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) dk0...@att.com wrote: I'm working on strategies to convert a large and complex Ant build system to use Maven. I'm assuming that developers who are working on individual modules will do a build that pulls the artifacts of other modules (that they're not working on) from the Nexus repository we have running on an intranet server. These will be both release artifacts and snapshot artifacts. I also assume that incremental builds performed by the release management team will publish snapshot artifacts to the Nexus repository, but builds performed by developers will not publish to the Nexus repository. Is this reasonable? If so, what mechanisms do I have to have in place to make release management builds publish artifacts to Nexus, but not developer builds? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org