Joakim Zetterberg/H00JZG/HK_ITLOG/BORÅS/ICA/ SE is out of the office.
I will be out of the office starting 2009-08-17 and will not return until 2010-01-25. Jag har semester och därefter föräldraledigt. Gäller det något kring TH2, EPP (Harry Boy, Rikstoto eller Telefonkort) eller e-kupong kan ni kontakta Magnus Grönbek, alternativt Magnus Jägmark. ATTENTION: This e-mail may contain confidential information that is intended solely for the addressee. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.
Re: JAR file downloading blocked
What you should do is set up Nexus to proxy central (repo1.maven.org). Then configure your maven clients to use the nexus instance instead of going directly to central (or any public mirror). There different ways of doing this, at least one is outlined in the Nexus book by Sonatype. Have a look there. /Anders On Thu, Aug 27, 2009 at 23:49, Hilco Wijbenga hilco.wijbe...@gmail.comwrote: 2009/8/27 Alexander the.malk...@gmail.com: Wow, maybe you should talk with your sysops? That feels too much like fighting windmills. :-) 2009/8/28 Hilco Wijbenga hilco.wijbe...@gmail.com I work at a large company with a Maven 1(!) setup. The team I work in wanted to set up a nice environment with Maven 2, Hudson and Nexus but as it turns out JAR file downloading is blocked by the firewall. Is there any way to work around this? Actually, as it turns out things are not as clear-cut as I initially thought. wget http://mirrors.ibiblio.org/pub/mirrors/maven/jetty/jars/jetty-4.2.10.jar --- works wget http://repo1.maven.org/maven2/jetty/jetty/4.2.10/jetty-4.2.10.jar --- does not work So I also tried wget http://mirrors.ibiblio.org/pub/mirrors/maven2/jetty/jetty/4.2.10/jetty-4.2.10.jar and, guess what: that works! So I've added iBiblio as a mirror of Central and it all works. Eat that, firewall! ;-) - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven commandline
Hi, I am newbie to MAVEN. However I have knowledge about Ant. In ant we can call various targets from command line saying ant myserver.deploy, ant myserver.undeploy etc. I want similar behaviour with Maven, that means I should be entering on command line something like this -- mvn myserver.deploy, mvn myserver.undeploy etc. Basically, I need to call corrosponding ANT tasks from maven using maven.antrun plugin, based on user input. Anyone has used similar feature? Thanks in advance, Renuka Kale ** This e-mail transmission and any attachments that accompany it may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law and is intended solely for the use of the individual(s) to whom it was intended to be addressed. If you have received this e-mail by mistake, or you are not the intended recipient, any disclosure, dissemination, distribution, copying or other use or retention of this communication or its substance is prohibited. If you have received this communication in error, please immediately reply to the author via e-mail that you received this message by mistake and also permanently delete the original and all copies of this e-mail and any attachments from your computer. Thank you. **
Re: maven commandline
Hi, In my company we used something like that http://ionixx.wordpress.com/2008/03/10/running-specified-ant-tasks-within-maven2-outside-the-lifecycle/ [?] I hope this will help you. 2009/8/28 renuka.k...@marsh.com Hi, I am newbie to MAVEN. However I have knowledge about Ant. In ant we can call various targets from command line saying ant myserver.deploy, ant myserver.undeploy etc. I want similar behaviour with Maven, that means I should be entering on command line something like this -- mvn myserver.deploy, mvn myserver.undeploy etc. Basically, I need to call corrosponding ANT tasks from maven using maven.antrun plugin, based on user input. Anyone has used similar feature? Thanks in advance, Renuka Kale ** This e-mail transmission and any attachments that accompany it may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law and is intended solely for the use of the individual(s) to whom it was intended to be addressed. If you have received this e-mail by mistake, or you are not the intended recipient, any disclosure, dissemination, distribution, copying or other use or retention of this communication or its substance is prohibited. If you have received this communication in error, please immediately reply to the author via e-mail that you received this message by mistake and also permanently delete the original and all copies of this e-mail and any attachments from your computer. Thank you. ** -- Regards, Alexander
Re: maven commandline
I guess you could use profiles for that. However, what I'm thinking is that you might be trying to force a ant behavior into Maven and by doing so missing the idea behind maven. What is that you really are trying to do? You want to deploy to a server and undeploy from that server? /Anders On Fri, Aug 28, 2009 at 08:43, renuka.k...@marsh.com wrote: Hi, I am newbie to MAVEN. However I have knowledge about Ant. In ant we can call various targets from command line saying ant myserver.deploy, ant myserver.undeploy etc. I want similar behaviour with Maven, that means I should be entering on command line something like this -- mvn myserver.deploy, mvn myserver.undeploy etc. Basically, I need to call corrosponding ANT tasks from maven using maven.antrun plugin, based on user input. Anyone has used similar feature? Thanks in advance, Renuka Kale ** This e-mail transmission and any attachments that accompany it may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law and is intended solely for the use of the individual(s) to whom it was intended to be addressed. If you have received this e-mail by mistake, or you are not the intended recipient, any disclosure, dissemination, distribution, copying or other use or retention of this communication or its substance is prohibited. If you have received this communication in error, please immediately reply to the author via e-mail that you received this message by mistake and also permanently delete the original and all copies of this e-mail and any attachments from your computer. Thank you. **
Re: maven commandline
deploy / undeploy are just examples, basically I should be able to add anything outside regular lifecycle the way ANT targets work Thanks, Renuka Kale Desk : +91 20 6641 6341 Cell: +91 9822824443 Anders Hammar and...@hammar.net Sent by: anders.g.ham...@gmail.com 08/28/2009 12:31 PM Please respond to Maven Users List users@maven.apache.org To Maven Users List users@maven.apache.org cc Subject Re: maven commandline I guess you could use profiles for that. However, what I'm thinking is that you might be trying to force a ant behavior into Maven and by doing so missing the idea behind maven. What is that you really are trying to do? You want to deploy to a server and undeploy from that server? /Anders On Fri, Aug 28, 2009 at 08:43, renuka.k...@marsh.com wrote: Hi, I am newbie to MAVEN. However I have knowledge about Ant. In ant we can call various targets from command line saying ant myserver.deploy, ant myserver.undeploy etc. I want similar behaviour with Maven, that means I should be entering on command line something like this -- mvn myserver.deploy, mvn myserver.undeploy etc. Basically, I need to call corrosponding ANT tasks from maven using maven.antrun plugin, based on user input. Anyone has used similar feature? Thanks in advance, Renuka Kale ** This e-mail transmission and any attachments that accompany it may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law and is intended solely for the use of the individual(s) to whom it was intended to be addressed. If you have received this e-mail by mistake, or you are not the intended recipient, any disclosure, dissemination, distribution, copying or other use or retention of this communication or its substance is prohibited. If you have received this communication in error, please immediately reply to the author via e-mail that you received this message by mistake and also permanently delete the original and all copies of this e-mail and any attachments from your computer. Thank you. ** To: Maven Users List users@maven.apache.org cc: From: anders.g.ham...@gmail.com
Maven If else
Hi, Has anyone used conditional code with if else in maven scripts inside ant antfile=build.xml/ant tag?. I am newbie in Maven. I need to know the syntax. I tried using j:choose however it says - The ant type doesn't support the nested j:choose element. Thanks, Renuka Kale
Re: Maven If else
By using maven profiles you may obtain the same effect.
Re: maven commandline
Look link I sent you. You could use profiles. 2009/8/28 renuka.k...@marsh.com deploy / undeploy are just examples, basically I should be able to add anything outside regular lifecycle the way ANT targets work Thanks, Renuka Kale Desk : +91 20 6641 6341 Cell: +91 9822824443 Anders Hammar and...@hammar.net Sent by: anders.g.ham...@gmail.com 08/28/2009 12:31 PM Please respond to Maven Users List users@maven.apache.org To Maven Users List users@maven.apache.org cc Subject Re: maven commandline I guess you could use profiles for that. However, what I'm thinking is that you might be trying to force a ant behavior into Maven and by doing so missing the idea behind maven. What is that you really are trying to do? You want to deploy to a server and undeploy from that server? /Anders On Fri, Aug 28, 2009 at 08:43, renuka.k...@marsh.com wrote: Hi, I am newbie to MAVEN. However I have knowledge about Ant. In ant we can call various targets from command line saying ant myserver.deploy, ant myserver.undeploy etc. I want similar behaviour with Maven, that means I should be entering on command line something like this -- mvn myserver.deploy, mvn myserver.undeploy etc. Basically, I need to call corrosponding ANT tasks from maven using maven.antrun plugin, based on user input. Anyone has used similar feature? Thanks in advance, Renuka Kale ** This e-mail transmission and any attachments that accompany it may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law and is intended solely for the use of the individual(s) to whom it was intended to be addressed. If you have received this e-mail by mistake, or you are not the intended recipient, any disclosure, dissemination, distribution, copying or other use or retention of this communication or its substance is prohibited. If you have received this communication in error, please immediately reply to the author via e-mail that you received this message by mistake and also permanently delete the original and all copies of this e-mail and any attachments from your computer. Thank you. ** To: Maven Users List users@maven.apache.org cc: From: anders.g.ham...@gmail.com -- Regards, Alexander
Re: Maven If else
Hi Renuka, renuka.k...@marsh.com wrote at Freitag, 28. August 2009 10:29: Hi, Has anyone used conditional code with if else in maven scripts inside ant antfile=build.xml/ant tag?. I am newbie in Maven. I need to know the syntax. I tried using j:choose however it says - The ant type doesn't support the nested j:choose element. Maybe you should first grok what Maven does. Maven is not Ant, has a complete different model and does work more different than one might think in first place. You seem to try simply to transfrom an Ant build 1:1 to Maven - I assure you, you will not have a lot of fun with Maven, simply because it is not made for this. It's like using Word as PowerPoint replacement. It is possible, but limited and definitely no fun. Therefore, get first familiar with Maven's concepts: 1 project for 1 artifact, the build lifecycle and the dependency management. Avoid the antrun plugin in first place - it should be used only for very specialized tasks. To get you a picture e.g. our Maven build contains about ~300 projects and ~5 of them use Ant tasks. It is normally simply not necessary. If you don't intent to follow any Maven standards, you might as well stop using Maven, because it will not bring any value to you and your organization. Kind regards, Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven If else
Thanks, appreciate your inputs! Jörg Schaible joerg.schai...@gmx.de Sent by: news n...@ger.gmane.org 08/28/2009 03:14 PM Please respond to Maven Users List users@maven.apache.org To users@maven.apache.org cc Subject Re: Maven If else Hi Renuka, renuka.k...@marsh.com wrote at Freitag, 28. August 2009 10:29: Hi, Has anyone used conditional code with if else in maven scripts inside ant antfile=build.xml/ant tag?. I am newbie in Maven. I need to know the syntax. I tried using j:choose however it says - The ant type doesn't support the nested j:choose element. Maybe you should first grok what Maven does. Maven is not Ant, has a complete different model and does work more different than one might think in first place. You seem to try simply to transfrom an Ant build 1:1 to Maven - I assure you, you will not have a lot of fun with Maven, simply because it is not made for this. It's like using Word as PowerPoint replacement. It is possible, but limited and definitely no fun. Therefore, get first familiar with Maven's concepts: 1 project for 1 artifact, the build lifecycle and the dependency management. Avoid the antrun plugin in first place - it should be used only for very specialized tasks. To get you a picture e.g. our Maven build contains about ~300 projects and ~5 of them use Ant tasks. It is normally simply not necessary. If you don't intent to follow any Maven standards, you might as well stop using Maven, because it will not bring any value to you and your organization. Kind regards, Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org To: users@maven.apache.org cc: From: news n...@ger.gmane.org
Re: (maven.)apache.org down
hmm... I got this: *.apache.org is currently offline. No ETA for resumption of services is available. On Fri, Aug 28, 2009 at 5:24 PM, Stevo Slavić ssla...@gmail.com wrote: Hello maven users, Is (maven.)apache.org down or is it just my network connectivity? Regards, Stevo. -- - juven
(maven.)apache.org down
Hello maven users, Is (maven.)apache.org down or is it just my network connectivity? Regards, Stevo.
bug on the m2 plugin
Hi , i have in April the this problem between M2 Plugin and Maven:- http://www.nabble.com/M2-and-Eclipse-td23195404.html. Can you say, have you any changed? Re : Re : Re : Re : M2 and Eclipse Click to flag this post javascript: void Nabble.setFlag(23198803); by Julien HENRY http://www.nabble.com/user/UserProfile.jtp?user=76762 Apr 23, 2009; 04:46pm :: Rate this Message: http://www.nabble.com/M2-and-Eclipse-td23195404.html# http://www.nabble.com/M2-and-Eclipse-td23195404.html# http://www.nabble.com/M2-and-Eclipse-td23195404.html# http://www.nabble.com/M2-and-Eclipse-td23195404.html# http://www.nabble.com/M2-and-Eclipse-td23195404.html# http://www.nabble.com/M2-and-Eclipse-td23195404.html# http://www.nabble.com/M2-and-Eclipse-td23195404.html#- Use ratings to moderate (? http://www.nabble.com/help/Answer.jtp?id=16) Reply http://www.nabble.com/forum/Reply.jtp?post=23198803 | Reply to Author http://www.nabble.com/user/SendEmail.jtp?type=pmpost=23198803 | Print http://www.nabble.com/forum/PrintPost.jtp?post=23198803 | View Threaded javascript: void Nabble.setView('newthreaded',23198803); | Show Only this Message http://www.nabble.com/Re-%3A-Re-%3A-Re-%3A-Re-%3A-M2-and-Eclipse-p23198803.html Good point. According to me, *m2eclipse* should rely on servlet API version instead of Java version. Perhaps should you open a bug on *m2eclipse* tracker: https://issues.sonatype.org/browse/MNGECLIPSE Regards, Julien - Message d'origine De : Alexander *Vaysberg* w...@... http://www.nabble.com/user/SendEmail.jtp?type=postpost=23198803i=0 À : Maven Users List us...@... http://www.nabble.com/user/SendEmail.jtp?type=postpost=23198803i=1 Envoyé le : Jeudi, 23 Avril 2009, 15h30mn 44s Objet : Re: Re : Re : Re : *M2* *and* Eclipse but, if i have a *project* with 1.5 jdk *and* must using the 2.4 *web* server? Julien HENRY schrieb: It seems that if in maven-compiler-*plugin* configuration you have source1.5/source target1.5/target then the *web* version will be 2.5. See the mapping file here: http://svn.sonatype.org/*m2eclipse*/branches/raghu/org.maven.ide.eclipse.wtp.*facet*/src/org/maven/ide/eclipse/wtp/*facet*/jst.*web*.properties http://svn.sonatype.org/m2eclipse/branches/raghu/org.maven.ide.eclipse.wtp.facet/src/org/maven/ide/eclipse/wtp/facet/jst.web.properties Regards - Message d'origine De : Alexander *Vaysberg* w...@... http://www.nabble.com/user/SendEmail.jtp?type=postpost=23198803i=2 À : Maven Users List us...@... http://www.nabble.com/user/SendEmail.jtp?type=postpost=23198803i=3 Envoyé le : Jeudi, 23 Avril 2009, 15h10mn 19s Objet : Re: Re : Re : *M2* *and* Eclipse ok, *and* how I can it's management? Julien HENRY schrieb: *Forgot* my previous message. According to [1] it seems it is not based on servlet-api version but on compiler version. [1] : http://docs.codehaus.org/display/*M2ECLIPSE*/Maven+To+WTP http://docs.codehaus.org/display/M2ECLIPSE/Maven+To+WTP Julien - Message d'origine De : Julien HENRY henr...@... http://www.nabble.com/user/SendEmail.jtp?type=postpost=23198803i=4 À : Maven Users List us...@... http://www.nabble.com/user/SendEmail.jtp?type=postpost=23198803i=5 Envoyé le : Jeudi, 23 Avril 2009, 14h11mn 11s Objet : Re : *M2* *and* Eclipse Hi, Do you have declared servlet-api as a dependency in your pom? If yes, which version? Regards, Julien - Message d'origine De : Alexander *Vaysberg* w...@... http://www.nabble.com/user/SendEmail.jtp?type=postpost=23198803i=6 À : Maven Users List us...@... http://www.nabble.com/user/SendEmail.jtp?type=postpost=23198803i=7 Envoyé le : Jeudi, 23 Avril 2009, 13h55mn 55s Objet : *M2* *and* Eclipse Hi, i have a Problem with *M2Plugin* in Eclipse. If I generate the *project* with mvn eclipse:*m2eclipse* then the org.eclipse.wst.common.*project*.*facet*.core.xml has : *faceted*-*project* fixed *facet*=jst.java/ fixed *facet*=jst.*web*/ installed *facet*=jst.*web* version=2.4/ installed *facet*=jst.java version=5..0/ /*faceted*-*project* But, if I used the in Eclipse Update *Project* Configuration than I have: ?xml version=1.0 encoding=UTF-8? *faceted*-*project* fixed *facet*=jst.java/ fixed *facet*=jst.*web*/ installed *facet*=jst..java version=5.0/ installed *facet*=jst.*web* version=2.5/ /*faceted*-*project* The Problem ist jst.*web* version=2.5. I use Tomcat 5.5(Tomcat version 5.5 only supports J2EE 1..2, 1.3, *and* 1.4 *Web* modules).. Tomcat 5.5 is 2.4. How can I it configuration, that is the same if I it Update *Project* Configuration. Alexander *Vaysberg* - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: FW: basic doubts
Hi Everybody, My problems is some what similar one, new to maven and i have installed M2, create a projects with all its dependencies on a system which is having internet and it works fine. Now the problem my team members (does not have internet and) they have to point to the my local repository as thier remote repository. Now how to set this configurations. Maven everywhere telling about remo/local repositories, but i am not getting the confiruation regarding the this.. Please suggest on this, thanks in advance... Rds, --Rafi-- On Thu, Aug 20, 2009 at 7:19 AM, Ben Caradoc-Davies ben.caradoc-dav...@csiro.au wrote: Sammaiah Nagapuri wrote: org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.apache.maven.plugins:maven-resources-plugin': Not a v4. 0.0 POM. for project org.apache.maven.plugins:maven-resources-plugin at C:\Documents and Settings\sammaiah.nagapuri\.m2\repository\org\apache\maven\plu gins\maven-resources-plugin\2.3\maven-resources-plugin-2.3.pom Does this repository POM file look like a valid POM file? Did you use the same version on Maven to create the repository? What is your Maven version? Kind regards, -- Ben Caradoc-Davies ben.caradoc-dav...@csiro.au Software Engineer, CSIRO Exploration and Mining Australian Resources Research Centre 26 Dick Perry Ave, Kensington WA 6151, Australia - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: FW: basic doubts
On browsing, i got that i have the following. Is this way a correct one? Is there any other better way? http://dotal.wordpress.com/2007/02/26/setup-internal-maven-repository/ Download maven-proxy http://maven-proxy.codehaus.org/Home from codehaus. Follow the instructions to setup a manual instance. Modify the default properties file in the maven-proxy directory.. See the attached maven-proxy.doc for a sample. Save this file and change the extension to .properties. You will need to change the name and prefix of your proxy if you don’t like MyRepo. maven-proxy properties filehttp://dotal.files.wordpress.com/2007/02/maven-proxy.doc Create a startProxy.bat file instead of manually typing “java -jar….” every time. My batch file contains the following line: java -jar maven-proxy-standalone-0.2-app.jar maven-proxy.properties Configure the .bat file from the previous step to startup when the machine starts. I put the bat file in my Startup folder. Run the startProxy.bat file and verify startup Configure your dev machine to work with the proxy by editing your settings.xml. See the attached ClientRepoSettings.doc document for a sample of configuring your client machine. Maven settings.xml filehttp://dotal.files.wordpress.com/2007/02/clientreposettings.doc Clean out your local .m2 repository Clean and compile your project to verify that all artifacts are being pulled down from the proxy. You can check the proxy window output to verify that the artifacts are going through the proxy. On Fri, Aug 28, 2009 at 4:28 PM, Stuff_Me stuffme.h...@gmail.com wrote: Hi Everybody, My problems is some what similar one, new to maven and i have installed M2, create a projects with all its dependencies on a system which is having internet and it works fine. Now the problem my team members (does not have internet and) they have to point to the my local repository as thier remote repository. Now how to set this configurations. Maven everywhere telling about remo/local repositories, but i am not getting the confiruation regarding the this.. Please suggest on this, thanks in advance... Rds, --Rafi-- On Thu, Aug 20, 2009 at 7:19 AM, Ben Caradoc-Davies ben.caradoc-dav...@csiro.au wrote: Sammaiah Nagapuri wrote: org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.apache.maven.plugins:maven-resources-plugin': Not a v4. 0.0 POM. for project org.apache.maven.plugins:maven-resources-plugin at C:\Documents and Settings\sammaiah.nagapuri\.m2\repository\org\apache\maven\plu gins\maven-resources-plugin\2.3\maven-resources-plugin-2.3.pom Does this repository POM file look like a valid POM file? Did you use the same version on Maven to create the repository? What is your Maven version? Kind regards, -- Ben Caradoc-Davies ben.caradoc-dav...@csiro.au Software Engineer, CSIRO Exploration and Mining Australian Resources Research Centre 26 Dick Perry Ave, Kensington WA 6151, Australia - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: FW: basic doubts
There are better repository managers than that one. I strongly recommend Nexus by Sonatype, but there are others (Artifactory for instance). There is a comparison of repo managersonline here: http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Feature+Matrix /Anders On Fri, Aug 28, 2009 at 13:10, Stuff_Me stuffme.h...@gmail.com wrote: On browsing, i got that i have the following. Is this way a correct one? Is there any other better way? http://dotal.wordpress.com/2007/02/26/setup-internal-maven-repository/ Download maven-proxy http://maven-proxy.codehaus.org/Home from codehaus. Follow the instructions to setup a manual instance. Modify the default properties file in the maven-proxy directory.. See the attached maven-proxy.doc for a sample. Save this file and change the extension to .properties. You will need to change the name and prefix of your proxy if you don’t like MyRepo. maven-proxy properties filehttp://dotal.files.wordpress.com/2007/02/maven-proxy.doc Create a startProxy.bat file instead of manually typing “java -jar….” every time. My batch file contains the following line: java -jar maven-proxy-standalone-0.2-app.jar maven-proxy.properties Configure the .bat file from the previous step to startup when the machine starts. I put the bat file in my Startup folder. Run the startProxy.bat file and verify startup Configure your dev machine to work with the proxy by editing your settings.xml. See the attached ClientRepoSettings.doc document for a sample of configuring your client machine. Maven settings.xml filehttp://dotal.files.wordpress.com/2007/02/clientreposettings.doc Clean out your local .m2 repository Clean and compile your project to verify that all artifacts are being pulled down from the proxy. You can check the proxy window output to verify that the artifacts are going through the proxy. On Fri, Aug 28, 2009 at 4:28 PM, Stuff_Me stuffme.h...@gmail.com wrote: Hi Everybody, My problems is some what similar one, new to maven and i have installed M2, create a projects with all its dependencies on a system which is having internet and it works fine. Now the problem my team members (does not have internet and) they have to point to the my local repository as thier remote repository. Now how to set this configurations. Maven everywhere telling about remo/local repositories, but i am not getting the confiruation regarding the this.. Please suggest on this, thanks in advance... Rds, --Rafi-- On Thu, Aug 20, 2009 at 7:19 AM, Ben Caradoc-Davies ben.caradoc-dav...@csiro.au wrote: Sammaiah Nagapuri wrote: org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.apache.maven.plugins:maven-resources-plugin': Not a v4. 0.0 POM. for project org.apache.maven.plugins:maven-resources-plugin at C:\Documents and Settings\sammaiah.nagapuri\.m2\repository\org\apache\maven\plu gins\maven-resources-plugin\2.3\maven-resources-plugin-2.3.pom Does this repository POM file look like a valid POM file? Did you use the same version on Maven to create the repository? What is your Maven version? Kind regards, -- Ben Caradoc-Davies ben.caradoc-dav...@csiro.au Software Engineer, CSIRO Exploration and Mining Australian Resources Research Centre 26 Dick Perry Ave, Kensington WA 6151, Australia - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: AW: Executing Dependency pom.xml
In that case you can just write a parent POM which contains both projects as module, and Maven will figure out how to build them. Best regards, Eric -Ursprüngliche Nachricht- Von: bandrm [mailto:rajivband...@gmail.com] Gesendet: Donnerstag, 27. August 2009 18:52 An: users@maven.apache.org Betreff: Re: AW: Executing Dependency pom.xml Yes, project B does contain Java classes, it is packagingjar/packaging. Thanks Lewis, Eric-2 wrote: Hi I think your message is a bit confusing. Is project B a JAR type (does the project contain Java classes?) or just a POM type (contains only a pom.xml)? Best regards, Eric -Ursprüngliche Nachricht- Von: bandrm [mailto:rajivband...@gmail.com] Gesendet: Donnerstag, 27. August 2009 01:02 An: users@maven.apache.org Betreff: Executing Dependency pom.xml Hello, I guess this is very elementary question, here it is. I have two projects, Project A (war type) and Project B (jar type). Project A is dependent on Project B. So, in Project A's pom.xml I mention Project B as dependent. Now, Project B has just pom.xml and has no jar file generated. How could I run Project B's pom.xml from Project A's pom.xml, so that Project B's jar file is generated and is available for Project A? Thanks -- View this message in context: http://www.nabble.com/Executing-Dependency-pom.xml-tp25163099p 25163099.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 - 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://www.nabble.com/Executing-Dependency-pom.xml-tp25163099p 25174675.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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: FW: basic doubts
Andres, So the steps i have added are correct way to resolve my problem, come to Nexus(repository manager) i am looking for the open source and i hope MAVEN-PROXY is sufficient for my requirements ( mentioned in first mail) Hoping MAVEN-PROXY is also a repo manager. Pls suggest on the same Thanks Rds, --Rafi-- On Fri, Aug 28, 2009 at 4:55 PM, Anders Hammar and...@hammar.net wrote: There are better repository managers than that one. I strongly recommend Nexus by Sonatype, but there are others (Artifactory for instance). There is a comparison of repo managersonline here: http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Feature+Matrix /Anders On Fri, Aug 28, 2009 at 13:10, Stuff_Me stuffme.h...@gmail.com wrote: On browsing, i got that i have the following. Is this way a correct one? Is there any other better way? http://dotal.wordpress.com/2007/02/26/setup-internal-maven-repository/ Download maven-proxy http://maven-proxy.codehaus.org/Home from codehaus. Follow the instructions to setup a manual instance. Modify the default properties file in the maven-proxy directory.. See the attached maven-proxy.doc for a sample. Save this file and change the extension to .properties. You will need to change the name and prefix of your proxy if you don’t like MyRepo. maven-proxy properties filehttp://dotal.files.wordpress.com/2007/02/maven-proxy.doc Create a startProxy.bat file instead of manually typing “java -jar….” every time. My batch file contains the following line: java -jar maven-proxy-standalone-0.2-app.jar maven-proxy.properties Configure the .bat file from the previous step to startup when the machine starts. I put the bat file in my Startup folder. Run the startProxy.bat file and verify startup Configure your dev machine to work with the proxy by editing your settings.xml. See the attached ClientRepoSettings.doc document for a sample of configuring your client machine. Maven settings.xml filehttp://dotal.files.wordpress.com/2007/02/clientreposettings.doc Clean out your local .m2 repository Clean and compile your project to verify that all artifacts are being pulled down from the proxy. You can check the proxy window output to verify that the artifacts are going through the proxy. On Fri, Aug 28, 2009 at 4:28 PM, Stuff_Me stuffme.h...@gmail.com wrote: Hi Everybody, My problems is some what similar one, new to maven and i have installed M2, create a projects with all its dependencies on a system which is having internet and it works fine. Now the problem my team members (does not have internet and) they have to point to the my local repository as thier remote repository. Now how to set this configurations. Maven everywhere telling about remo/local repositories, but i am not getting the confiruation regarding the this.. Please suggest on this, thanks in advance... Rds, --Rafi-- On Thu, Aug 20, 2009 at 7:19 AM, Ben Caradoc-Davies ben.caradoc-dav...@csiro.au wrote: Sammaiah Nagapuri wrote: org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.apache.maven.plugins:maven-resources-plugin': Not a v4. 0.0 POM. for project org.apache.maven.plugins:maven-resources-plugin at C:\Documents and Settings\sammaiah.nagapuri\.m2\repository\org\apache\maven\plu gins\maven-resources-plugin\2.3\maven-resources-plugin-2.3.pom Does this repository POM file look like a valid POM file? Did you use the same version on Maven to create the repository? What is your Maven version? Kind regards, -- Ben Caradoc-Davies ben.caradoc-dav...@csiro.au Software Engineer, CSIRO Exploration and Mining Australian Resources Research Centre 26 Dick Perry Ave, Kensington WA 6151, Australia - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: (maven.)apache.org down
Yes it's is down :http://monitoring.apache.org/status/ On Fri, Aug 28, 2009 at 11:28 AM, Juven Xu ju...@sonatype.com wrote: hmm... I got this: *.apache.org is currently offline. No ETA for resumption of services is available. On Fri, Aug 28, 2009 at 5:24 PM, Stevo Slavić ssla...@gmail.com wrote: Hello maven users, Is (maven.)apache.org down or is it just my network connectivity? Regards, Stevo. -- - juven
Re: Multiple executions of goals under generate-sources: How to avoid?
Do you have a sample for doing that? It's your solution generic? I have a web services client application where I generate the artifact sources during the generate-sources phase. In order to import the latest version of the wsdl I try to kick-up a jetty server with the war produced by another module. The second execution of the jetty stops the build with error Address already in use. Thanks, Jozsef stug23 wrote: Lacking any other solution I went ahead and incorporated an internal Maven property that gets set at the end of the first code generation in the lifecycle. That way subsequent checks of the property provide an indication to skip code generation. This seems kind of kludgy but it works -- View this message in context: http://www.nabble.com/Multiple-executions-of-goals-under-generate-sources%3A-How-to-avoid--tp20038097p25188704.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: site plugin requiring maven-changes-plugin:pom:2.2-SNAPSHOT
Thanks Olivier, the parent pom actually mentions the changes plugin twice: in the plugins section, specifying version 2.1, and in the reporting section, where the version was actually missing. Defining the version, the problem was fixed (thank you). I then got a similar problem concerning the javadoc plugin, that I fixed likewise. Is there a way to specify the plugin only once in the POM and reuse the settings where needed? L Il giorno 27/ago/09, alle ore 17:33, Olivier Lamy ha scritto: Do you have a version in your pom for the changes plugin ? If not please add the released version : 2.1 Your proxies repo use what ?? 2009/8/27 Lorenzo Bigagli lorenzo.biga...@cnr.it: Hi, When issuing mvn site:site, I get an error about org.apache.maven.plugins:maven-changes-plugin:pom:2.2-SNAPSHOT being unreachable. But I can successfully use the changes plugin (version 2.1), for example as in mvn changes:changes-validate. Is the site plugin requiring the 2.2-SNAPSHOT version of the plugin? Why is that? Can I force it to stick to the stable version? Thanks for helping. Here is the output I get: pan:lablib-checkboxtree bigagli$ mvn site:site [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'site'. [INFO] [INFO] Building CheckboxTree [INFO]task-segment: [site:site] [INFO] [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.maven.plugins:maven-changes-plugin Reason: Error getting POM for 'org.apache.maven.plugins:maven-changes-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.apache.maven.plugins:maven-changes-plugin:pom:2.2-SNAPSHOT from the specified remote repositories: proxied.repos (http://ulisse.pin.unifi.it:8081/nexus/content/groups/proxied.repos), hosted.repos (http://ulisse.pin.unifi.it:8081/nexus/content/groups/hosted.repos), maven-repository.dev.java.net (http://download.java.net/maven/1) for project org.apache.maven.plugins:maven-changes-plugin [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 2 seconds [INFO] Finished at: Thu Aug 27 17:24:00 CEST 2009 [INFO] Final Memory: 18M/252M [INFO] - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Olivier - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --- Dott. Lorenzo Bigagli Istituto di Metodologie per l'Analisi Ambientale del Consiglio Nazionale delle Ricerche (IMAA-CNR) i: Area della Ricerca di Potenza, Contrada Santa Loja Zona Industriale, 85050 Tito Scalo (PZ), Italia t: +39 0971 427221 f: +39 0971 427222 m: lorenzo.biga...@cnr.it - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: FW: basic doubts
Do not use maven-proxy! That is a dead project. Any of those mentioned in the link provided by Anders should be sufficient. They are all open source (Nexus also has a Pro version which costs money). I use and have been happy with Nexus, YMMV. ~Daniel -Original Message- From: Stuff_Me [mailto:stuffme.h...@gmail.com] Sent: Friday, August 28, 2009 7:44 AM To: Maven Users List Cc: and...@hammar.net Subject: Re: FW: basic doubts Andres, So the steps i have added are correct way to resolve my problem, come to Nexus(repository manager) i am looking for the open source and i hope MAVEN-PROXY is sufficient for my requirements ( mentioned in first mail) Hoping MAVEN-PROXY is also a repo manager. Pls suggest on the same Thanks Rds, --Rafi-- On Fri, Aug 28, 2009 at 4:55 PM, Anders Hammar and...@hammar.net wrote: There are better repository managers than that one. I strongly recommend Nexus by Sonatype, but there are others (Artifactory for instance). There is a comparison of repo managersonline here: http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Fe ature+Matrix /Anders On Fri, Aug 28, 2009 at 13:10, Stuff_Me stuffme.h...@gmail.com wrote: On browsing, i got that i have the following. Is this way a correct one? Is there any other better way? http://dotal.wordpress.com/2007/02/26/setup-internal-maven-repositor y/ Download maven-proxy http://maven-proxy.codehaus.org/Home from codehaus. Follow the instructions to setup a manual instance. Modify the default properties file in the maven-proxy directory.. See the attached maven-proxy.doc for a sample. Save this file and change the extension to .properties. You will need to change the name and prefix of your proxy if you don't like MyRepo. maven-proxy properties filehttp://dotal.files.wordpress.com/2007/02/maven-proxy.doc Create a startProxy.bat file instead of manually typing java -jar every time. My batch file contains the following line: java -jar maven-proxy-standalone-0.2-app.jar maven-proxy.properties Configure the .bat file from the previous step to startup when the machine starts. I put the bat file in my Startup folder. Run the startProxy.bat file and verify startup Configure your dev machine to work with the proxy by editing your settings.xml. See the attached ClientRepoSettings.doc document for a sample of configuring your client machine. Maven settings.xml filehttp://dotal.files.wordpress.com/2007/02/clientreposettings.doc Clean out your local .m2 repository Clean and compile your project to verify that all artifacts are being pulled down from the proxy. You can check the proxy window output to verify that the artifacts are going through the proxy. On Fri, Aug 28, 2009 at 4:28 PM, Stuff_Me stuffme.h...@gmail.com wrote: Hi Everybody, My problems is some what similar one, new to maven and i have installed M2, create a projects with all its dependencies on a system which is having internet and it works fine. Now the problem my team members (does not have internet and) they have to point to the my local repository as thier remote repository. Now how to set this configurations. Maven everywhere telling about remo/local repositories, but i am not getting the confiruation regarding the this.. Please suggest on this, thanks in advance... Rds, --Rafi-- On Thu, Aug 20, 2009 at 7:19 AM, Ben Caradoc-Davies ben.caradoc-dav...@csiro.au wrote: Sammaiah Nagapuri wrote: org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.apache.maven.plugins:maven-resources-plugin': Not a v4. 0.0 POM. for project org.apache.maven.plugins:maven-resources-plugin at C:\Documents and Settings\sammaiah.nagapuri\.m2\repository\org\apache\maven\plu gins\maven-resources-plugin\2.3\maven-resources-plugin-2.3.pom Does this repository POM file look like a valid POM file? Did you use the same version on Maven to create the repository? What is your Maven version? Kind regards, -- Ben Caradoc-Davies ben.caradoc-dav...@csiro.au Software Engineer, CSIRO Exploration and Mining Australian Resources Research Centre 26 Dick Perry Ave, Kensington WA 6151, Australia - 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 do I get Maven to package ejb dependencies in the ear?
I am not sure, I get your problem. By default your EJB will not contain any jars and if you declare your EJB as dependency for your EAR the latter will contain the EJB as well as all transitive dependencies of this EJB. You are right. I made an erroneous assumption that EJBs would be similar to wars (again I'm new to maven and EJBs). However the question still holds for war projects. How do I get dependencies to be placed in the ear? The best I can come up with is to declare the dependencies in the ear project pom with a scope of compile, and then again in the war project pom, with a scope of provided. Or is there a configuration setting for the war plugin that will tell it to package dependencies in the ear? Thanks. Dave
maven jar plugin not including all the jars in the manifest.mf
I am trying to build jar, where i would need all the classpath entries in the manifest.mf, but the manifest.mf is not inlcluding the jars in the classpath (like testng.jar ). is there anything wrong in my configuration ? plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId configuration archive indextrue/index manifest addClasspathtrue/addClasspath Main-Classorg.testng.TestNG/Main-Class classpathPrefix/export/home/webdriver/lib/classpathPrefix /manifest /archive executions execution goals goaltest-jar/goal /goals /execution /executions /configuration /plugin /plugins -- View this message in context: http://www.nabble.com/maven-jar-plugin-not-including-all-the-jars-in-the-manifest.mf-tp25190308p25190308.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: Maven2 plugin execution sequence
:o( - ok thnaks i will do... Dan Tran wrote: not possible at moment, you may want to file a request to add pre-deploy phase -D On Thu, Aug 27, 2009 at 8:52 AM, claus437claus...@gmail.com wrote: Hi All I have created a little maven 2 plugin that i would like to run each time i do a mvn deploy. The problem is that it needs to be executed before the deploy phase but only if the deploy phase is to be executed in the build, so i can not just bind it to the install phase - and if i bind it to the deploy phase it will be executed afterwards. How do i accomplish this. thanks in advance Best regards Claus -- View this message in context: http://www.nabble.com/Maven2-plugin-execution-sequence-tp25172369p25172369.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 - 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://www.nabble.com/Maven2-plugin-execution-sequence-tp25172369p25190360.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: How do I get Maven to package ejb dependencies in the ear?
Hi David, David Sharp wrote at Freitag, 28. August 2009 15:40: I am not sure, I get your problem. By default your EJB will not contain any jars and if you declare your EJB as dependency for your EAR the latter will contain the EJB as well as all transitive dependencies of this EJB. You are right. I made an erroneous assumption that EJBs would be similar to wars (again I'm new to maven and EJBs). However the question still holds for war projects. By default all jars are embedded into the war's WEB-INF/lib folder. However, it is possible to keepthem out there and put them into the EAR, but it must be supported by the app server. There's an example in the maven-war-plugin docs. How do I get dependencies to be placed in the ear? The best I can come up with is to declare the dependencies in the ear project pom with a scope of compile, and then again in the war project pom, with a scope of provided. Because wars are normally self-contained they do not inherit their dependencies transitively. What you can do, however, is to declare in your ear not the war itself, but the war's pom file i.e. use type pom instead of war. This trick can be used to get all transitive dependencies of the war also. Or is there a configuration setting for the war plugin that will tell it to package dependencies in the ear? The war-plugin does not know anything about any other project that will use the resulting war artifact. As explained you have to declare the appropriate dependency in the ear's pom. However, you have to define a value for the property packagingExcludes in the war plugin's configuration to prevent the jars to be embedded into the war: configuration packagingExcludesWEB-INF/lib/**/packagingExcludes /configuration You can define more patterns by separating them with comma. Patterns are relative to the target/webapp directory as root where the plugin collects all files before they are packed as war. BTW: You have to ensure to use the latest version of the war-plugin for this. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How do I get Maven to package ejb dependencies in the ear?
Or is there a configuration setting for the war plugin that will tell it to package dependencies in the ear? Check the Maven Users Wiki for Skinny War or just Google for Maven skinny war. This topic is also discussed on this list now and then so search the archives at Nabble.com. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
M2Plugin put the test resources in jar.
Hi, I have a problem with maven. If I use the M2 Plugin with Resolve dependencies from Workspace projects, than include the maven in jar the test resources. Why? I want the jar without test resources, so same as in repository. M2 Plugin is 0.9.8. Alexander Vaysberg. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: basic doubts
nexus is GPL. is that open source enough for you ;-) nexus pro is the non open source version of nexus (dual license) Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 12:43, Stuff_Me stuffme.h...@gmail.com wrote: Andres, So the steps i have added are correct way to resolve my problem, come to Nexus(repository manager) i am looking for the open source and i hope MAVEN-PROXY is sufficient for my requirements ( mentioned in first mail) Hoping MAVEN-PROXY is also a repo manager. Pls suggest on the same Thanks Rds, --Rafi-- On Fri, Aug 28, 2009 at 4:55 PM, Anders Hammar and...@hammar.net wrote: There are better repository managers than that one. I strongly recommend Nexus by Sonatype, but there are others (Artifactory for instance). There is a comparison of repo managersonline here: http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Feature+Matrix /Anders On Fri, Aug 28, 2009 at 13:10, Stuff_Me stuffme.h...@gmail.com wrote: On browsing, i got that i have the following. Is this way a correct one? Is there any other better way? http://dotal.wordpress.com/2007/02/26/setup-internal-maven-repository/ Download maven-proxy http://maven-proxy.codehaus.org/Home from codehaus. Follow the instructions to setup a manual instance. Modify the default properties file in the maven-proxy directory.. See the attached maven-proxy.doc for a sample. Save this file and change the extension to .properties. You will need to change the name and prefix of your proxy if you don’t like MyRepo. maven-proxy properties filehttp://dotal.files.wordpress.com/2007/02/maven-proxy.doc Create a startProxy.bat file instead of manually typing “java -j ar….” every time. My batch file contains the following line: java -jar maven-proxy-standalone-0.2-app.jar maven-proxy.properties Configure the .bat file from the previous step to startup when the machine starts. I put the bat file in my Startup folder. Run the startProxy.bat file and verify startup Configure your dev machine to work with the proxy by editing your settings.xml. See the attached ClientRepoSettings.doc document for a sample of configuring your client machine. Maven settings.xml filehttp://dotal.files.wordpress.com/2007/02/ clientreposettings.doc Clean out your local .m2 repository Clean and compile your project to verify that all artifacts are being pulled down from the proxy. You can check the proxy window output to verify that the artifacts are going through the proxy. On Fri, Aug 28, 2009 at 4:28 PM, Stuff_Me stuffme.h...@gmail.com wrote: Hi Everybody, My problems is some what similar one, new to maven and i have installed M2, create a projects with all its dependencies on a system which is having internet and it works fine. Now the problem my team members (does not have internet and) they have to point to the my local repository as thier remote repository. Now how to set this configurations. Maven everywhere telling about remo/local repositories, but i am not getting the confiruation regarding the this.. Please suggest on this, thanks in advance... Rds, --Rafi-- On Thu, Aug 20, 2009 at 7:19 AM, Ben Caradoc-Davies ben.caradoc-dav...@csiro.au wrote: Sammaiah Nagapuri wrote: org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.apache.maven.plugins:maven-resources- plugin': Not a v4. 0.0 POM. for project org.apache.maven.plugins:maven-resources- plugin at C:\Documents and Settings\sammaiah.nagapuri\.m2\repository\org\apache\maven\plu gins\maven-resources-plugin\2.3\maven-resources-plugin-2.3.pom Does this repository POM file look like a valid POM file? Did you use the same version on Maven to create the repository? What is your Maven version? Kind regards, -- Ben Caradoc-Davies ben.caradoc-dav...@csiro.au Software Engineer, CSIRO Exploration and Mining Australian Resources Research Centre 26 Dick Perry Ave, Kensington WA 6151, Australia --- -- 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
Force versions plugin to remove snapshots
Hi With our build, we have a top-down approach to our releases: We have a hierarchy of POMs, and the one closest to the project contains all versions of all our projects. Now, to release that, we have to remove the -SNAPSHOT from the versions. I wanted to do this with the versions plugin, but it insists on finding the releases in the repository. Is there any other way I could achieve that? Best regards, Eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Force versions plugin to remove snapshots
versions:set -DnewVersion=7.8.9 2009/8/28 Lewis, Eric eric.le...@ipi.ch Hi With our build, we have a top-down approach to our releases: We have a hierarchy of POMs, and the one closest to the project contains all versions of all our projects. Now, to release that, we have to remove the -SNAPSHOT from the versions. I wanted to do this with the versions plugin, but it insists on finding the releases in the repository. Is there any other way I could achieve that? Best regards, Eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
inject version into source?
Hello, New maven user here. Really am liking it, just trying to get project back online and running after switching from ant.. Is there any standard maven way to inject maven variables (like version) into source code, prior to compile? Is this maybe were I should just leverage my existing any scripts to accomplish the task? thanks, -jr - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: inject version into source?
I have done this by setting up a properties file that gets filtered at build time. Then, I use that properties file in a Spring PlaceholderConfigurer to get the value injected where I need it. James Russo wrote: Hello, New maven user here. Really am liking it, just trying to get project back online and running after switching from ant.. Is there any standard maven way to inject maven variables (like version) into source code, prior to compile? Is this maybe were I should just leverage my existing any scripts to accomplish the task? thanks, -jr - 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: inject version into source?
So, basically, you use a wrapper to get around maven? I do something similar: I use a .properties file, then run an xmltask ant script to update the maven pom.xml files. Very predictable, very manageable, and bypasses the maven-release-plugin which caused ALL KINDS of headaches because it doesn't work with perforce properly. James, that'd be my recommendation: update the maven info to fit your build before you run maven :) Dana Lacoste -Original Message- From: David C. Hicks [mailto:dhi...@i-hicks.org] Sent: Friday, August 28, 2009 11:01 AM To: Maven Users List Subject: Re: inject version into source? I have done this by setting up a properties file that gets filtered at build time. Then, I use that properties file in a Spring PlaceholderConfigurer to get the value injected where I need it. James Russo wrote: Hello, New maven user here. Really am liking it, just trying to get project back online and running after switching from ant.. Is there any standard maven way to inject maven variables (like version) into source code, prior to compile? Is this maybe were I should just leverage my existing any scripts to accomplish the task? thanks, -jr - 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: inject version into source?
Dana, Thanks. That is fine. I am fine with just injecting the version value of the pom, but I need it accessible to my application. Current scheme for this is to have it in a Version.java file as a static string which is referenced for display in the application. Still trying to get my head around all this stuff. My application went from one big war file to now having a few jar files and one simple maven war project which includes all the others. Going to be building them all at the same time, so they should all have the same version/build number. Thats on my list too, how to get all sub modules to inherit version number from the parent pom. Thinking I just leave it out of the module poms, haven't tried that yet. I was planning on looking at the maven-release plugin to generate real releases of my application... Don't use perforce though. -jr Lacoste, Dana (TSG Software San Diego) wrote: So, basically, you use a wrapper to get around maven? I do something similar: I use a .properties file, then run an xmltask ant script to update the maven pom.xml files. Very predictable, very manageable, and bypasses the maven-release-plugin which caused ALL KINDS of headaches because it doesn't work with perforce properly. James, that'd be my recommendation: update the maven info to fit your build before you run maven :) Dana Lacoste -Original Message- From: David C. Hicks [mailto:dhi...@i-hicks.org] Sent: Friday, August 28, 2009 11:01 AM To: Maven Users List Subject: Re: inject version into source? I have done this by setting up a properties file that gets filtered at build time. Then, I use that properties file in a Spring PlaceholderConfigurer to get the value injected where I need it. James Russo wrote: Hello, New maven user here. Really am liking it, just trying to get project back online and running after switching from ant.. Is there any standard maven way to inject maven variables (like version) into source code, prior to compile? Is this maybe were I should just leverage my existing any scripts to accomplish the task? thanks, -jr - 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: Maven2 plugin execution sequence
file a jira so that people can vote on it On Fri, Aug 28, 2009 at 6:55 AM, claus437claus...@gmail.com wrote: :o( - ok thnaks i will do... Dan Tran wrote: not possible at moment, you may want to file a request to add pre-deploy phase -D On Thu, Aug 27, 2009 at 8:52 AM, claus437claus...@gmail.com wrote: Hi All I have created a little maven 2 plugin that i would like to run each time i do a mvn deploy. The problem is that it needs to be executed before the deploy phase but only if the deploy phase is to be executed in the build, so i can not just bind it to the install phase - and if i bind it to the deploy phase it will be executed afterwards. How do i accomplish this. thanks in advance Best regards Claus -- View this message in context: http://www.nabble.com/Maven2-plugin-execution-sequence-tp25172369p25172369.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 - 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://www.nabble.com/Maven2-plugin-execution-sequence-tp25172369p25190360.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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Best practice - for multiple config files per environment
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Rick, I know this must be a common question, and I've been googling for the best practice for using a different configuration file (say a different hibernate.cfg.xml file) for different profiles (based on a profile, local, itr, etc.) Normally I rely on a single file that is filtered based on a different filter file (prepended by the profile environment name), however the files now might be drastically different for a local build (where I define properties for a datasource) and a production build which will have different properties in the file for locating a datasource, so just using in place substitution isn't the best (I'd prefer a way to copy a completely different config file based on the profile being run.) Basically how to you include different property/xml files for your different builds (using profiles) Best practices IMHO: 1. Separate configurations from your application artifacts. This allows to deploy the same application artifacts in test environments and production. Only pure configuration artifacts differ. 2. Load configurations from classpath rather than filesystem 3. use filtering for environment specific configs wherever possible. You might simply add a filter like filter-${my.environment}.properties and add ${my.environment} to finalName. Then you can build such configuration project multiple times with different values for -Dmy.environment=... 4. for commerical use: ask the operators how to deal with env. specific configs. It might be fine for developers to package configs in JARs while this would be kinda awkward for an operator who has to maintain such configs. Hope this helped a little Regards Jörg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqYL1kACgkQmPuec2Dcv//JFACfbs6nI71xuX7v6Lfws5yFy8uQ pMAAnjeVWckwc8p+neSwLO0Ra1GFMQRA =ix6N -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: javadoc:aggregate Problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 FYI: http://jira.codehaus.org/browse/MJAVADOC-245 Hi there, I want to have javadoc-reports per module as well as one aggregated javadoc for the project. Is this possible at all with a single site:stage call? I tried http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.html but it does NOT work. The second reportSet seems to be ignored. Any ideas? Thanks Jörg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqYL88ACgkQmPuec2Dcv/8xlQCdHPYSM/JeXE+ChxngZWBFNGIi 088An3/Pe9255ShLl57kqpeIS13qXcn3 =eRs5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: inject version into source?
turn on filtering for a specific resource (e.g. com/foo/bar/ Version.properties) have this file with the contents version=${project.version} replace your com.foo.bar.Version.java with code like so public static String getVersion() { InputStream is = Version.class.getResource(Version.properties); Properties props = new Properties(); props.loadFromStream(is); return props.getProperty(version); } obviously, add caching and error handling (no smart completion on the iPod) -Stephen Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 19:18, James Russo j...@halo3.net wrote: Dana, Thanks. That is fine. I am fine with just injecting the version value of the pom, but I need it accessible to my application. Current scheme for this is to have it in a Version.java file as a static string which is referenced for display in the application. Still trying to get my head around all this stuff. My application went from one big war file to now having a few jar files and one simple maven war project which includes all the others. Going to be building them all at the same time, so they should all have the same version/build number. Thats on my list too, how to get all sub modules to inherit version number from the parent pom. Thinking I just leave it out of the module poms, haven't tried that yet. I was planning on looking at the maven-release plugin to generate real releases of my application... Don't use perforce though. -jr Lacoste, Dana (TSG Software San Diego) wrote: So, basically, you use a wrapper to get around maven? I do something similar: I use a .properties file, then run an xmltask ant script to update the maven pom.xml files. Very predictable, very manageable, and bypasses the maven-release-plugin which caused ALL KINDS of headaches because it doesn't work with perforce properly. James, that'd be my recommendation: update the maven info to fit your build before you run maven :) Dana Lacoste -Original Message- From: David C. Hicks [mailto:dhi...@i-hicks.org] Sent: Friday, August 28, 2009 11:01 AM To: Maven Users List Subject: Re: inject version into source? I have done this by setting up a properties file that gets filtered at build time. Then, I use that properties file in a Spring PlaceholderConfigurer to get the value injected where I need it. James Russo wrote: Hello, New maven user here. Really am liking it, just trying to get project back online and running after switching from ant.. Is there any standard maven way to inject maven variables (like version) into source code, prior to compile? Is this maybe were I should just leverage my existing any scripts to accomplish the task? thanks, -jr --- -- 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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: inject version into source?
another way is to store the version in the manifest and then retrieve the manifest from the classloader for the class you are loading... of course the downside is that if somebody makes an uberjar you'll have the version of the uberjar and nit the version of the code that was uberjarred (which is why the properties file is the recommended route.) btw a static string constant in a file, eg Version.java will only get updated on a full clean build, so if you do a partial build, the version number would not get updated... yet another reason why properties files are preferred Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 20:42, Stephen Connolly stephen.alan.conno...@gmail.com wrote: turn on filtering for a specific resource (e.g. com/foo/bar/ Version.properties) have this file with the contents version=${project.version} replace your com.foo.bar.Version.java with code like so public static String getVersion() { InputStream is = Version.class.getResource(Version.properties); Properties props = new Properties(); props.loadFromStream(is); return props.getProperty(version); } obviously, add caching and error handling (no smart completion on the iPod) -Stephen Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 19:18, James Russo j...@halo3.net wrote: Dana, Thanks. That is fine. I am fine with just injecting the version value of the pom, but I need it accessible to my application. Current scheme for this is to have it in a Version.java file as a static string which is referenced for display in the application. Still trying to get my head around all this stuff. My application went from one big war file to now having a few jar files and one simple maven war project which includes all the others. Going to be building them all at the same time, so they should all have the same version/ build number. Thats on my list too, how to get all sub modules to inherit version number from the parent pom. Thinking I just leave it out of the module poms, haven't tried that yet. I was planning on looking at the maven-release plugin to generate real releases of my application... Don't use perforce though. -jr Lacoste, Dana (TSG Software San Diego) wrote: So, basically, you use a wrapper to get around maven? I do something similar: I use a .properties file, then run an xmltask ant script to update the maven pom.xml files. Very predictable, very manageable, and bypasses the maven-release-plugin which caused ALL KINDS of headaches because it doesn't work with perforce properly. James, that'd be my recommendation: update the maven info to fit your build before you run maven :) Dana Lacoste -Original Message- From: David C. Hicks [mailto:dhi...@i-hicks.org] Sent: Friday, August 28, 2009 11:01 AM To: Maven Users List Subject: Re: inject version into source? I have done this by setting up a properties file that gets filtered at build time. Then, I use that properties file in a Spring PlaceholderConfigurer to get the value injected where I need it. James Russo wrote: Hello, New maven user here. Really am liking it, just trying to get project back online and running after switching from ant.. Is there any standard maven way to inject maven variables (like version) into source code, prior to compile? Is this maybe were I should just leverage my existing any scripts to accomplish the task? thanks, -jr --- -- 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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Need a separate jar from war in assembly
So I have a jar that needs to be in an assembly but not in the war file. It's a jdbc driver for the appserver. How can I get it into the compressed archive but outside of the *.war file? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Need a separate jar from war in assembly
On Fri, Aug 28, 2009 at 1:06 PM, Jim Collingsjlistn...@gmail.com wrote: So I have a jar that needs to be in an assembly but not in the war file. It's a jdbc driver for the appserver. How can I get it into the compressed archive but outside of the *.war file? How is your project structured now? Are you trying to build the assembly out of the same module that builds the webapp? If so, moving the assembly to a separate module may make things easier. I'm guessing, so if that's not it, give us more details. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: inject version into source?
Stephen, Thanks. I think I will take this route. Not sure what you mean about partial build though. If the .java file was updated each time, it would be compiled each time. Right now, I can't seem to get the build-version maven module to fail if my local directory has modified code. docs say it should. -jr Stephen Connolly wrote: another way is to store the version in the manifest and then retrieve the manifest from the classloader for the class you are loading... of course the downside is that if somebody makes an uberjar you'll have the version of the uberjar and nit the version of the code that was uberjarred (which is why the properties file is the recommended route.) btw a static string constant in a file, eg Version.java will only get updated on a full clean build, so if you do a partial build, the version number would not get updated... yet another reason why properties files are preferred Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 20:42, Stephen Connolly stephen.alan.conno...@gmail.com wrote: turn on filtering for a specific resource (e.g. com/foo/bar/Version.properties) have this file with the contents version=${project.version} replace your com.foo.bar.Version.java with code like so public static String getVersion() { InputStream is = Version.class.getResource(Version.properties); Properties props = new Properties(); props.loadFromStream(is); return props.getProperty(version); } obviously, add caching and error handling (no smart completion on the iPod) -Stephen Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 19:18, James Russo j...@halo3.net wrote: Dana, Thanks. That is fine. I am fine with just injecting the version value of the pom, but I need it accessible to my application. Current scheme for this is to have it in a Version.java file as a static string which is referenced for display in the application. Still trying to get my head around all this stuff. My application went from one big war file to now having a few jar files and one simple maven war project which includes all the others. Going to be building them all at the same time, so they should all have the same version/build number. Thats on my list too, how to get all sub modules to inherit version number from the parent pom. Thinking I just leave it out of the module poms, haven't tried that yet. I was planning on looking at the maven-release plugin to generate real releases of my application... Don't use perforce though. -jr Lacoste, Dana (TSG Software San Diego) wrote: So, basically, you use a wrapper to get around maven? I do something similar: I use a .properties file, then run an xmltask ant script to update the maven pom.xml files. Very predictable, very manageable, and bypasses the maven-release-plugin which caused ALL KINDS of headaches because it doesn't work with perforce properly. James, that'd be my recommendation: update the maven info to fit your build before you run maven :) Dana Lacoste -Original Message- From: David C. Hicks [mailto:dhi...@i-hicks.org] Sent: Friday, August 28, 2009 11:01 AM To: Maven Users List Subject: Re: inject version into source? I have done this by setting up a properties file that gets filtered at build time. Then, I use that properties file in a Spring PlaceholderConfigurer to get the value injected where I need it. James Russo wrote: Hello, New maven user here. Really am liking it, just trying to get project back online and running after switching from ant.. Is there any standard maven way to inject maven variables (like version) into source code, prior to compile? Is this maybe were I should just leverage my existing any scripts to accomplish the task? thanks, -jr - 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 - 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: Need a separate jar from war in assembly
Hello, So, the recommended way is to have something like this, correct? xx-weblogic (all code for web-application) xx-webapp (the actual war, containing src/main/webapp, src/main/resources, but no src/main. Code is really included though .jar files in lib). -jr Wendy Smoak wrote: On Fri, Aug 28, 2009 at 1:06 PM, Jim Collingsjlistn...@gmail.com wrote: So I have a jar that needs to be in an assembly but not in the war file. It's a jdbc driver for the appserver. How can I get it into the compressed archive but outside of the *.war file? How is your project structured now? Are you trying to build the assembly out of the same module that builds the webapp? If so, moving the assembly to a separate module may make things easier. I'm guessing, so if that's not it, give us more details. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: inject version into source?
the spec for javac allows directly including public static final constants *by value* if they are one of the 8 primitives, or String. so if another class (Foo.java) references Version.VERSION javac is allowed to *copy* the string at *compile* time. if you subsequently modify Version.java, but don't modify Foo.java then unless you delete Foo.class, the old version number will still be embedded in Foo.class if you don't believe me, give it a try. IDE's such as eclipse and intellij guard against this early binding of public static final constants by keeping track of dependent classes and fixing a recompile if them. another route us to have a public static String noop(String v) {return v;} in *another class* and define all your public static final constants through this function thereby forcing evaluation when the classes are loaded Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 21:23, James Russo j...@halo3.net wrote: Stephen, Thanks. I think I will take this route. Not sure what you mean about partial build though. If the .java file was updated each time, it would be compiled each time. Right now, I can't seem to get the build-version maven module to fail if my local directory has modified code. docs say it should. -jr Stephen Connolly wrote: another way is to store the version in the manifest and then retrieve the manifest from the classloader for the class you are loading... of course the downside is that if somebody makes an uberjar you'll have the version of the uberjar and nit the version of the code that was uberjarred (which is why the properties file is the recommended route.) btw a static string constant in a file, eg Version.java will only get updated on a full clean build, so if you do a partial build, the version number would not get updated... yet another reason why properties files are preferred Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 20:42, Stephen Connolly stephen.alan.conno...@gmail.com wrote: turn on filtering for a specific resource (e.g. com/foo/bar/ Version.properties) have this file with the contents version=${project.version} replace your com.foo.bar.Version.java with code like so public static String getVersion() { InputStream is = Version.class.getResource(Version.properties); Properties props = new Properties(); props.loadFromStream(is); return props.getProperty(version); } obviously, add caching and error handling (no smart completion on the iPod) -Stephen Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 19:18, James Russo j...@halo3.net wrote: Dana, Thanks. That is fine. I am fine with just injecting the version value of the pom, but I need it accessible to my application. Current scheme for this is to have it in a Version.java file as a static string which is referenced for display in the application. Still trying to get my head around all this stuff. My application went from one big war file to now having a few jar files and one simple maven war project which includes all the others. Going to be building them all at the same time, so they should all have the same version/ build number. Thats on my list too, how to get all sub modules to inherit version number from the parent pom. Thinking I just leave it out of the module poms, haven't tried that yet. I was planning on looking at the maven-release plugin to generate real releases of my application... Don't use perforce though. -jr Lacoste, Dana (TSG Software San Diego) wrote: So, basically, you use a wrapper to get around maven? I do something similar: I use a .properties file, then run an xmltask ant script to update the maven pom.xml files. Very predictable, very manageable, and bypasses the maven-release-plugin which caused ALL KINDS of headaches because it doesn't work with perforce properly. James, that'd be my recommendation: update the maven info to fit your build before you run maven :) Dana Lacoste -Original Message- From: David C. Hicks [mailto:dhi...@i-hicks.org] Sent: Friday, August 28, 2009 11:01 AM To: Maven Users List Subject: Re: inject version into source? I have done this by setting up a properties file that gets filtered at build time. Then, I use that properties file in a Spring PlaceholderConfigurer to get the value injected where I need it. James Russo wrote: Hello, New maven user here. Really am liking it, just trying to get project back online and running after switching from ant.. Is there any standard maven way to inject maven variables (like version) into source code, prior to compile? Is this maybe were I should just leverage my existing any scripts to accomplish the task? thanks, -jr --- --- --- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org ---
Re: inject version into source?
Stephen, Thanks. I can honestly say I was not aware of that. I guess I hadn't been bitten by that one yet. Makes sense though.. -jr Stephen Connolly wrote: the spec for javac allows directly including public static final constants *by value* if they are one of the 8 primitives, or String. so if another class (Foo.java) references Version.VERSION javac is allowed to *copy* the string at *compile* time. if you subsequently modify Version.java, but don't modify Foo.java then unless you delete Foo.class, the old version number will still be embedded in Foo.class if you don't believe me, give it a try. IDE's such as eclipse and intellij guard against this early binding of public static final constants by keeping track of dependent classes and fixing a recompile if them. another route us to have a public static String noop(String v){return v;} in *another class* and define all your public static final constants through this function thereby forcing evaluation when the classes are loaded Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 21:23, James Russo j...@halo3.net wrote: Stephen, Thanks. I think I will take this route. Not sure what you mean about partial build though. If the .java file was updated each time, it would be compiled each time. Right now, I can't seem to get the build-version maven module to fail if my local directory has modified code. docs say it should. -jr Stephen Connolly wrote: another way is to store the version in the manifest and then retrieve the manifest from the classloader for the class you are loading... of course the downside is that if somebody makes an uberjar you'll have the version of the uberjar and nit the version of the code that was uberjarred (which is why the properties file is the recommended route.) btw a static string constant in a file, eg Version.java will only get updated on a full clean build, so if you do a partial build, the version number would not get updated... yet another reason why properties files are preferred Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 20:42, Stephen Connolly stephen.alan.conno...@gmail.com wrote: turn on filtering for a specific resource (e.g. com/foo/bar/Version.properties) have this file with the contents version=${project.version} replace your com.foo.bar.Version.java with code like so public static String getVersion() { InputStream is = Version.class.getResource(Version.properties); Properties props = new Properties(); props.loadFromStream(is); return props.getProperty(version); } obviously, add caching and error handling (no smart completion on the iPod) -Stephen Sent from my [rhymes with myPod] ;-) On 28 Aug 2009, at 19:18, James Russo j...@halo3.net wrote: Dana, Thanks. That is fine. I am fine with just injecting the version value of the pom, but I need it accessible to my application. Current scheme for this is to have it in a Version.java file as a static string which is referenced for display in the application. Still trying to get my head around all this stuff. My application went from one big war file to now having a few jar files and one simple maven war project which includes all the others. Going to be building them all at the same time, so they should all have the same version/build number. Thats on my list too, how to get all sub modules to inherit version number from the parent pom. Thinking I just leave it out of the module poms, haven't tried that yet. I was planning on looking at the maven-release plugin to generate real releases of my application... Don't use perforce though. -jr Lacoste, Dana (TSG Software San Diego) wrote: So, basically, you use a wrapper to get around maven? I do something similar: I use a .properties file, then run an xmltask ant script to update the maven pom.xml files. Very predictable, very manageable, and bypasses the maven-release-plugin which caused ALL KINDS of headaches because it doesn't work with perforce properly. James, that'd be my recommendation: update the maven info to fit your build before you run maven :) Dana Lacoste -Original Message- From: David C. Hicks [mailto:dhi...@i-hicks.org] Sent: Friday, August 28, 2009 11:01 AM To: Maven Users List Subject: Re: inject version into source? I have done this by setting up a properties file that gets filtered at build time. Then, I use that properties file in a Spring PlaceholderConfigurer to get the value injected where I need it. James Russo wrote: Hello, New maven user here. Really am liking it, just trying to get project back online and running after switching from ant.. Is there any standard maven way to inject maven variables (like version) into source code, prior to compile? Is this maybe were I should just leverage my existing any scripts to accomplish the task? thanks, -jr - To unsubscribe, e-mail:
plugin not reading finalName correctly?
Hello, Trying to use buildnumber and tomcat:deploy. In my parent-pom, I've defined buildnumber. In my application-webapp (war), I define the tomcat deploy configuration. However, when tomcat deploy tries to install it, for some reason the buildnumber variable comes across as null. [INFO] Webapp assembled in[120 msecs] [INFO] Building war: /Users/jamesrusso/Documents/workspace/project-maven/project-webapp/target/web-app-0.0.1-SNAPSHOT.3533.war [INFO] [tomcat:deploy] [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Cannot find war file: /Users/jamesrusso/Documents/workspace/project-maven/project-webapp/target/web-app-0.0.1-SNAPSHOT.null.war I've tried pushing eveything down into the module pom, but same results? Any reason why the tomcat:deploy isn't picking up on the buildnumber variable? thanks, -jr - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Need a separate jar from war in assembly
Yes, it's common to have the code in a separate module from the webapp. It makes it easier to do unit testing of the code separately from integration testing the webapp. I'm not sure how that relates to your original question though. I see the jar module and the war module... where is the assembly plugin configured? (Or, were you using 'assembly' in a generic sense?) If you're just trying to convince Maven not to put your JDBC driver in the war, try using 'provided' scope for that dependency. -- Wendy On Fri, Aug 28, 2009 at 1:31 PM, James Russoj...@halo3.net wrote: Hello, So, the recommended way is to have something like this, correct? xx-weblogic (all code for web-application) xx-webapp (the actual war, containing src/main/webapp, src/main/resources, but no src/main. Code is really included though .jar files in lib). ... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org