Maven webapp and extreme complexity
Hello, I'm exploring Maven and hence started to work with a simple web application. I used the one I had already (mywebapp) with the following directory structure. mywebapp/ login.html wEB-INF/ src/LoginServlet.java src/EmailServlet.java web.xml I used to manually compile my sources and copy them to WEB-INF/classes/mywebapp The application works well with tomcat. Enter Maven and what a nightmare! I haven't used any tool that is as complicated as Maven! You may all diagree (since you know maven) but for firsttime users, this is useless. I installed Maven and compiled the Hello World test application successfully. Then I created a webapp archetype, $ mvn archetype:generate -DgroupId=mywebapp -DartifactId=mywebapp -DpackageName=mywebapp -DarchetypeArtifactId=maven-archetype-webapp -Dversion=1.0.0 (oh yeah, it complains that create is deprecated and to use generate... while there is no mention of this anywhere online) I copied my source to resources/, and web.xml to the WEB-INF/ Here's my pom.xml project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdmywebapp/groupId artifactIdmywebapp/artifactId packagingwar/packaging version1.0-SNAPSHOT/version namepoc Maven Webapp/name urlhttp://maven.apache.org/url dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameLoginServlet/finalName /build /project And when I run mvn compile, I get [INFO] Scanning for projects... [INFO] [INFO] Building mywebapp Maven Webapp [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Tue Dec 16 14:15:55 IST 2008 [INFO] Final Memory: 6M/86M [INFO] - So I'm not sure where to go from here. Most examples never talk about the compile process and what happens during this phase. I have looked plenty online for help and clues but found none to be useful. The maven documentation itself is complicated. Why isn't there a simple webapplication example using maven?. No i don't want to use Jetty. I just want to compile a war file and deploy it on tomcat (manually). Sorry for venting. Ant is so much better in simplicity. But I don't want to use Ant tasks in Maven since my application will grow to be complex and I want to use Maven as advertised but the learning curve sucks! Joey - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven webapp and extreme complexity
Maven is not that much more difficult then ant, it is different. Please take a look at the maven book [1], this explains everything in a very good way! Oh, and for your compile problem. Put your java sources in src/main/java, your resources in src/main/resources, your unit tests in src/test/java/ en your unit test resources in src/test/java. These are the default directories for maven. Hth, [1] http://books.sonatype.com/maven-book/index.html Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl On Tue, Dec 16, 2008 at 10:17 AM, Joey Krane linuxbsd2...@gmail.com wrote: Hello, I'm exploring Maven and hence started to work with a simple web application. I used the one I had already (mywebapp) with the following directory structure. mywebapp/ login.html wEB-INF/ src/LoginServlet.java src/EmailServlet.java web.xml I used to manually compile my sources and copy them to WEB-INF/classes/mywebapp The application works well with tomcat. Enter Maven and what a nightmare! I haven't used any tool that is as complicated as Maven! You may all diagree (since you know maven) but for firsttime users, this is useless. I installed Maven and compiled the Hello World test application successfully. Then I created a webapp archetype, $ mvn archetype:generate -DgroupId=mywebapp -DartifactId=mywebapp -DpackageName=mywebapp -DarchetypeArtifactId=maven-archetype-webapp -Dversion=1.0.0 (oh yeah, it complains that create is deprecated and to use generate... while there is no mention of this anywhere online) I copied my source to resources/, and web.xml to the WEB-INF/ Here's my pom.xml project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdmywebapp/groupId artifactIdmywebapp/artifactId packagingwar/packaging version1.0-SNAPSHOT/version namepoc Maven Webapp/name urlhttp://maven.apache.org/url dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameLoginServlet/finalName /build /project And when I run mvn compile, I get [INFO] Scanning for projects... [INFO] [INFO] Building mywebapp Maven Webapp [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Tue Dec 16 14:15:55 IST 2008 [INFO] Final Memory: 6M/86M [INFO] - So I'm not sure where to go from here. Most examples never talk about the compile process and what happens during this phase. I have looked plenty online for help and clues but found none to be useful. The maven documentation itself is complicated. Why isn't there a simple webapplication example using maven?. No i don't want to use Jetty. I just want to compile a war file and deploy it on tomcat (manually). Sorry for venting. Ant is so much better in simplicity. But I don't want to use Ant tasks in Maven since my application will grow to be complex and I want to use Maven as advertised but the learning curve sucks! Joey - 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: Maven webapp and extreme complexity
And you are completely right. :) Thanks, a quick c/p error. With regards, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl On Tue, Dec 16, 2008 at 10:38 AM, Martin Höller mar...@xss.co.at wrote: On Tuesday 16 December 2008 Nick Stolwijk wrote: Maven is not that much more difficult then ant, it is different. Please take a look at the maven book [1], this explains everything in a very good way! Oh, and for your compile problem. Put your java sources in src/main/java, your resources in src/main/resources, your unit tests in src/test/java/ en your unit test resources in src/test/java. There's a typo: test-resources should go in src/test/resources, not src/test/java. hth, - martin
Re: Maven webapp and extreme complexity
On Tuesday 16 December 2008 Nick Stolwijk wrote: Maven is not that much more difficult then ant, it is different. Please take a look at the maven book [1], this explains everything in a very good way! Oh, and for your compile problem. Put your java sources in src/main/java, your resources in src/main/resources, your unit tests in src/test/java/ en your unit test resources in src/test/java. There's a typo: test-resources should go in src/test/resources, not src/test/java. hth, - martin signature.asc Description: This is a digitally signed message part.
Re: Maven webapp and extreme complexity
You created your project with the sample webapp as archetype. It is recommended to seperate your java files and your webapp in seperate modules and add a dependency between the modules. For your first maven project you can simply create the src/main/java yourself (it is just a directory) and put your java files in there. Hth, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl On Tue, Dec 16, 2008 at 10:52 AM, Joey Krane linuxbsd2...@gmail.com wrote: Thanks for the response. On Tue, Dec 16, 2008 at 3:03 PM, Nick Stolwijk nick.stolw...@gmail.com wrote: Maven is not that much more difficult then ant, it is different. Please take a look at the maven book [1], this explains everything in a very good way! Yes, I did refer to this as well. It does not talk about an end to end web application example or for moving from ant to maven in web application context. Oh, and for your compile problem. Put your java sources in src/main/java, I don't see src/main/java but only src/main/resources and src/main/webapp your resources in src/main/resources, Is resources the same as my source code? If so, I tried that and I still get No resources to compile .. or something similar. your unit tests I haven't gone that far yet. I'm still struggling to get a simple webapplication to compile and create a war file. Joey On Tue, Dec 16, 2008 at 10:17 AM, Joey Krane linuxbsd2...@gmail.com wrote: Hello, I'm exploring Maven and hence started to work with a simple web application. I used the one I had already (mywebapp) with the following directory structure. mywebapp/ login.html wEB-INF/ src/LoginServlet.java src/EmailServlet.java web.xml I used to manually compile my sources and copy them to WEB-INF/classes/mywebapp The application works well with tomcat. Enter Maven and what a nightmare! I haven't used any tool that is as complicated as Maven! You may all diagree (since you know maven) but for firsttime users, this is useless. I installed Maven and compiled the Hello World test application successfully. Then I created a webapp archetype, $ mvn archetype:generate -DgroupId=mywebapp -DartifactId=mywebapp -DpackageName=mywebapp -DarchetypeArtifactId=maven-archetype-webapp -Dversion=1.0.0 (oh yeah, it complains that create is deprecated and to use generate... while there is no mention of this anywhere online) I copied my source to resources/, and web.xml to the WEB-INF/ Here's my pom.xml project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdmywebapp/groupId artifactIdmywebapp/artifactId packagingwar/packaging version1.0-SNAPSHOT/version namepoc Maven Webapp/name urlhttp://maven.apache.org/url dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameLoginServlet/finalName /build /project And when I run mvn compile, I get [INFO] Scanning for projects... [INFO] [INFO] Building mywebapp Maven Webapp [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Tue Dec 16 14:15:55 IST 2008 [INFO] Final Memory: 6M/86M [INFO] - So I'm not sure where to go from here. Most examples never talk about the compile process and what happens during this phase. I have looked plenty online for help and clues but found none to be useful. The maven documentation itself is complicated. Why isn't there a simple webapplication example using maven?. No i don't want to use Jetty. I just want to compile a war file and deploy it on tomcat (manually). Sorry for venting. Ant is so much better in simplicity. But I don't want to use Ant tasks in Maven since my application will grow to be complex and I want to use Maven as advertised but the learning curve sucks! Joey - 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,
Re: Running selective reports causes site/index.html to dissapear?!?
2008/12/16 Jörg Schaible joerg.schai...@gmx.de Hi Kent, Kent Närling wrote at Dienstag, 16. Dezember 2008 13:14: I am trying to customize the site generation and only want to generate selected reports... however when I do this as described in the examples: plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId reportSets reportSet reports reportdependencies/report reportproject-team/report reportmailing-list/report reportcim/report reportissue-tracking/report reportlicense/report reportscm/report /reports /reportSet /reportSets /plugin Then suddenly target/site/index.html is not generated anymore!?! why? You did not select the index report ;-) Right, I knew that ... *argh* Sorry for the troll question... :-(
Trying to deploy site...
I am trying to deploy a project site, but it seems that the deployment possibilities are very limited? eg. I am trying this: distributionManagement site idproject-site/id urlscp://localhost/home/admin/test/url /site /distributionManagement But then I get: Embedded error: The host was not known and was not accepted by the configuration: localhost reject HostKey: localhost It doesn't accept localhost?? why?? Also, I would actually like to be able to use another port (than 22) is this even possible? The documentation regarding the distribution options/protocols seems almost non-existant, or?
Re: Trying to deploy site...
scp is using ssh so you need a key generated. If you are building and deploying locally, try to just stage the site to the directory you want. site-stage --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Tue, Dec 16, 2008 at 10:05 AM, Kent Närling kent.narl...@seamless.sewrote: I am trying to deploy a project site, but it seems that the deployment possibilities are very limited? eg. I am trying this: distributionManagement site idproject-site/id urlscp://localhost/home/admin/test/url /site /distributionManagement But then I get: Embedded error: The host was not known and was not accepted by the configuration: localhost reject HostKey: localhost It doesn't accept localhost?? why?? Also, I would actually like to be able to use another port (than 22) is this even possible? The documentation regarding the distribution options/protocols seems almost non-existant, or?
enforcer and components.
Hi all, I have the following in a custom enforcer rule ScmManager scmManger = (ScmManager) helper.getComponent(ScmManager.class); Which fails with Component descriptor cannot be found in the component repository: org.apache.maven.scm.manager.ScmManager. My rule has dependencies on maven-scm-api in it's pom and looking at the release plugin plexus will resolve the ScmManager. So how do I get hold of it inside an enforcer rule? Regards, /James * This e-mail is confidential, the property of NDS Ltd and intended for the addressee only. Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited. If you have received this message in error, please immediately notify the postmas...@nds.com and destroy the original message. Messages sent to and from NDS may be monitored. NDS cannot guarantee any message delivery method is secure or error-free. Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission. You should carry out your own virus checks before opening any attachment. Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS. To protect the environment please do not print this e-mail unless necessary. NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00 **
Re: Trying to deploy site...
So, you are saying that only signature/key-based SSH works with deployment? not simply username+password? (that was what I tried) I do make site-stage too, just wanted to test the first deployment against a port-forwarded port to another host ... //Kent 2008/12/16 Mick Knutson mickknut...@gmail.com scp is using ssh so you need a key generated. If you are building and deploying locally, try to just stage the site to the directory you want. site-stage --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Tue, Dec 16, 2008 at 10:05 AM, Kent Närling kent.narl...@seamless.se wrote: I am trying to deploy a project site, but it seems that the deployment possibilities are very limited? eg. I am trying this: distributionManagement site idproject-site/id urlscp://localhost/home/admin/test/url /site /distributionManagement But then I get: Embedded error: The host was not known and was not accepted by the configuration: localhost reject HostKey: localhost It doesn't accept localhost?? why?? Also, I would actually like to be able to use another port (than 22) is this even possible? The documentation regarding the distribution options/protocols seems almost non-existant, or? -- Kent Närling System Architect SEAMLESS Dalagatan 100, 8 tr, 113 43 Stockholm, Sweden Phone: +46 8 5648 7800, fax: +46 8 5648 7823 Mobile: +46 70 836 9925 Mail: kent.narl...@seamless.se www.seamless.se
Re: Trying to deploy site...
You could try the ftp deployment instead of scp, that might work. But if you are staying local, use site-stage will solve your issue. if not local to the box, then you need a deployment declaration like you are using. --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Tue, Dec 16, 2008 at 10:26 AM, Kent Närling kent.narl...@seamless.sewrote: So, you are saying that only signature/key-based SSH works with deployment? not simply username+password? (that was what I tried) I do make site-stage too, just wanted to test the first deployment against a port-forwarded port to another host ... //Kent 2008/12/16 Mick Knutson mickknut...@gmail.com scp is using ssh so you need a key generated. If you are building and deploying locally, try to just stage the site to the directory you want. site-stage --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Tue, Dec 16, 2008 at 10:05 AM, Kent Närling kent.narl...@seamless.se wrote: I am trying to deploy a project site, but it seems that the deployment possibilities are very limited? eg. I am trying this: distributionManagement site idproject-site/id urlscp://localhost/home/admin/test/url /site /distributionManagement But then I get: Embedded error: The host was not known and was not accepted by the configuration: localhost reject HostKey: localhost It doesn't accept localhost?? why?? Also, I would actually like to be able to use another port (than 22) is this even possible? The documentation regarding the distribution options/protocols seems almost non-existant, or? -- Kent Närling System Architect SEAMLESS Dalagatan 100, 8 tr, 113 43 Stockholm, Sweden Phone: +46 8 5648 7800, fax: +46 8 5648 7823 Mobile: +46 70 836 9925 Mail: kent.narl...@seamless.se www.seamless.se
Re: Are Maven profiles like Ant targets?
On Tue, Dec 16, 2008 at 10:27 AM, Trevor Harmon tre...@vocaro.com wrote: I'm coming from the Ant world, where targets are fundamental. Need to generate the JavaDocs and a JAR? Write targets called javadoc and jar then do: ant javadoc ant jar In Maven, these particular tasks have built-in plugins, so there's no need to write a target. Instead you just invoke the plugin goal: mvn javadoc:javadoc mvn jar:jar But there are many scenarios in which no plugin is available. For instance, I use install4j to build an installer, and I use DocBook to translate XML into PDF. Accomplishing these tasks with the AntRun plugin is easy enough, but it's not clear how to actually invoke them. The Ant concept of a target does not exist in Maven. Maven does have profiles, however. I'm able to put the install4j stuff into a profile called install4j and the DocBook stuff into a profile called docbook. Then I can do: mvn -Pinstall4j mvn -Pdocbook This works, but from an end-user standpoint it's a little confusing. For some things you invoke a plugin goal but for other things you invoke a profile. It's inconsistent. Also, the Build Profiles chapter of the Maven book mentions nothing about this use case. It only talks about profiles for the purpose of build portability. So... am I doing this right? Are profiles intended to play the role of Ant targets? Or is there some other mechanism for that? I wouldn't say that profiles are analagous to Ant targets, no; you might be able to make them react that way, but that's not really the intent. The closest analog to an Ant target is a maven lifecycle phase, like install; there's a pre-defined lifecycle that Maven follows, and you can bind plugins of your choosing to that lifecycle. This works well in many 'build' scenarios, but it's also true that Maven is tailored around those kind of environments, and isn't as well suited for the world of execute some arbitrary work for me as Ant would be. That said, it's not hard to imagine using Maven to build an installer or some Docbook documentation; each of these might be a module on a larger multi-module project. - Geoffrey -- Geoffrey Wiseman http://www.geoffreywiseman.ca/
Re: Are Maven profiles like Ant targets?
On Tuesday 16 December 2008 Trevor Harmon wrote: [...] So... am I doing this right? Are profiles intended to play the role of Ant targets? Or is there some other mechanism for that? You are doing it wrong. Maven has no targets like ant has. Maven has lifecylces [0] which is built of phases (e.g. 'compile', package', 'install'). Plugins are attached to phases and are executed whenever a phase is executed. Profiles are used to configure plugins in different ways. Start reading the documentation at [1] and especially the books Better builds with Maven and Maven - The Definitve Guide. Both are available online for free. Search this archive or google it. hth, - martin [0] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html [1] http://maven.apache.org/guides/index.html signature.asc Description: This is a digitally signed message part.
Re: MAVEN certifications
thnx for ur reply, can u provide more information on the online tests -- View this message in context: http://www.nabble.com/MAVEN-certifications-tp21028497p21035523.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: Are Maven profiles like Ant targets?
You probably want to use a plugin. For instance you could use the DocBook plugin. http://maven-plugins.sourceforge.net/maven-sdocbook-plugin/index.html Once you have this plugin you can simply run the command: mvn sdocbook You will also want to get a better understanding of Maven's build lifecycle and undertand how lifecycles, phases and goals are related. It is more complex than ant targets but is also far more powerful. http://books.sonatype.com/maven-book/reference/lifecycle.html Ultimately, you will want to hide the fact that your particular project is using DocBook by binding these goals to a certain phase of the build lifecycle. ie: you will never have to run the mvn sdocbook command explicitly (although you still could if you needed to). What part of the lifecycle will be up to you but creating PDFs would likely best be sutied to the site lifecycle. Good luck. --- Todd Thiessen -Original Message- From: Trevor Harmon [mailto:tre...@vocaro.com] Sent: Tuesday, December 16, 2008 10:28 AM To: Maven Users List Subject: Are Maven profiles like Ant targets? I'm coming from the Ant world, where targets are fundamental. Need to generate the JavaDocs and a JAR? Write targets called javadoc and jar then do: ant javadoc ant jar In Maven, these particular tasks have built-in plugins, so there's no need to write a target. Instead you just invoke the plugin goal: mvn javadoc:javadoc mvn jar:jar But there are many scenarios in which no plugin is available. For instance, I use install4j to build an installer, and I use DocBook to translate XML into PDF. Accomplishing these tasks with the AntRun plugin is easy enough, but it's not clear how to actually invoke them. The Ant concept of a target does not exist in Maven. Maven does have profiles, however. I'm able to put the install4j stuff into a profile called install4j and the DocBook stuff into a profile called docbook. Then I can do: mvn -Pinstall4j mvn -Pdocbook This works, but from an end-user standpoint it's a little confusing. For some things you invoke a plugin goal but for other things you invoke a profile. It's inconsistent. Also, the Build Profiles chapter of the Maven book mentions nothing about this use case. It only talks about profiles for the purpose of build portability. So... am I doing this right? Are profiles intended to play the role of Ant targets? Or is there some other mechanism for that? Trevor - 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: Maven webapp and extreme complexity
On Tuesday 16 December 2008 Joey Krane wrote: On Tue, Dec 16, 2008 at 3:28 PM, Nick Stolwijk nick.stolw...@gmail.com wrote: Take a look at chapter 5 of the book. It creates a simple webapp. In chapter 5.5 it adds a servlet to src/main/java. Thanks for your patience. Creating the java directory and copying the sources fixed the problem. Good. I think it is a bug in the webapp archetype that java directory isn't created. No, it's not. As Nick mentioned earlier, it's best practice to separate your java sources from the webapp into a module of its own. That's why the java dir is not there: to follow the best practice. hth, - martin signature.asc Description: This is a digitally signed message part.
Running selective reports causes site/index.html to dissapear?!?
I am trying to customize the site generation and only want to generate selected reports... however when I do this as described in the examples: plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId reportSets reportSet reports reportdependencies/report reportproject-team/report reportmailing-list/report reportcim/report reportissue-tracking/report reportlicense/report reportscm/report /reports /reportSet /reportSets /plugin Then suddenly target/site/index.html is not generated anymore!?! why? Also, the documentation for site.xml is very brief, is there any good reference description on all available elements in site.xml etc
Using variable in : resourcefiltering${filterConfig}/filteringresource
I'd like to define in a parent pom resources like that : resources resource directory${configDirectory}/directory filtering${filterConfig}/filtering /resource resource directorysrc/main/resources/directory filtering${filterResources}/filtering /resource /resources I can use a variable for the directory element, but for the filtering element, only true and false are accepted. Using a variable result in a false value (even if the variable is set to true). Is there any reason for that ? Thanks, Bruno -- View this message in context: http://www.nabble.com/Using-variable-in-%3A-%3Cresource%3E%3Cfiltering%3E%24%7BfilterConfig%7D%3C-filtering%3E%3Cresource%3E-tp21031555p21031555.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: Maven webapp and extreme complexity
Take a look at chapter 5 of the book. It creates a simple webapp. In chapter 5.5 it adds a servlet to src/main/java. Hth, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl On Tue, Dec 16, 2008 at 10:56 AM, Nick Stolwijk nick.stolw...@gmail.com wrote: You created your project with the sample webapp as archetype. It is recommended to seperate your java files and your webapp in seperate modules and add a dependency between the modules. For your first maven project you can simply create the src/main/java yourself (it is just a directory) and put your java files in there. Hth, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl On Tue, Dec 16, 2008 at 10:52 AM, Joey Krane linuxbsd2...@gmail.com wrote: Thanks for the response. On Tue, Dec 16, 2008 at 3:03 PM, Nick Stolwijk nick.stolw...@gmail.com wrote: Maven is not that much more difficult then ant, it is different. Please take a look at the maven book [1], this explains everything in a very good way! Yes, I did refer to this as well. It does not talk about an end to end web application example or for moving from ant to maven in web application context. Oh, and for your compile problem. Put your java sources in src/main/java, I don't see src/main/java but only src/main/resources and src/main/webapp your resources in src/main/resources, Is resources the same as my source code? If so, I tried that and I still get No resources to compile .. or something similar. your unit tests I haven't gone that far yet. I'm still struggling to get a simple webapplication to compile and create a war file. Joey On Tue, Dec 16, 2008 at 10:17 AM, Joey Krane linuxbsd2...@gmail.com wrote: Hello, I'm exploring Maven and hence started to work with a simple web application. I used the one I had already (mywebapp) with the following directory structure. mywebapp/ login.html wEB-INF/ src/LoginServlet.java src/EmailServlet.java web.xml I used to manually compile my sources and copy them to WEB-INF/classes/mywebapp The application works well with tomcat. Enter Maven and what a nightmare! I haven't used any tool that is as complicated as Maven! You may all diagree (since you know maven) but for firsttime users, this is useless. I installed Maven and compiled the Hello World test application successfully. Then I created a webapp archetype, $ mvn archetype:generate -DgroupId=mywebapp -DartifactId=mywebapp -DpackageName=mywebapp -DarchetypeArtifactId=maven-archetype-webapp -Dversion=1.0.0 (oh yeah, it complains that create is deprecated and to use generate... while there is no mention of this anywhere online) I copied my source to resources/, and web.xml to the WEB-INF/ Here's my pom.xml project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdmywebapp/groupId artifactIdmywebapp/artifactId packagingwar/packaging version1.0-SNAPSHOT/version namepoc Maven Webapp/name urlhttp://maven.apache.org/url dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameLoginServlet/finalName /build /project And when I run mvn compile, I get [INFO] Scanning for projects... [INFO] [INFO] Building mywebapp Maven Webapp [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Tue Dec 16 14:15:55 IST 2008 [INFO] Final Memory: 6M/86M [INFO] - So I'm not sure where to go from here. Most examples never talk about the compile process and what happens during this phase. I have looked plenty online for help and clues but found none to be useful. The maven documentation itself is complicated. Why isn't there a simple webapplication example using maven?. No i don't want to use Jetty. I just want to compile a war file and deploy it on tomcat (manually). Sorry for venting. Ant is so much better in simplicity. But I don't want to use Ant tasks in Maven since my application will grow to be complex and I want to use Maven as advertised but the learning curve sucks! Joey
Re: MAVEN certifications
On Tue, Dec 16, 2008 at 12:32 AM, mohan_IBM mohanda...@gmail.com wrote: I am new to MAVEN, and just started using it. Is there any certifications to MAVEN or ANT build tools? There are some online certification tests at Java Black Belt. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Running selective reports causes site/index.html to dissapear?!?
Hi Kent, Kent Närling wrote at Dienstag, 16. Dezember 2008 13:14: I am trying to customize the site generation and only want to generate selected reports... however when I do this as described in the examples: plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId reportSets reportSet reports reportdependencies/report reportproject-team/report reportmailing-list/report reportcim/report reportissue-tracking/report reportlicense/report reportscm/report /reports /reportSet /reportSets /plugin Then suddenly target/site/index.html is not generated anymore!?! why? You did not select the index report ;-) - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven webapp and extreme complexity
On Tue, Dec 16, 2008 at 3:28 PM, Nick Stolwijk nick.stolw...@gmail.com wrote: Take a look at chapter 5 of the book. It creates a simple webapp. In chapter 5.5 it adds a servlet to src/main/java. Thanks for your patience. Creating the java directory and copying the sources fixed the problem. I think it is a bug in the webapp archetype that java directory isn't created. Thanks for the link to the book. It all makes sense now :-) Joey - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Resource Filtering - property not defined?
I encountered a situation this morning in which a very strange bug showed up in the system I'm working on - caused by the fact that we were filtering our resources. The particular substitution in question, however, was not a defined value at build time. It was in a Struts package file and in the form: ${slotAssignment.id} The value that got substituted for it was the Maven artifact identifier for the project. My question then, is does Maven have a default behavior for filtering files when filtering is activated AND the property that is referenced cannot be found? It seems to default to the project artifact, but I can't find any mention of it. So, I figured I'd ask here. Thanks, Dave - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven webapp and extreme complexity
Thanks for the response. On Tue, Dec 16, 2008 at 3:03 PM, Nick Stolwijk nick.stolw...@gmail.com wrote: Maven is not that much more difficult then ant, it is different. Please take a look at the maven book [1], this explains everything in a very good way! Yes, I did refer to this as well. It does not talk about an end to end web application example or for moving from ant to maven in web application context. Oh, and for your compile problem. Put your java sources in src/main/java, I don't see src/main/java but only src/main/resources and src/main/webapp your resources in src/main/resources, Is resources the same as my source code? If so, I tried that and I still get No resources to compile .. or something similar. your unit tests I haven't gone that far yet. I'm still struggling to get a simple webapplication to compile and create a war file. Joey On Tue, Dec 16, 2008 at 10:17 AM, Joey Krane linuxbsd2...@gmail.com wrote: Hello, I'm exploring Maven and hence started to work with a simple web application. I used the one I had already (mywebapp) with the following directory structure. mywebapp/ login.html wEB-INF/ src/LoginServlet.java src/EmailServlet.java web.xml I used to manually compile my sources and copy them to WEB-INF/classes/mywebapp The application works well with tomcat. Enter Maven and what a nightmare! I haven't used any tool that is as complicated as Maven! You may all diagree (since you know maven) but for firsttime users, this is useless. I installed Maven and compiled the Hello World test application successfully. Then I created a webapp archetype, $ mvn archetype:generate -DgroupId=mywebapp -DartifactId=mywebapp -DpackageName=mywebapp -DarchetypeArtifactId=maven-archetype-webapp -Dversion=1.0.0 (oh yeah, it complains that create is deprecated and to use generate... while there is no mention of this anywhere online) I copied my source to resources/, and web.xml to the WEB-INF/ Here's my pom.xml project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdmywebapp/groupId artifactIdmywebapp/artifactId packagingwar/packaging version1.0-SNAPSHOT/version namepoc Maven Webapp/name urlhttp://maven.apache.org/url dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameLoginServlet/finalName /build /project And when I run mvn compile, I get [INFO] Scanning for projects... [INFO] [INFO] Building mywebapp Maven Webapp [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 1 second [INFO] Finished at: Tue Dec 16 14:15:55 IST 2008 [INFO] Final Memory: 6M/86M [INFO] - So I'm not sure where to go from here. Most examples never talk about the compile process and what happens during this phase. I have looked plenty online for help and clues but found none to be useful. The maven documentation itself is complicated. Why isn't there a simple webapplication example using maven?. No i don't want to use Jetty. I just want to compile a war file and deploy it on tomcat (manually). Sorry for venting. Ant is so much better in simplicity. But I don't want to use Ant tasks in Maven since my application will grow to be complex and I want to use Maven as advertised but the learning curve sucks! Joey - 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
Are Maven profiles like Ant targets?
I'm coming from the Ant world, where targets are fundamental. Need to generate the JavaDocs and a JAR? Write targets called javadoc and jar then do: ant javadoc ant jar In Maven, these particular tasks have built-in plugins, so there's no need to write a target. Instead you just invoke the plugin goal: mvn javadoc:javadoc mvn jar:jar But there are many scenarios in which no plugin is available. For instance, I use install4j to build an installer, and I use DocBook to translate XML into PDF. Accomplishing these tasks with the AntRun plugin is easy enough, but it's not clear how to actually invoke them. The Ant concept of a target does not exist in Maven. Maven does have profiles, however. I'm able to put the install4j stuff into a profile called install4j and the DocBook stuff into a profile called docbook. Then I can do: mvn -Pinstall4j mvn -Pdocbook This works, but from an end-user standpoint it's a little confusing. For some things you invoke a plugin goal but for other things you invoke a profile. It's inconsistent. Also, the Build Profiles chapter of the Maven book mentions nothing about this use case. It only talks about profiles for the purpose of build portability. So... am I doing this right? Are profiles intended to play the role of Ant targets? Or is there some other mechanism for that? Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
mvn eclipse:eclipse throws NPE
When I run eclipse:eclipse on my multi-projece maven directory structure, I get this error message. Does anybody know what the problem might be? C:\slbr\loggingmvn eclipse:eclipse [INFO] Scanning for projects... [WARNING] Overriding profile: 'os-specific-settings' (source: pom) with new inst ance from source: pom [INFO] Searching repository for plugin with prefix: 'eclipse'. WAGON_VERSION: 1.0-beta-2 [INFO] [INFO] Building logging [INFO]task-segment: [eclipse:eclipse] [INFO] [INFO] Preparing eclipse:eclipse [INFO] No goals needed for project - skipping [INFO] [eclipse:eclipse] [WARNING] You did specify a list of classpath containers without the base org.ec lipse.jdt.launching.JRE_CONTAINER. If you specify custom classpath containers you should also add org.eclips e.jdt.launching.JRE_CONTAINER to the list [INFO] no substring wtp server match. [INFO] Using as WTP server : Apache Tomcat v4.1 [INFO] Using source status cache: C:\slbr\logging\target\mvn-eclipse-cache.properties [INFO] Wrote settings to C:\slbr\logging\.settings\org.eclipse.jdt.core.prefs [INFO] [ERROR] FATAL ERROR [INFO] [INFO] null [INFO] [INFO] Trace java.lang.NullPointerException at org.codehaus.plexus.util.xml.PrettyPrintXMLWriter.escapeXml(PrettyPri ntXMLWriter.java:151) at org.codehaus.plexus.util.xml.PrettyPrintXMLWriter.escapeXmlAttribute( PrettyPrintXMLWriter.java:166) at org.codehaus.plexus.util.xml.PrettyPrintXMLWriter.addAttribute(Pretty PrintXMLWriter.java:190) at org.apache.maven.plugin.eclipse.writers.EclipseClasspathWriter.write( EclipseClasspathWriter.java:335) at org.apache.maven.plugin.eclipse.EclipsePlugin.writeConfiguration(Ecli psePlugin.java:952) at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractId eSupportMojo.java:494) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:558) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:512) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:482) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [INFO] [INFO] Total time: 2 seconds [INFO] Finished at: Mon Dec 15 22:28:42 EST 2008 [INFO] Final Memory: 7M/13M [INFO] - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Deploy a POM with Properties Filterred/interpolated
I can't find any response on the list to the problem of how to prefilter/interpolate properties ( such as version numbers ) in an artifact's POM upon Deploying to a repository. The default is for the unfilterred project POM to be uploaded. we have many variable properties in our POMs to control artifact and depedency artifact versions and need these interpolated before deployment. On a related issue we would also like to exclude any build directives from the uploaded POM, but to edit a POM manually to achieve all this seems unecessarily laborious! Thanks for any help Trevor Paterson -- View this message in context: http://www.nabble.com/Deploy-a-POM-with-Properties-Filterred-interpolated-tp21030932p21030932.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: MAVEN certifications
http://letmegooglethatforyou.com/?q=maven+Java+Black+Belt On Tue, Dec 16, 2008 at 7:42 AM, mohan_IBM mohanda...@gmail.com wrote: thnx for ur reply, can u provide more information on the online tests -- View this message in context: http://www.nabble.com/MAVEN-certifications-tp21028497p21035523.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: MAVEN certifications
Ahaha, my new favorite site. -Original Message- From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] Sent: Tuesday, December 16, 2008 1:35 PM To: Maven Users List Subject: Re: MAVEN certifications http://letmegooglethatforyou.com/?q=maven+Java+Black+Belt On Tue, Dec 16, 2008 at 7:42 AM, mohan_IBM mohanda...@gmail.com wrote: thnx for ur reply, can u provide more information on the online tests -- View this message in context: http://www.nabble.com/MAVEN-certifications-tp21028497p21035523.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
Site XSD
Does anyone know if there is an XSD file for the site.xml file and if so where I could get it ;-). I can't seem to find it anywhere. --- Todd Thiessen - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: MAVEN certifications
Just out of curiosity, why is this your new favorite site? So to take this off topic, but I saw this and wonder where the use case for this site is? i think I might be missing something --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Tue, Dec 16, 2008 at 1:59 PM, Brian E. Fox bri...@reply.infinity.nuwrote: Ahaha, my new favorite site. -Original Message- From: Kalle Korhonen [mailto:kalle.o.korho...@gmail.com] Sent: Tuesday, December 16, 2008 1:35 PM To: Maven Users List Subject: Re: MAVEN certifications http://letmegooglethatforyou.com/?q=maven+Java+Black+Belt On Tue, Dec 16, 2008 at 7:42 AM, mohan_IBM mohanda...@gmail.com wrote: thnx for ur reply, can u provide more information on the online tests -- View this message in context: http://www.nabble.com/MAVEN-certifications-tp21028497p21035523.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: Final Memory
Hi Paul, I was looking exactly for the same question. Did you get an answer to this? Thanks Anil Paul Benedict-2 wrote: What does the Final Memory detail represent when Maven finishes? I can't find any documentation on what the two numbers mean. [INFO] Final Memory: 1M/4M Paul -- View this message in context: http://www.nabble.com/Final-Memory-tp15091792p21039789.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: Are Maven profiles like Ant targets?
On Dec 16, 2008, at 10:43 AM, Todd Thiessen wrote: You probably want to use a plugin. For instance you could use the DocBook plugin. http://maven-plugins.sourceforge.net/maven-sdocbook-plugin/index.html The sdocbook plugin does not work with Maven 2. I also tried the more recent docbook plugin: http://mojo.codehaus.org/docbook-maven-plugin/ But it's in a very alpha stage and lacks basic features (e.g. PDF generation). That's why I'm using the AntRun plugin; it gives me access to Ant's Xslt task for transforming DocBook. You will also want to get a better understanding of Maven's build lifecycle and undertand how lifecycles, phases and goals are related. It is more complex than ant targets but is also far more powerful. http://books.sonatype.com/maven-book/reference/lifecycle.html I'm familiar with the lifecycles, but it's strange you should say they are more powerful than Ant targets because they seem less powerful, at least when using the AntRun plugin. For example, my DocBook AntRun stuff is used for generating developer documentation, so binding it to any of the default lifecycle phases doesn't make sense. The site phase of the site lifecycle is probably the best place to put it, but then it gets tossed in with everything else in that phase. There's no way to run the DocBook stuff by itself; I have to run it along with everything else in the site phase. So in that sense, lifecycles are less powerful than Ant targets because they are more coarsely grained. I don't have the same control over what gets run. If, however, I put the DocBook stuff into a separate profile then suddenly I have that control. I don't know how else to get it without profiles. Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: MAVEN certifications
Just out of curiosity, why is this your new favorite site? So to take this off topic, but I saw this and wonder where the use case for this site is? i think I might be missing something LetMeGoogleThatForYou.com provides a means of teaching someone how to use Google, in case they don't already know. It is a (mildly rude) way of (indirectly) reprimanding someone when they ask a question that can easily be answered without asking someone else, while still answering the question they asked. The best use of the site I've seen lately was someone on this list asking for the definition of modicum after I used that word in an email. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Are Maven profiles like Ant targets?
On Dec 16, 2008, at 10:42 AM, Martin Höller wrote: You are doing it wrong. Maven has no targets like ant has. Maven has lifecylces [0] which is built of phases (e.g. 'compile', package', 'install'). Plugins are attached to phases and are executed whenever a phase is executed. Well, without profiles, I don't know how to do it right. For example, I use the AntRun plugin to invoke install4j, which builds installers for my artifact. Binding this to the deploy phase probably makes the most sense, but if I do that, the deploy goal of the deploy plugin also runs. There's no way to tell Maven to just run the install4j stuff. If, however, I split off the install4j stuff into an install4j profile and bind it to the package phase, then I can do: mvn -Pinstall4j package And suddenly Maven does exactly what I want: It runs install4j and nothing else. Without profiles, how can I accomplish this? Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Are Maven profiles like Ant targets?
They are more powerful in the sense that you can still call any goal independantly, but still have the flexibility to bind it to a phase which is part of a well defined life cycle. You get the best of both worlds this way. Perhaps the doxia plugin would work? http://maven.apache.org/doxia/book/index.html Not sure what you are doing in your profile that solves your issue though. If you give some further info on this, perhaps some of the more experieced Maven users can provide you with a pure Maven solution. If you wish to run something independently, you don't need ant or Maven for this. Run run the executable. --- Todd Thiessen -Original Message- From: Trevor Harmon [mailto:tre...@vocaro.com] Sent: Tuesday, December 16, 2008 2:34 PM To: Maven Users List Subject: Re: Are Maven profiles like Ant targets? On Dec 16, 2008, at 10:43 AM, Todd Thiessen wrote: You probably want to use a plugin. For instance you could use the DocBook plugin. http://maven-plugins.sourceforge.net/maven-sdocbook-plugin/index.html The sdocbook plugin does not work with Maven 2. I also tried the more recent docbook plugin: http://mojo.codehaus.org/docbook-maven-plugin/ But it's in a very alpha stage and lacks basic features (e.g. PDF generation). That's why I'm using the AntRun plugin; it gives me access to Ant's Xslt task for transforming DocBook. You will also want to get a better understanding of Maven's build lifecycle and undertand how lifecycles, phases and goals are related. It is more complex than ant targets but is also far more powerful. http://books.sonatype.com/maven-book/reference/lifecycle.html I'm familiar with the lifecycles, but it's strange you should say they are more powerful than Ant targets because they seem less powerful, at least when using the AntRun plugin. For example, my DocBook AntRun stuff is used for generating developer documentation, so binding it to any of the default lifecycle phases doesn't make sense. The site phase of the site lifecycle is probably the best place to put it, but then it gets tossed in with everything else in that phase. There's no way to run the DocBook stuff by itself; I have to run it along with everything else in the site phase. So in that sense, lifecycles are less powerful than Ant targets because they are more coarsely grained. I don't have the same control over what gets run. If, however, I put the DocBook stuff into a separate profile then suddenly I have that control. I don't know how else to get it without profiles. Trevor - 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: Final Memory
What does the Final Memory detail represent when Maven finishes? I can't find any documentation on what the two numbers mean. [INFO] Final Memory: 1M/4M I'm not certain, but I'd expect the first number to be amount of memory currently consumed when this INFO log was generated and the second to be the largest amount of memory consumed during the build. Or something along those lines. I've never paid a lot of attention to it, to be honest. You could probably grep the Maven source and find it pretty quickly, if you cared enough. (If someone does that and finds out the answer, please post it.) Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: MAVEN certifications
LOL. Now I get it... I can now see how I will love this as well --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Tue, Dec 16, 2008 at 2:50 PM, Wayne Fay wayne...@gmail.com wrote: Just out of curiosity, why is this your new favorite site? So to take this off topic, but I saw this and wonder where the use case for this site is? i think I might be missing something LetMeGoogleThatForYou.com provides a means of teaching someone how to use Google, in case they don't already know. It is a (mildly rude) way of (indirectly) reprimanding someone when they ask a question that can easily be answered without asking someone else, while still answering the question they asked. The best use of the site I've seen lately was someone on this list asking for the definition of modicum after I used that word in an email. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Resport of Junit tests in other folder
Hello, I am trying to compile and test a program and it works, but the report of the tests are stored in target\surefire-reports the default directory. I have changed it with the following pom.xml changing outputDirectory of both plugins maven-surefire-report-plugin and maven-site-plugin but it still stores the xml files of the results in the default directory. Does anyone knows what am I doing wrong? thanks in advanced. project modelVersion4.0.0/modelVersion groupIdorg.MyTests.Test/groupId artifactIdProgram/artifactId packagingjar/packaging nameMyProgram/name version0.0.1/version descriptionMy program project/description build sourceDirectorysrc\net\sourceforge\cruisecontrol\sampleproject\connectfour/sourceDirectory testSourceDirectorytest\net\sourceforge\cruisecontrol\sampleproject\connectfour/testSourceDirectory defaultGoalinstall/defaultGoal directory${basedir}/target/directory finalName${artifactId}-${version}/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId configuration archive manifest mainClassnet.sourceforge.cruisecontrol.sampleproject.connectfour.PlayingStand/mainClass addClasspathfalse/addClasspath /manifest /archive /configuration /plugin /plugins /build reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId version2.4.2/version configuration outputDirectory${basedir}/target/test-report/outputDirectory /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version2.0-beta-5/version configuration outputDirectory${basedir}/target/test-report/outputDirectory /configuration /plugin /plugins /reporting dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies /project -- View this message in context: http://www.nabble.com/Resport-of-Junit-tests-in-other-folder-tp21040830p21040830.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: Re: MAVEN certifications
As opposed to www.just^%^inggoogleit.com which is the blatantly rude way :) On Dec 16, 2008 7:50pm, Wayne Fay wayne...@gmail.com wrote: Just out of curiosity, why is this your new favorite site? So to take this off topic, but I saw this and wonder where the use case for this site is? i think I might be missing something LetMeGoogleThatForYou.com provides a means of teaching someone how to use Google, in case they don't already know. It is a (mildly rude) way of (indirectly) reprimanding someone when they ask a question that can easily be answered without asking someone else, while still answering the question they asked. The best use of the site I've seen lately was someone on this list asking for the definition of modicum after I used that word in an email. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Are Maven profiles like Ant targets?
On Dec 16, 2008, at 2:54 PM, Todd Thiessen wrote: They are more powerful in the sense that you can still call any goal independantly But if I have two tasks implemented with AntRun, there's no way to call them independently because there's only one goal: run. I guess most of my problems boil down to the limitations of the AntRun plugin. Perhaps the doxia plugin would work? http://maven.apache.org/doxia/book/index.html That plugin is fine if you want to use DocBook as a source for Doxia, but it's not designed for stand-alone documentation created using DocBook and the DocBook XSL stylesheets. The Xslt task in Ant works great for that, though. Not sure what you are doing in your profile that solves your issue though. If you give some further info on this, perhaps some of the more experieced Maven users can provide you with a pure Maven solution. Let me use a different plugin as an example. Let's say I'm developing a desktop application, and it runs in two different modes depending on the command-line options. I don't want to keep typing in the same long string of options all the time, so I pickle them into two separate Ant targets, mode1 and mode2. Then I can run them like this: ant mode1 ant mode2 How would I accomplish this in Maven? There's the exec plugin, but it has only one goal (exec:java). There's no way to run the application in two different ways with just that one goal. Not without profiles, that is. With profiles, I can create two profiles, mode1 and mode2, and define an exec plugin in each one. Then I can run them like this: mvn -Pmode1 exec:java mvn -Pmode2 exec:java So there's an example where profiles have nothing to do with build portability and are playing the same role as Ant targets. If you wish to run something independently, you don't need ant or Maven for this. Run run the executable. Isn't that like saying Ant or Maven aren't necessary for compiling Java code because you can just run the javac executable? Doesn't make sense... Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
setting ant attribute with value from pom
Hello, I'm having problem setting ant attribute with a property passed from pom file. Here is the pom part where I call ant target: ant antfile=build.xml target=update-dependencies-in-shared-repository property name=shared-repo value=${shared.repository}/ /ant Here is the ant file: project name=Update Shared Repository default=update-dependencies-in-shared-repository xmlns:artifact=urn:maven-artifact-ant path id=maven-ant-tasks.classpath path=lib/maven-ant-tasks-2.0.9.jar/ typedef resource=org/apache/maven/artifact/ant/antlib.xml uri=urn:maven-artifact-ant classpathref=maven-ant-tasks.classpath/ target name=update-dependencies-in-shared-repository echo${shared-repo}/echo artifact:dependencies filesetId=dependency.fileset artifact:pom id=maven.project file=pom.xml/ artifact:localRepository path=${shared-repo}/ /artifact:dependencies /target /project I'm interested in using ${shared-repo} parameter, but although echo prints the correct value of this parameter, it doesn't set localRepository path (and default is used instead). Hope my problem is clear and not too stupid :). Any help would be appreciated. Thanks -- View this message in context: http://www.nabble.com/setting-ant-attribute-with-value-from-pom-tp21042019p21042019.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: Resport of Junit tests in other folder
After reading the documentation here: http://maven.apache.org/plugins/maven-surefire-report-plugin/examples/report-custom-location.html It seems like outputDirectory customization is only designed to generate the html file somewhere else. Generating xml/txt files in a custom directory seems not supported. May I ask why are you trying to do this? If it really annoys you, feel you to file a feature request in the maven-surefire-report-plugin tracker. Cheers. 2008/12/16 JJ__ jesfa...@yahoo.es Hello, I am trying to compile and test a program and it works, but the report of the tests are stored in target\surefire-reports the default directory. I have changed it with the following pom.xml changing outputDirectory of both plugins maven-surefire-report-plugin and maven-site-plugin but it still stores the xml files of the results in the default directory. Does anyone knows what am I doing wrong? thanks in advanced. project modelVersion4.0.0/modelVersion groupIdorg.MyTests.Test/groupId artifactIdProgram/artifactId packagingjar/packaging nameMyProgram/name version0.0.1/version descriptionMy program project/description build sourceDirectorysrc\net\sourceforge\cruisecontrol\sampleproject\connectfour/sourceDirectory testSourceDirectorytest\net\sourceforge\cruisecontrol\sampleproject\connectfour/testSourceDirectory defaultGoalinstall/defaultGoal directory${basedir}/target/directory finalName${artifactId}-${version}/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId configuration archive manifest mainClassnet.sourceforge.cruisecontrol.sampleproject.connectfour.PlayingStand/mainClass addClasspathfalse/addClasspath /manifest /archive /configuration /plugin /plugins /build reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId version2.4.2/version configuration outputDirectory${basedir}/target/test-report/outputDirectory /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version2.0-beta-5/version configuration outputDirectory${basedir}/target/test-report/outputDirectory /configuration /plugin /plugins /reporting dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies /project -- View this message in context: http://www.nabble.com/Resport-of-Junit-tests-in-other-folder-tp21040830p21040830.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 -- Baptiste Batmat MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
Re: Resport of Junit tests in other folder
Thank you very much. I needed it because I wanted to integrate tests results with other tools and I prefered to change maven folder rather than changing the folder of all the other tools. Baptiste MATHUS-4 wrote: After reading the documentation here: http://maven.apache.org/plugins/maven-surefire-report-plugin/examples/report-custom-location.html It seems like outputDirectory customization is only designed to generate the html file somewhere else. Generating xml/txt files in a custom directory seems not supported. May I ask why are you trying to do this? If it really annoys you, feel you to file a feature request in the maven-surefire-report-plugin tracker. Cheers. 2008/12/16 JJ__ jesfa...@yahoo.es Hello, I am trying to compile and test a program and it works, but the report of the tests are stored in target\surefire-reports the default directory. I have changed it with the following pom.xml changing outputDirectory of both plugins maven-surefire-report-plugin and maven-site-plugin but it still stores the xml files of the results in the default directory. Does anyone knows what am I doing wrong? thanks in advanced. project modelVersion4.0.0/modelVersion groupIdorg.MyTests.Test/groupId artifactIdProgram/artifactId packagingjar/packaging nameMyProgram/name version0.0.1/version descriptionMy program project/description build sourceDirectorysrc\net\sourceforge\cruisecontrol\sampleproject\connectfour/sourceDirectory testSourceDirectorytest\net\sourceforge\cruisecontrol\sampleproject\connectfour/testSourceDirectory defaultGoalinstall/defaultGoal directory${basedir}/target/directory finalName${artifactId}-${version}/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId configuration archive manifest mainClassnet.sourceforge.cruisecontrol.sampleproject.connectfour.PlayingStand/mainClass addClasspathfalse/addClasspath /manifest /archive /configuration /plugin /plugins /build reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId version2.4.2/version configuration outputDirectory${basedir}/target/test-report/outputDirectory /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version2.0-beta-5/version configuration outputDirectory${basedir}/target/test-report/outputDirectory /configuration /plugin /plugins /reporting dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies /project -- View this message in context: http://www.nabble.com/Resport-of-Junit-tests-in-other-folder-tp21040830p21040830.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 -- Baptiste Batmat MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor ! -- View this message in context: http://www.nabble.com/Resport-of-Junit-tests-in-other-folder-tp21040830p21042220.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: Tests run fine in NetBeans, but fail using command line Maven
On Tue, Dec 16, 2008 at 12:48 AM, Marat Radchenko slonopotamusor...@gmail.com wrote: They should. Unless you managed to write them in such way that they don't. So it could be: - Issues with the isolation of your tests from each other - Issues with your Maven project configuration - Something that Maven enforces that Netbeans does not Hard to say without knowing a lot more about what's happening. - Geoffrey -- Geoffrey Wiseman http://www.geoffreywiseman.ca/
RE: Are Maven profiles like Ant targets?
--- Todd Thiessen -Original Message- From: Trevor Harmon [mailto:tre...@vocaro.com] Sent: Tuesday, December 16, 2008 3:59 PM To: Maven Users List Subject: Re: Are Maven profiles like Ant targets? On Dec 16, 2008, at 2:54 PM, Todd Thiessen wrote: They are more powerful in the sense that you can still call any goal independantly But if I have two tasks implemented with AntRun, there's no way to call them independently because there's only one goal: run. I guess most of my problems boil down to the limitations of the AntRun plugin. Perhaps the doxia plugin would work? http://maven.apache.org/doxia/book/index.html That plugin is fine if you want to use DocBook as a source for Doxia, but it's not designed for stand-alone documentation created using DocBook and the DocBook XSL stylesheets. The Xslt task in Ant works great for that, though. Not sure what you are doing in your profile that solves your issue though. If you give some further info on this, perhaps some of the more experieced Maven users can provide you with a pure Maven solution. Let me use a different plugin as an example. Let's say I'm developing a desktop application, and it runs in two different modes depending on the command-line options. I don't want to keep typing in the same long string of options all the time, so I pickle them into two separate Ant targets, mode1 and mode2. Then I can run them like this: ant mode1 ant mode2 How would I accomplish this in Maven? There's the exec plugin, but it has only one goal (exec:java). There's no way to run the application in two different ways with just that one goal. I believe that there is. I know you can configure a goal with different executions. There is a decent explanation here: Not without profiles, that is. With profiles, I can create two profiles, mode1 and mode2, and define an exec plugin in each one. Then I can run them like this: mvn -Pmode1 exec:java mvn -Pmode2 exec:java So there's an example where profiles have nothing to do with build portability and are playing the same role as Ant targets. If you wish to run something independently, you don't need ant or Maven for this. Run run the executable. Isn't that like saying Ant or Maven aren't necessary for compiling Java code because you can just run the javac executable? Doesn't make sense... Trevor - 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: Tests run fine in NetBeans, but fail using command line Maven
The tests run fine when I run them individually using Maven at the command line (or from within NetBeans or Eclipse -- I don't think the IDE is an issue since the same thing happens in the IDE as at the command line): $ mvn -Dtest=MultipleDaoTest test-compile surefire:test [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'surefire'. [INFO] [INFO] Building lifecycle-manager [INFO]task-segment: [test-compile, surefire:test] [INFO] [INFO] [compiler:compile] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test] [INFO] Surefire report directory: c:\dev\projects\lifecycle-manager\target\surefire-reports --- T E S T S --- Running com.mycom.network.lifecycle.persistence.dao.MultipleDaoTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.282 sec Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] BUILD SUCCESSFUL [INFO] However if I run a full build I get errors for the same tests which pass individually: $ mvn clean install ... Failed tests: testSaveDeleteFindAll(com.mycom.network.lifecycle.persistence.dao.MultipleDaoTest) I have a simple pom.xml with dependencies, etc., nothing unusual. My tests extend Spring's AbstractTransactionalDataSourceSpringContextTests class, which creates a transaction for each test method and rolls back when the test is complete. Seems pretty vanilla to me, which is why I'm so perplexed. --James Geoffrey Wiseman wrote: On Tue, Dec 16, 2008 at 12:48 AM, Marat Radchenko slonopotamusor...@gmail.com wrote: They should. Unless you managed to write them in such way that they don't. So it could be: - Issues with the isolation of your tests from each other - Issues with your Maven project configuration - Something that Maven enforces that Netbeans does not Hard to say without knowing a lot more about what's happening. - Geoffrey -- Geoffrey Wiseman http://www.geoffreywiseman.ca/ -- View this message in context: http://www.nabble.com/Tests-run-fine-individually%2C-but-some-fail-when-run-as-part-of-%27mvn-install%27-tp21019373p21043070.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: Are Maven profiles like Ant targets?
Bah. Ignore last. Hit send by mistake. --- Todd Thiessen Let me use a different plugin as an example. Let's say I'm developing a desktop application, and it runs in two different modes depending on the command-line options. I don't want to keep typing in the same long string of options all the time, so I pickle them into two separate Ant targets, mode1 and mode2. Then I can run them like this: ant mode1 ant mode2 How would I accomplish this in Maven? There's the exec plugin, but it has only one goal (exec:java). There's no way to run the application in two different ways with just that one goal. I believe there is. Plugin can have different executions. There is some documentation about that here: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycl e.html#Plugins and I believe the definitive guide has some examples too. You should be able to execute the same exe with as many different parameters as you like. But you still would have to bind it to a phase, which you don't want to do. So I agree with you that Maven is definitely heavy weight if all you wish to do is execute an exe with different parameters each time. It doesn't do this nicely. You probably just want a simple script for that. If you wish to run something independently, you don't need ant or Maven for this. Run run the executable. Isn't that like saying Ant or Maven aren't necessary for compiling Java code because you can just run the javac executable? Doesn't make sense... Not at all. If all I wanted to do is compile java code, then javac would be the tool of choice. But developers generally want to do a whole lot more in conjuntion with compiling java code. If all you want to do is run some exe, then using ant or maven is somewhat overkill. A script does this just fine. But if the reason why you are running this exe is somehow linked to building your overall project, then binding it to a certain phase starts to make sense. It all depends on what you want. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Tests run fine in NetBeans, but fail using command line Maven
On Tue, Dec 16, 2008 at 5:20 PM, James Adams monoco...@gmail.com wrote: The tests run fine when I run them individually using Maven at the command line (or from within NetBeans or Eclipse -- I don't think the IDE is an issue since the same thing happens in the IDE as at the command line): [nod] So, sounds more like a problem with the tests themselves, at this point, rather than Maven vs. IDE; Can NB run the whole suite at once, and if so, does that exhibit the same result? Failed tests: testSaveDeleteFindAll(com.mycom.network.lifecycle.persistence.dao.MultipleDaoTest) What's the failure that's occurring? - Geoffrey -- Geoffrey Wiseman http://www.geoffreywiseman.ca/
Re: Tests run fine in NetBeans, but fail using command line Maven
Geoffrey Wiseman wrote: On Tue, Dec 16, 2008 at 5:20 PM, James Adams monoco...@gmail.com wrote: The tests run fine when I run them individually using Maven at the command line (or from within NetBeans or Eclipse -- I don't think the IDE is an issue since the same thing happens in the IDE as at the command line): [nod] So, sounds more like a problem with the tests themselves, at this point, rather than Maven vs. IDE; Can NB run the whole suite at once, and if so, does that exhibit the same result? Yes I get the same thing from within the IDE -- a full build fails with the same errors as when using command line. Failed tests: testSaveDeleteFindAll(com.mycom.network.lifecycle.persistence.dao.MultipleDaoTest) What's the failure that's occurring? I am getting errors such as the number of expected objects found in the database are greater than what was expected. I am running my DAO tests using an embedded HSQLDB database, so I expect to start with a fresh table every time, then do some inserts, etc., then do a find call to see how many are in the table, and then make an assertion based on the expected number, and this is where it fails when running a full build. I also get errors for a test which is listening to a message queue for messages to be consumed, and this one fails as often as not during a full build but passes every time when running by itself. -- View this message in context: http://www.nabble.com/Tests-run-fine-individually%2C-but-some-fail-when-run-as-part-of-%27mvn-install%27-tp21019373p21043481.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: Are Maven profiles like Ant targets?
On Wed, Dec 17, 2008 at 6:58 AM, Trevor Harmon tre...@vocaro.com wrote: That plugin is fine if you want to use DocBook as a source for Doxia, but it's not designed for stand-alone documentation created using DocBook and the DocBook XSL stylesheets. The Xslt task in Ant works great for that, though. I've had good luck with the docbkx plugin http://code.google.com/p/docbkx-tools/ I'm using it to generate html from DocBook files in Maven 2. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven 2.0.9+ and windows absolute paths
Hi, It seems that Maven 2.0.9 has introduced a bug where Windows absolute paths aren't being properly resolved. A project that builds just fine with 2.0.8 produces this error under 2.0.9: [INFO] An Ant BuildException has occured: Failed to copy E:\svn\team\csa\main\re sources\WEB-INF\log4j-production.xml to E:\svn\team\csa\main\e:\temp\maven\csa\t arget\csa-5.2.1\WEB-INF\classes\log4j.xml due to java.io.FileNotFoundException E :\svn\team\csa\main\e:\temp\maven\csa\target\csa-5.2.1\WEB-INF\classes\log4j.xml (The filename, directory name, or volume label syntax is incorrect) Notice that e: is being treated as a relative path. Here's the plugin where the error happens: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId version1.3/version executions execution idcopy-extra/id phaseprocess-resources/phase configuration tasks copy tofile=${buildDirectory}/${artifactId}-${version}/WEB-INF/classes/log4j.xml file=resources/WEB-INF/log4j-production.xml overwrite=true/ copy tofile=${buildDirectory}/${artifactId}-${version}/META-INF/context.xml file=resources/WEB-INF/conf/context.xml overwrite=true/ /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin ${buildDirectory} is defined in the same pom as: buildDirectory${project.build.directory}/buildDirectory And the project's output directory is set in a parent pom: outputDirectory${buildDir}/classes/outputDirectory properties workDir${java.io.tmpdir}/workDir buildDir${workDir}/maven/${pom.artifactId}/target/buildDir /properties Has anyone seen this or similar problem before, any ideas how to solve it? I've tried compiling the latest version of Maven 2.1 from the subversion repo and I'm getting the same error there too. Thanks Dmitry - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Are Maven profiles like Ant targets?
On Dec 16, 2008, at 5:24 PM, Todd Thiessen wrote: I believe there is. Plugin can have different executions. There is some documentation about that here: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycl e.html#Plugins But that doesn't work for the exec plugin. I'd be grateful if someone could prove me wrong. and I believe the definitive guide has some examples too. No, in the book they always pass the exec arguments on the command line. See: http://books.sonatype.com/maven-book/reference/customizing.html#section-custom-exec But you still would have to bind it to a phase, which you don't want to do. I'm not trying to avoid anything. If binding to a phase would solve the problems, then I'd do it. But simply binding a plugin to a phase is not enough, for reasons I have shown. So I agree with you that Maven is definitely heavy weight if all you wish to do is execute an exe with different parameters each time. It doesn't do this nicely. You probably just want a simple script for that. Or I could just use profiles. Trevor - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven 2.0.9+ and windows absolute paths
Dmitry Beransky wrote: Hi, It seems that Maven 2.0.9 has introduced a bug where Windows absolute paths aren't being properly resolved. [snip] Are you running Maven under Cygwin? - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How do I build one jar per class file controlling the name of the jar?
I am using an open source product that requires a jar to be built for every single .java file. The java files are all in the same directory like so: src/main/java/com/acme/product/Name1.java src/main/java/com/acme/product/Name2.java src/main/java/com/acme/product/Name3.java What I need to build are 3 jar files with only one class in each and have the name of each jar file be the same as the Java class name so like: Name1.jar Name2.jar Name3.jar and then I need to copy these files to a specific directory. Is there a way to do this with maven? ( examples please !!!) -- View this message in context: http://www.nabble.com/How-do-I-build-one-jar-per-class-file-controlling-the-name-of-the-jar--tp21044507p21044507.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 build one jar per class file controlling the name of the jar?
You need to create individual jar modules for each class, then use the assembly plugin to group them together. --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Tue, Dec 16, 2008 at 3:54 PM, CheapLisa l...@purpleblade.net wrote: I am using an open source product that requires a jar to be built for every single .java file. The java files are all in the same directory like so: src/main/java/com/acme/product/Name1.java src/main/java/com/acme/product/Name2.java src/main/java/com/acme/product/Name3.java What I need to build are 3 jar files with only one class in each and have the name of each jar file be the same as the Java class name so like: Name1.jar Name2.jar Name3.jar and then I need to copy these files to a specific directory. Is there a way to do this with maven? ( examples please !!!) -- View this message in context: http://www.nabble.com/How-do-I-build-one-jar-per-class-file-controlling-the-name-of-the-jar--tp21044507p21044507.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: Re: MAVEN certifications
http://letmegooglethatforyou.com/?q=letmegooglethatforyou Sweet sweet recursion :). On Wed, Dec 17, 2008 at 7:02 AM, martijnverb...@gmail.com wrote: As opposed to www.just^%^inggoogleit.com which is the blatantly rude way :) On Dec 16, 2008 7:50pm, Wayne Fay wayne...@gmail.com wrote: Just out of curiosity, why is this your new favorite site? So to take this off topic, but I saw this and wonder where the use case for this site is? i think I might be missing something LetMeGoogleThatForYou.com provides a means of teaching someone how to use Google, in case they don't already know. It is a (mildly rude) way of (indirectly) reprimanding someone when they ask a question that can easily be answered without asking someone else, while still answering the question they asked. The best use of the site I've seen lately was someone on this list asking for the definition of modicum after I used that word in an email. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Tests run fine in NetBeans, but fail using command line Maven
On Tue, Dec 16, 2008 at 5:45 PM, James Adams monoco...@gmail.com wrote: Yes I get the same thing from within the IDE -- a full build fails with the same errors as when using command line. So, if you can run the same tests without Maven and get the same errors, that seems to point pretty conclusively to the tests themselves. I am getting errors such as the number of expected objects found in the database are greater than what was expected. I am running my DAO tests using an embedded HSQLDB database, so I expect to start with a fresh table every time, then do some inserts, etc., then do a find call to see how many are in the table, and then make an assertion based on the expected number, and this is where it fails when running a full build. I also get errors for a test which is listening to a message queue for messages to be consumed, and this one fails as often as not during a full build but passes every time when running by itself. If the tests leaving things in the database, I'm vaguely surprised that running a single test twice doesn't have the same problem. Although if you're using an Embedded HSQLDB, perhaps you're not persisting the database. You could try and verify the database state in an @AfterTransaction call if you're using the annotated spring test runner. Sounds like the database rollback isn't working as expected, to me -- although it's difficult to tell over an email conversation. ;) -- View this message in context: http://www.nabble.com/Tests-run-fine-individually%2C-but-some-fail-when-run-as-part-of-%27mvn-install%27-tp21019373p21043481.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 -- Geoffrey Wiseman http://www.geoffreywiseman.ca/
Re: MAVEN certifications
Here's a fun one for you: http://letmegooglethatforyou.com/?q=jfgi Combines the indirectly and directly rude methods of suggesting someone performs their own search before pegging the list-serve. On Tue, Dec 16, 2008 at 2:50 PM, Wayne Fay wayne...@gmail.com wrote: Just out of curiosity, why is this your new favorite site? So to take this off topic, but I saw this and wonder where the use case for this site is? i think I might be missing something LetMeGoogleThatForYou.com provides a means of teaching someone how to use Google, in case they don't already know. It is a (mildly rude) way of (indirectly) reprimanding someone when they ask a question that can easily be answered without asking someone else, while still answering the question they asked. The best use of the site I've seen lately was someone on this list asking for the definition of modicum after I used that word in an email. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: MAVEN certifications
I love this group!! --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Tue, Dec 16, 2008 at 6:34 PM, Josh Suereth joshua.suer...@gmail.comwrote: Here's a fun one for you: http://letmegooglethatforyou.com/?q=jfgi Combines the indirectly and directly rude methods of suggesting someone performs their own search before pegging the list-serve. On Tue, Dec 16, 2008 at 2:50 PM, Wayne Fay wayne...@gmail.com wrote: Just out of curiosity, why is this your new favorite site? So to take this off topic, but I saw this and wonder where the use case for this site is? i think I might be missing something LetMeGoogleThatForYou.com provides a means of teaching someone how to use Google, in case they don't already know. It is a (mildly rude) way of (indirectly) reprimanding someone when they ask a question that can easily be answered without asking someone else, while still answering the question they asked. The best use of the site I've seen lately was someone on this list asking for the definition of modicum after I used that word in an email. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Enforce plugin versions and reporting plugins
This was the analysis I did that the time: http://www.nabble.com/releasing-the-enforcer-tt18419873.html#a18419873 -Original Message- From: Nick Stolwijk [mailto:nick.stolw...@gmail.com] Sent: Saturday, December 13, 2008 11:35 AM To: Maven Users List Subject: Re: Enforce plugin versions and reporting plugins mvn help:effective-pom shows that there is no version declared. So, somehow, it should be possible to check this. Is it possible to parse the output of help:effective-pom to create an extra rule to check on the reporting plugins? With regards, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl On Fri, Dec 12, 2008 at 9:53 PM, Brian E. Fox bri...@reply.infinity.nu wrote: The reporting plugin / plugin interaction is a known issue. It's not easy to solve in the current 2.0.x code and I chose to release it anyway pending a more thorough fix down the road. Use case 3 is the only time it should show up. The problem is that when you run site lifecycle phases, the reporting plugins are injected into the model in the plugin section, so there's no way for me to tell them apart. There's an open jira for this. -Original Message- From: Nick Stolwijk [mailto:nick.stolw...@gmail.com] Sent: Friday, December 12, 2008 9:28 AM To: Maven Users List Subject: Enforce plugin versions and reporting plugins I've been trying to enforce my plugin versions with the enforcer plugin and this works fine for plugins used during the build, but I am a bit confused about the plugins used by the reporting section. A few cases: 1. Declare reporting plugin in reporting section without a version -Enforcer plugins fails on plugin without a version - help:effective-pom doesn't show a version 2. Declare reporting plugin in reporting section with a version - Enforcer plugin doesn't complain. - help:effective-pom shows the version 3. Declare reporting plugin in reporting section without a version and declare a build/pluginmanagement/plugin with a version - Enforcer plugin doesn't complain. - help:effective-pom doesn't show a version Especially use case 3 seems a bit off. I know of the issues with missing reporting/pluginmanagment tag, but can this be solved in the requirepluginversions rule? With regards, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl - 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: Using a SNAPSHOT version for a parent
Yes what you have done is right. Can you show your settings so I can see how you're telling Maven about Nexus? -Original Message- From: Todd Thiessen [mailto:thies...@nortel.com] Sent: Thursday, December 11, 2008 8:45 AM To: Maven Users List Subject: RE: Using a SNAPSHOT version for a parent When you say yes it's right does that mean that SNAPSHOT parents should automatically get downloaded or does that mean that SNAPSHOT parents should NOT automatically get downloaded. My snapshot Nexus repository is set to SNAPSHOT policy, which I believe is correct. --- Todd Thiessen -Original Message- From: Brian Fox [mailto:bri...@reply.infinity.nu] Sent: Wednesday, December 10, 2008 7:10 PM To: Maven Users List Subject: Re: Using a SNAPSHOT version for a parent Yes it's right but make sure you have enabled snapshots for the repo in question. By default only releases are enabled for repos --Brian (mobile) On Dec 10, 2008, at 4:19 PM, Todd Thiessen thies...@nortel.com wrote: If I deploy a SNAPSHOT version of a parent POM, POMs that reference it do not automatically download (even when running a bootstrap profile). ie: Is this supported? parent artifactIdtheid/artifactId groupIdthegroup/groupId version0.0.1-SNAPSHOT/version /parent If the artifact already exists in my local repo, everything is fine. However, if I deploy a released version of the artifact and change the parent reference accordingly parent artifactIdtheid/artifactId groupIdthegroup/groupId version0.0.1/version /parent POMs that reference it, automatically download it. Is it supposed to work this way? --- Todd Thiessen - 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: MAVEN certifications
Phew. I was wondering how to explain it to you ;-) -Original Message- From: mknut...@baselogic.com [mailto:mknut...@baselogic.com] On Behalf Of Mick Knutson Sent: Tuesday, December 16, 2008 3:07 PM To: Maven Users List Subject: Re: MAVEN certifications LOL. Now I get it... I can now see how I will love this as well --- Thank You... Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Tue, Dec 16, 2008 at 2:50 PM, Wayne Fay wayne...@gmail.com wrote: Just out of curiosity, why is this your new favorite site? So to take this off topic, but I saw this and wonder where the use case for this site is? i think I might be missing something LetMeGoogleThatForYou.com provides a means of teaching someone how to use Google, in case they don't already know. It is a (mildly rude) way of (indirectly) reprimanding someone when they ask a question that can easily be answered without asking someone else, while still answering the question they asked. The best use of the site I've seen lately was someone on this list asking for the definition of modicum after I used that word in an email. Wayne - 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
[2.0.10 RC6] please test
Hello, Thanks everyone for sticking with us this far. I have high hopes of this being the last RC. This RC fixes MNG-3898 and updates the default plugin versions in the super pom. You can see the changes to the super pom and specific versions used here: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.10-RC/m aven-project/src/main/resources/org/apache/maven/project/pom-4.0.0.xml?r 1=708789r2=726765diff_format=h Here's the list of issues fixed in 2.0.10 (updated to remove the wagon fixes that were rolled back): http://jira.codehaus.org/secure/ReleaseNote.jspa?version=14112styleName =HtmlprojectId=10500Create=Create And I've staged RC-6 here: http://people.apache.org/~brianf/staging-repository/org/apache/maven/apa che-maven/2.0.10-RC6/ Please try it out and see if we have any remaining regressions over 2.0.9. Thanks, Brian -- Brian Fox Apache Maven PMC http://blogs.sonatype.com/brian/ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Version ranges
Hi, Do version ranges work across Maven plugins or are they limited to Maven core functionality? As an example I defined a dependency with a range of version [4.4.2.01,)/version and all was well. But when I tried to use the same notation with the maven-dependency-plugin 2.0 it results in a fatal error stating that version was null for the groupId:artifactId Is there a way around this with ranges or do I have to resort to ensuring that versions are explicitly stated? Thanks, Robert