pluginManagement is confusing me..
Hi I have a parent pom and a child POM. *Parent POM is like : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version modules modulemavenProj/module /modules packagingpom/packaging build pluginManagement plugins plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId version1.0/version configuration greetingswelcome/greetings /configuration /plugin /plugins /pluginManagement /build pluginRepositories pluginRepository id228655859/id namehosted/name urlhttp://localhost/hostedRepo//url /pluginRepository /pluginRepositories /project *And Child POM is : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdmavenProj/artifactId version1.0-SNAPSHOT/version descriptionProject for mavenProj/description parent groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version /parent /project Please note that I have created a maven plugin (hiPlugin) that takes a string via greetings and just shows it. *Question : My question is when I rum this plugin's goal on the child POM I am getting the output. I was expecting nothing to happen since I haven't specified plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId /plugin section in my child POM. And the maven documentation also says you won't be able to run any plugin defined the the plugiManagement section unless you specify that plugin in child POM. here is the link : http://maven.apache.org/pom.html#Plugin_Management Thanks, Amaresh ** *
Re: pluginManagement is confusing me..
amaresh, you include the plugin in the Parent therefore it is automatically available in the child. chuck On 04/11/2011 08:08 AM, amaresh mourya wrote: Hi I have a parent pom and a child POM. *Parent POM is like : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version modules modulemavenProj/module /modules packagingpom/packaging build pluginManagement plugins plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId version1.0/version configuration greetingswelcome/greetings /configuration /plugin /plugins /pluginManagement /build pluginRepositories pluginRepository id228655859/id namehosted/name urlhttp://localhost/hostedRepo//url /pluginRepository /pluginRepositories /project *And Child POM is : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdmavenProj/artifactId version1.0-SNAPSHOT/version descriptionProject for mavenProj/description parent groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version /parent /project Please note that I have created a maven plugin (hiPlugin) that takes a string viagreetings and just shows it. *Question : My question is when I rum this plugin's goal on the child POM I am getting the output. I was expecting nothing to happen since I haven't specified plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId /plugin section in my child POM. And the maven documentation also says you won't be able to run any plugin defined the the plugiManagement section unless you specify that plugin in child POM. here is the link : http://maven.apache.org/pom.html#Plugin_Management Thanks, Amaresh ** * - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: pluginManagement is confusing me..
But its in pluginManagement section. maven documentation says it won't be available to child POM unless I specify that plugin in build section. Please see following lines in my previous discussions: *PluginManagement does ONE THING ONLY (essentially). It provides a central location for all of your plugin versioning and configuration. THAT'S IT. You still need to declare the plugin in the build section of your various poms (children or parents) where you actually want to USE any of those plugins in your build.* http://www.mail-archive.com/users@maven.apache.org/msg115850.html thanks --Amaresh On Mon, Apr 11, 2011 at 11:43 AM, Charles Williams ch...@itadmins.netwrote: amaresh, you include the plugin in the Parent therefore it is automatically available in the child. chuck On 04/11/2011 08:08 AM, amaresh mourya wrote: Hi I have a parent pom and a child POM. *Parent POM is like : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version modules modulemavenProj/module /modules packagingpom/packaging build pluginManagement plugins plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId version1.0/version configuration greetingswelcome/greetings /configuration /plugin /plugins /pluginManagement /build pluginRepositories pluginRepository id228655859/id namehosted/name urlhttp://localhost/hostedRepo//url /pluginRepository /pluginRepositories /project *And Child POM is : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdmavenProj/artifactId version1.0-SNAPSHOT/version descriptionProject for mavenProj/description parent groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version /parent /project Please note that I have created a maven plugin (hiPlugin) that takes a string viagreetings and just shows it. *Question : My question is when I rum this plugin's goal on the child POM I am getting the output. I was expecting nothing to happen since I haven't specified plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId /plugin section in my child POM. And the maven documentation also says you won't be able to run any plugin defined the the plugiManagement section unless you specify that plugin in child POM. here is the link : http://maven.apache.org/pom.html#Plugin_Management Thanks, Amaresh ** * - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Testing MDB's (integration / junit) how?
To test an MDB you need a container. Either wrap as an integration test (probably using FailSafe) and/or, better yet: Use OpenEJB and plain JUnit for that. -- -- Aldrin Leal, ald...@leal.eng.br / http://www.leal.eng.br/mnemetica/ On Mon, Apr 11, 2011 at 1:16 AM, Andrew Hughes ahhug...@gmail.com wrote: Howdy, I want to be able to check that the MDB's created actually execute and behave as expected. For reference, the EE5 tutorial ( http://download.oracle.com/javaee/5/tutorial/doc/bnbpq.html) covers two equivalent tests : - *Building, Deploying, and Running the simplemessage Application Using NetBeans IDE* - *Building, Deploying, and Running the simplemessage Application Using Ant* I can't work out how this is best done in Maven (because surprise, surprise, the NetBean's ant scrips are less than intuitive) and I can't find any doco examples on this. Help would be excellent :) Cheers.
Re: pluginManagement is confusing me..
hi All, Plugins defined in pluginManagement sections are applicable to that POM or not? --Amaresh On Mon, Apr 11, 2011 at 11:48 AM, amaresh mourya amaresh.mou...@gmail.comwrote: But its in pluginManagement section. maven documentation says it won't be available to child POM unless I specify that plugin in build section. Please see following lines in my previous discussions: *PluginManagement does ONE THING ONLY (essentially). It provides a central location for all of your plugin versioning and configuration. THAT'S IT. You still need to declare the plugin in the build section of your various poms (children or parents) where you actually want to USE any of those plugins in your build.* http://www.mail-archive.com/users@maven.apache.org/msg115850.html thanks --Amaresh On Mon, Apr 11, 2011 at 11:43 AM, Charles Williams ch...@itadmins.netwrote: amaresh, you include the plugin in the Parent therefore it is automatically available in the child. chuck On 04/11/2011 08:08 AM, amaresh mourya wrote: Hi I have a parent pom and a child POM. *Parent POM is like : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version modules modulemavenProj/module /modules packagingpom/packaging build pluginManagement plugins plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId version1.0/version configuration greetingswelcome/greetings /configuration /plugin /plugins /pluginManagement /build pluginRepositories pluginRepository id228655859/id namehosted/name urlhttp://localhost/hostedRepo//url /pluginRepository /pluginRepositories /project *And Child POM is : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdmavenProj/artifactId version1.0-SNAPSHOT/version descriptionProject for mavenProj/description parent groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version /parent /project Please note that I have created a maven plugin (hiPlugin) that takes a string viagreetings and just shows it. *Question : My question is when I rum this plugin's goal on the child POM I am getting the output. I was expecting nothing to happen since I haven't specified plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId /plugin section in my child POM. And the maven documentation also says you won't be able to run any plugin defined the the plugiManagement section unless you specify that plugin in child POM. here is the link : http://maven.apache.org/pom.html#Plugin_Management Thanks, Amaresh ** * - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: pluginManagement is confusing me..
The documentation is a little bit ambigious. What it means is: In pluginManagement you specify the default configuration and versions of plugins used unless explicitly overwritten. Think of it as a template. No plugin goal is executed just because you mention it in pluginManagement section. To actually execute a plugin you need to reference it in the buildplugins section of a (inheriting) pom or, as you have propably done invoke it explicitly via 'mvn myplugin:mygoal'. Either way, the configuration from the pluginManagement section is picked up. -Tim Am 11.04.2011 08:18, schrieb amaresh mourya: But its inpluginManagement section. maven documentation says it won't be available to child POM unless I specify that plugin inbuild section. Please see following lines in my previous discussions: *PluginManagement does ONE THING ONLY (essentially). It provides a central location for all of your plugin versioning and configuration. THAT'S IT. You still need to declare theplugin in thebuild section of your various poms (children or parents) where you actually want to USE any of those plugins in your build.* http://www.mail-archive.com/users@maven.apache.org/msg115850.html thanks --Amaresh On Mon, Apr 11, 2011 at 11:43 AM, Charles Williamsch...@itadmins.netwrote: amaresh, you include the plugin in the Parent therefore it is automatically available in the child. chuck On 04/11/2011 08:08 AM, amaresh mourya wrote: Hi I have a parent pom and a child POM. *Parent POM is like : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version modules modulemavenProj/module /modules packagingpom/packaging build pluginManagement plugins plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId version1.0/version configuration greetingswelcome/greetings /configuration /plugin /plugins /pluginManagement /build pluginRepositories pluginRepository id228655859/id namehosted/name urlhttp://localhost/hostedRepo//url /pluginRepository /pluginRepositories /project *And Child POM is : * ?xml version=1.0 encoding=UTF-8 ? project xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdApplication6/groupId artifactIdmavenProj/artifactId version1.0-SNAPSHOT/version descriptionProject for mavenProj/description parent groupIdApplication6/groupId artifactIdApplication6/artifactId version1.0-SNAPSHOT/version /parent /project Please note that I have created a maven plugin (hiPlugin) that takes a string viagreetings and just shows it. *Question : My question is when I rum this plugin's goal on the child POM I am getting the output. I was expecting nothing to happen since I haven't specified plugin groupIdMyPlugins/groupId artifactIdhiPlugin/artifactId /plugin section in my child POM. And the maven documentation also says you won't be able to run any plugin defined the the plugiManagement section unless you specify that plugin in child POM. here is the link : http://maven.apache.org/pom.html#Plugin_Management Thanks, Amaresh ** * - 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: Testing MDB's (integration / junit) how?
Thanks to both of you. The OpenEJB solution seems very clean, the openejb-examples-3.1.4.tar.gzhttp://www.apache.org/dyn/closer.cgi/openejb/3.1.4/openejb-examples-3.1.4.tar.gz and openejb-examples-3.1.4.ziphttp://www.apache.org/dyn/closer.cgi/openejb/3.1.4/openejb-examples-3.1.4.zip from http://openejb.apache.org/download.html contain simple-mdb and simple-mdb-with-descriptor examples that are both maven projects. This might be enough for me to get integration tests working, however... I would also like to persue embedded container deployment (such as Glassfish and/or JBoss... or ?). I am not sure if http://www.jboss.org/arquillian is a good solution or not, I'll look at this when the openejb solution is working. Thanks heaps! On Mon, Apr 11, 2011 at 3:53 PM, Aldrin Leal ald...@leal.eng.br wrote: To test an MDB you need a container. Either wrap as an integration test (probably using FailSafe) and/or, better yet: Use OpenEJB and plain JUnit for that. -- -- Aldrin Leal, ald...@leal.eng.br / http://www.leal.eng.br/mnemetica/ On Mon, Apr 11, 2011 at 1:16 AM, Andrew Hughes ahhug...@gmail.com wrote: Howdy, I want to be able to check that the MDB's created actually execute and behave as expected. For reference, the EE5 tutorial ( http://download.oracle.com/javaee/5/tutorial/doc/bnbpq.html) covers two equivalent tests : - *Building, Deploying, and Running the simplemessage Application Using NetBeans IDE* - *Building, Deploying, and Running the simplemessage Application Using Ant* I can't work out how this is best done in Maven (because surprise, surprise, the NetBean's ant scrips are less than intuitive) and I can't find any doco examples on this. Help would be excellent :) Cheers.
[ANN] Release Buildnumber Plugin 1.0
Hi, The Mojo team is pleased to announce the release of the Buildnumber Maven Plugin, version 1.0. New feature : support of git and mercurial. http://mojo.codehaus.org/buildnumber-maven-plugin You should specify the version in your project's plugin configuration: plugin groupIdorg.codehaus.mojo/groupId artifactIdbuildnumber-maven-plugin/artifactId version1.0/version /plugin Release Notes - Mojo - Version buildnumber-maven-plugin-1.0 ** Bug * [MOJO-1372] - If the parent of buildNumberPropertiesFileLocation doesn't exist, it should be created * [MOJO-1404] - buildnumber plugin problem: Class cast exception when doUpdate is true * [MOJO-1436] - ClassCastException when using Mercurial * [MOJO-1463] - java.lang.NullPointerException: The scm url cannot be null. after update to 1.0-beta-4 * [MOJO-1492] - ClassCastException: UpdateScmResult * [MOJO-1495] - ClassCastException when using ClearCase SCM * [MOJO-1503] - Check for locally modfied files fails * [MOJO-1524] - getting scm branch name makes revisionOnScmFailure useless * [MOJO-1537] - buildnumber:hgchangeset fails on uncommited merge * [MOJO-1538] - Check local modification doesn't work with SVN 1.6 klient * [MOJO-1539] - using revisionOnScmFailure fails on getScmBranch when using javasvn * [MOJO-1643] - buildnumber-maven-plugin throws a NullPointerException if trying to install a module which got locally svn added but not committed yet * [MOJO-1645] - [buildnumber plugin, mercurial] Error when merged two heads in workspace without commit ** Improvement * [MOJO-936] - [buildnumber plugin] don't check for scm if doCheck and doUpdate are set to false * [MOJO-1014] - Misealding Error message The scm url cannot be null * [MOJO-1199] - Build number plugin to support GIT SCM * [MOJO-1401] - Remove dependency on google maven-scm-provider-svnjava * [MOJO-1422] - Separate timestamp functions from create goal * [MOJO-1489] - Add git hash as a parameter to the maven build * [MOJO-1552] - upgrade scm version to 1.4 * [MOJO-1582] - Uniform interface/goal for all supported SCM providers ** New Feature * [MOJO-1294] - When used with SCM buildnumber could also provide commit revision, author, and date. ** Wish * [MOJO-1472] - Support for disabling buildScmBranch calculation Have fun ! -- The Mojo team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
archetype:generate as an authorized user?
Hey all, We've got a server in place at my company serving up local artifacts. To secure the server (and not expose our stuff anymore than we have to) we have users defined and anonymous access disabled. So far so good - we can query and deploy artifacts just fine. Now here's where things get interesting: archetype:generate doesn't seem to pay any attention to my settings.xml. The server logs that it received an unauthenticated user request for the catalog. I was HOPING generate would match the archetypeCatalog URL to the URL of a repository in my settings, but no luck. Is there any way to specify the server when calling archetype:generate? I'd really rather NOT reduce security to be able to use archetypes, if it can be avoided. (If it matters, we're using Artifactory, but since the problem is coming from the client, I suspect the same problem would happen with Nexus or anything else). Apologies if this is a FAQ, but I didn't see anything about it after a bit of beating the Internet with the Google Stick, so... Thanks - Don
Default phase of a plugin
Hi All, I created my own plugin and bind a goal to 'install' phase via '@phase install' in the goal's MOJO. My question is if I run this goal via myPlugin:Mygoal in command line, will it execute all the previous phases? I am expecting all phases above install to be exceuted, that are (validate,compile,test,package, integration-test, verify etc). I am hoping this to happen because same thin happens when we run 'mvn package', it executes all the previous phases before package. On the contrary I found this link over the discussion and I got confused. http://www.mail-archive.com/users@maven.apache.org/msg105538.html If any goal ran from the command line doesn't go through lifecycle phase then how mvn package executes all the previous phases of it. Thanks --Amaresh
Re: Default phase of a plugin
Am 11.04.2011 10:39, schrieb amaresh mourya: Hi All, Hi, I created my own plugin and bind a goal to 'install' phase via '@phase install' in the goal's MOJO. My question is if I run this goal via myPlugin:Mygoal in command line, will it execute all the previous phases? I am expecting all phases above install to be exceuted, that are (validate,compile,test,package, integration-test, verify etc). No, if you run maven with a single goal given in the commandline it will just execute that goal. Nothing else. I am hoping this to happen because same thin happens when we run 'mvn package', it executes all the previous phases before package. On the contrary I found this link over the discussion and I got confused. http://www.mail-archive.com/users@maven.apache.org/msg105538.html If any goal ran from the command line doesn't go through lifecycle phase then how mvn package executes all the previous phases of it. You've got that wrong. 'package' isn't a *goal* but a *phase* in the default build lifecyle [1]. When you invoke a phase, all phases before are executed, too. Thanks --Amaresh -Tim [1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Testing MDB's (integration / junit) how?
On Apr 11, 2011, at 8:04 AM, Andrew Hughes wrote: Thanks to both of you. The OpenEJB solution seems very clean, the openejb-examples-3.1.4.tar.gzhttp://www.apache.org/dyn/closer.cgi/openejb/3.1.4/openejb-examples-3.1.4.tar.gz and openejb-examples-3.1.4.ziphttp://www.apache.org/dyn/closer.cgi/openejb/3.1.4/openejb-examples-3.1.4.zip from http://openejb.apache.org/download.html contain simple-mdb and simple-mdb-with-descriptor examples that are both maven projects. This might be enough for me to get integration tests working, however... I would also like to persue embedded container deployment (such as Glassfish and/or JBoss... or ?). Note that the Embedded EJBContainer API came from the OpenEJB InitialContext embedding approach. At the spec level we almost went with it as-is but decided since we were going to make it an official part of the spec, we might as well have control over the interfaces (InitialContext is a different spec group). So we ended up with 'EJBContainer.createEJBContainer(Map).getContext()' instead of 'new InitialContext(Hashmap)'. I'm not sure if either of those support MDBs as anything JMS related is not part of EJB Lite and therefore not an embedded requirement. Speed wise there still seems to be a big gap. Based on this netbeans howto[1] it looks like Glassfish is in the 23 - 31 second range to run a test. OpenEJB is in the 1, 2 and 3 second range[2][3]. [1] http://netbeans.org/kb/docs/javaee/javaee-entapp-junit.html [2] https://gist.github.com/913283 [3] https://gist.github.com/913286 I am not sure if http://www.jboss.org/arquillian is a good solution or not, I'll look at this when the openejb solution is working. I like what the Arquallian guys are doing. It isn't a container so you'd still need one of those. It's more a second attempt at something like Codehaus Cargo. Though I will note that if OpenEJB is the embedded container you end up using, you will get better test case injection support using OpenEJB directly. Though their OpenEJB adapter digs quite deep into OpenEJB internals so that could easily be improved. -David On Mon, Apr 11, 2011 at 3:53 PM, Aldrin Leal ald...@leal.eng.br wrote: To test an MDB you need a container. Either wrap as an integration test (probably using FailSafe) and/or, better yet: Use OpenEJB and plain JUnit for that. -- -- Aldrin Leal, ald...@leal.eng.br / http://www.leal.eng.br/mnemetica/ On Mon, Apr 11, 2011 at 1:16 AM, Andrew Hughes ahhug...@gmail.com wrote: Howdy, I want to be able to check that the MDB's created actually execute and behave as expected. For reference, the EE5 tutorial ( http://download.oracle.com/javaee/5/tutorial/doc/bnbpq.html) covers two equivalent tests : - *Building, Deploying, and Running the simplemessage Application Using NetBeans IDE* - *Building, Deploying, and Running the simplemessage Application Using Ant* I can't work out how this is best done in Maven (because surprise, surprise, the NetBean's ant scrips are less than intuitive) and I can't find any doco examples on this. Help would be excellent :) Cheers. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
artifacts produced by assembly not signed
Hi all guys, I configured the assembly plugin to produce zip/tar.gz artifacts in a non default assembly outputDirectory. Assembly plugin configuration looks like: /executions configuration outputDirectory${project.build.directory}/XXX/bin/${project.version}/outputDirectory attachtrue/attach !-- not required but explicitly set -- descriptors descriptor${basedir}/src/main/assembly/bin.xml/descriptor /descriptors /configuration and *(zip|tar.gz).asc are not produced; just removing the outputDirectory, *(zip|tar.gz).asc are generated, but I need them in a different place :P Do you have any hint? Many thanks in advance! Simo http://people.apache.org/~simonetripodi/ http://www.99soft.org/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: artifacts produced by assembly not signed
2011/4/11 Simone Tripodi simonetrip...@apache.org Hi all guys, I configured the assembly plugin to produce zip/tar.gz artifacts in a non default assembly outputDirectory. Assembly plugin configuration looks like: /executions configuration outputDirectory${project.build.directory}/XXX/bin/${project.version}/outputDirectory attachtrue/attach !-- not required but explicitly set -- descriptors descriptor${basedir}/src/main/assembly/bin.xml/descriptor /descriptors /configuration and *(zip|tar.gz).asc are not produced; just removing the outputDirectory, *(zip|tar.gz).asc are generated, but I need them in a different place :P Where do you want to put those assemblies? You might want to use the Maven Wagon plugin to copy them, instead of configuring the assembly plugin. Can you explain what you are trying to accomplish? Antonio
Re: artifacts produced by assembly not signed
I just need to put them in a different dir :) http://people.apache.org/~simonetripodi/ http://www.99soft.org/ On Mon, Apr 11, 2011 at 11:59 AM, Antonio Petrelli antonio.petre...@gmail.com wrote: 2011/4/11 Simone Tripodi simonetrip...@apache.org Hi all guys, I configured the assembly plugin to produce zip/tar.gz artifacts in a non default assembly outputDirectory. Assembly plugin configuration looks like: /executions configuration outputDirectory${project.build.directory}/XXX/bin/${project.version}/outputDirectory attachtrue/attach !-- not required but explicitly set -- descriptors descriptor${basedir}/src/main/assembly/bin.xml/descriptor /descriptors /configuration and *(zip|tar.gz).asc are not produced; just removing the outputDirectory, *(zip|tar.gz).asc are generated, but I need them in a different place :P Where do you want to put those assemblies? You might want to use the Maven Wagon plugin to copy them, instead of configuring the assembly plugin. Can you explain what you are trying to accomplish? Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: artifacts produced by assembly not signed
2011/4/11 Simone Tripodi simonetrip...@apache.org I just need to put them in a different dir :) AFAIK you might find the signatures in target/gpg IIRC. Antonio
source:jar includes resources; source:test-jar does not; similarly fo jar:jar and jar:test-jar
I'm trying to add source and binary test jars to a project. Now source:jar works fine; it picks up NL from the resources section. However, source:test-jar appears to ignore the resources section - is that intentional, or an oversight? In any case, how does one get it to add the resources? Similarly for the binary test jar - it does not seem to want to include the resources. How do I fix these issuse - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: source:jar includes resources; source:test-jar does not; similarly fo jar:jar and jar:test-jar
Hi, Am 11.04.2011 13:00, schrieb sebb: I'm trying to add source and binary test jars to a project. Now source:jar works fine; it picks up NL from theresources section. However, source:test-jar appears to ignore theresources section - is that intentional, or an oversight? In any case, how does one get it to add the resources? Similarly for the binary test jar - it does not seem to want to include the resources. Yes, that's how it works AFAIK. source:jar includes the resources from the resources section and source:test-jar includes the resources from the testResources section. Same for the jar plugin. Makes sense to me. How do I fix these issuse If you absolutely need to include the non-test resources the best way to go is probably to use the assembly plugin and create a custom assembly descriptor. -Tim - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
eclipse-could-not-find-dependencies
Hi All, I was exploring on using Nexus. I installed and started Nexus repository and enabled Download Remote Indexes to maven central and all other repositories. Then, i configured maven to use nexus using below in setting.xml. settings 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/xsd/settings-1.0.0.xsd; mirrors mirror idprashu-nexus-mirror/id mirrorOf*/mirrorOf urlhttp://localhost:8081/nexus/content/groups/public/url /mirror /mirrors /settings But, when working with m2eclipse, if i try to add lets say Springframework dependencies, the Select Dependency window in eclipse always shows 0 results. The indexing takes only couple seconds. Is this the cause? If I remove the above nexus configuration, the indexing takes lot of time and it is able to search the dependencies. How do i fix this problem? Thanks, Prashant
Re: [eclipse-plugin] Dependency to workspace projects
On 10/04/2011 7:46 PM, Barrie Treloar wrote: On Sat, Apr 9, 2011 at 7:54 PM, Jörg Schaiblejoerg.schai...@gmx.de wrote: Ludwig Magnusson wrote: Hello! I know that the maven-eclipse-plugin somehow can figure out that a dependency actually exists as a project in workspace and therefore add that project to the build path instead of trying to download a jar-file from a remote repository. My question is: Is this possible for any dependency or just multi-module-projects? In my case, the project is NOT multi-module. Only multi-module. However, it is easy to use a dummy project (name it dummy.pom) just for this purpose: This should work for *any* dependency, that is already in your eclipse workspace. I do this already. We have one common area for projects and another project specific one. The project specific modules are not multi-module builds of the common ones. maven-eclipse-plugin will happily use any of the common projects as eclipse project references (instead of m2 repo references) if they already exist in the eclipse workspace. The plugin does this by traversing all projects in the workspaces and checking the pom.xml files to see if they match the GAV for the dependency. This approach only works for 1 person projects since you will not see the latest versions from other people. As your number of projects grows and parts of your code becomes stable it makes Eclipse gradually slow down since you have to keep your finished projects open. During the build, Eclipse has to look into each POM to see if it matches the GAV. If you use Eclipse heavily for multiple projects and uses, this can grow. It has other issues that come into play if you go beyond a single person or you actually finish a version and want to support it while you work on the next version. OTOH, it does work well and Eclipse and Maven have no trouble finding dependencies in the workspace if they are properly specified with the correct GAV. Ron - 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
Maven repository not accessible?
Hi; I use Maven2 to build my JAVA package and run tests within a CI (Jenkins / Hudson, Bamboo, ..) and got errors about repo not being accessible. I had no problem before with my script but: - network policies have changed (I assume that Jenkins/Maven can't connect to the repository because of these now) - I installed a new computer and it has no local .m2 content so far Can anyone let me know if they face the same issue or point me where/what I should check at? Here is the log of the CI. Executing Maven: -N -B -f C:\Program Files\Jenkins\jobs\Test job \workspace\pom.xml clean test [INFO] Scanning for projects... [INFO] [INFO] Building functional tests [INFO]task-segment: [clean, test] [INFO] Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-pl... [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean- plugin:pom:2.2' from repository central (http://repo1.maven.org/ maven2): Error transferring file: Connection timed out: connect [JENKINS] Archiving C:\Program Files\Jenkins\jobs\Test job\workspace \pom.xml to C:\Program Files\Jenkins\jobs\Test job\modules \\functional-tests\1.0-SNAPSHOT\functional- tests-1.0-SNAPSHOT.pom [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.maven.plugins:maven-clean-plugin Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in repository: Unable to download the artifact from any repository org.apache.maven.plugins:maven-clean-plugin:pom:2.2 from the specified remote repositories: central (http://repo1.maven.org/maven2) for project org.apache.maven.plugins:maven-clean-plugin Thanks
Dependency Tree question for ears with war dependency
I'm having difficulty understanding why performing a dependency:tree on an ear, will give me transitive dependencies for a dependent artifact with packaging type jar, but not of type war. Here is the sample output from a project (strictly for demo purposes): emiles-macbook:myapp emiles$ mvn dependency:tree [INFO] Scanning for projects... [INFO] [INFO] Reactor Build Order: [INFO] [INFO] My Application [INFO] mywebapp [INFO] myapplib [INFO] myear [INFO] [INFO] [INFO] Building My Application 0.0.1-SNAPSHOT [INFO] [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ myapp --- [INFO] com.captechventures.sandbox:myapp:pom:0.0.1-SNAPSHOT [INFO] [INFO] [INFO] Building mywebapp 0.0.1-SNAPSHOT [INFO] [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ mywebapp --- [INFO] com.captechventures.sandbox:mywebapp:war:0.0.1-SNAPSHOT [INFO] \- com.captechventures.sandbox:mysharedlib:jar:wlssl:1.0.0:compile [INFO] [INFO] [INFO] Building myapplib 0.0.1-SNAPSHOT [INFO] [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ myapplib --- [INFO] com.captechventures.sandbox:myapplib:jar:0.0.1-SNAPSHOT [INFO] \- commons-lang:commons-lang:jar:2.1:compile [INFO] [INFO] [INFO] Building myear 0.0.1-SNAPSHOT [INFO] [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ myear --- [INFO] com.captechventures.sandbox:myear:ear:0.0.1-SNAPSHOT [INFO] +- com.captechventures.sandbox:mywebapp:war:0.0.1-SNAPSHOT:compile [INFO] \- com.captechventures.sandbox:myapplib:jar:0.0.1-SNAPSHOT:compile [INFO]\- commons-lang:commons-lang:jar:2.1:compile [INFO] [INFO] Reactor Summary: [INFO] [INFO] My Application SUCCESS [1.445s] [INFO] mywebapp .. SUCCESS [0.138s] [INFO] myapplib .. SUCCESS [0.028s] [INFO] myear . SUCCESS [0.103s] [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 2.421s [INFO] Finished at: Mon Apr 11 10:27:27 EDT 2011 [INFO] Final Memory: 5M/81M [INFO] You'll notice during the ear build, the transitive dependencies for the jar file are shown (and can be navigated programmatically), however the war's dependencies are not included at the ear level. This is problematic as I am writing a plugin that will navigate the entire dependency tree for the ear (should include transitive dependencies as well) and perform a business function. This is not working as expected as we get no dependencies of the war in the DependencyTreeBuilder. Thoughts? Hints? Suggestions? Thanks in advance. Eric Miles Manager / Architect | CapTech emi...@captechconsulting.comemi...@captechventures.com
Re: Maven repository not accessible?
Maybe you need to configure a web proxy for Maven to use? You do that in settings.xml. /Anders (mobile) Den 11 apr 2011 15.33 skrev Collard, Pascal pascal.coll...@bvdinfo.com: Hi; I use Maven2 to build my JAVA package and run tests within a CI (Jenkins / Hudson, Bamboo, ..) and got errors about repo not being accessible. I had no problem before with my script but: - network policies have changed (I assume that Jenkins/Maven can't connect to the repository because of these now) - I installed a new computer and it has no local .m2 content so far Can anyone let me know if they face the same issue or point me where/what I should check at? Here is the log of the CI. Executing Maven: -N -B -f C:\Program Files\Jenkins\jobs\Test job \workspace\pom.xml clean test [INFO] Scanning for projects... [INFO] [INFO] Building functional tests [INFO] task-segment: [clean, test] [INFO] Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-pl... [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean- plugin:pom:2.2' from repository central (http://repo1.maven.org/ maven2): Error transferring file: Connection timed out: connect [JENKINS] Archiving C:\Program Files\Jenkins\jobs\Test job\workspace \pom.xml to C:\Program Files\Jenkins\jobs\Test job\modules \\functional-tests\1.0-SNAPSHOT\functional- tests-1.0-SNAPSHOT.pom [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.maven.plugins:maven-clean-plugin Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in repository: Unable to download the artifact from any repository org.apache.maven.plugins:maven-clean-plugin:pom:2.2 from the specified remote repositories: central (http://repo1.maven.org/maven2) for project org.apache.maven.plugins:maven-clean-plugin Thanks
Re: eclipse-could-not-find-dependencies
I was exploring on using Nexus. I installed and started Nexus repository and ... But, when working with m2eclipse, if i try to add lets say Springframework This list supports Maven the command line tool. You are asking questions about m2eclipse the Eclipse plugin which is supported elsewhere, and Nexus which is supported elsewhere. I suggest you pursue the proper channels for support if you want to resolve this problem. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
can a plugin add dependencies to a project's dependency list
Is it possible to write a plugin which will add dependencies to a project's dependency list in such a way that those plugins are used as part of the reactor order *and* are checked for snapshots by the release plugin? Thanks, Justin - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin uses target dir instead of artifacts from repository
mvn site runs up to the test phase, it doesn't run the package phase, so that's why you get just target/classes On Mon, Apr 11, 2011 at 1:39 AM, Lucas Persson lucas.pers...@oracle.comwrote: But when I do mvn install on the multiprojet then I will get a JAR but when doing mvn site on the multiproject I get target/classes. That seems to be the opposite to what you have described? /Lucas On 04/08/2011 07:52 PM, Brian Fox wrote: It's not a hack, the plugin asks maven core to resolve the artifacts and the objects it gets back have file handles. In reactor builds with sibling dependencies, those handles point to the sibling target folder. If you do a compile reactor build, those handles will point to the /target/classes folder. IOW, this is Maven Core behavior, not the plugin. On Fri, Apr 8, 2011 at 3:56 AM, Anders Hammar and...@hammar.net and...@hammar.net wrote: I believe I've run into a similar issue at some time. However, there are a few things you should understand: 1. An reactor build is executed and for that to work, Maven *should* get artifacts from the reactor and not the repo 2. executing mvn pmd:pmd will not install any artifacts to the local repository - the build lifecycle is *not* executed I think I basically gave up on this as I kind of think it's a hack reusing the sources from a different project. And it wasn't really my problem/project, so I told them to refactor instead. :-) I think that the jira ticket I filed for this is MDEP-291. /Anders On Fri, Apr 8, 2011 at 09:28, Lucas Persson lucas.pers...@oracle.com lucas.pers...@oracle.comwrote: Hi I have some issues with the maven-dependency-plugin vers 2.2 under Maven3. In one project I uses the plugin to unpack a sources artifact like this: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-artifact-sources/id phasegenerate-resources/phase goals goalunpack/goal /goals configuration artifactItems artifactItem groupIdoracle.ucs.callcontrol/groupId artifactIdcallcontrolapi/artifactId version${project.version}/version classifiersources/classifier overWritetrue/overWrite /artifactItem /artifactItems outputDirectory${project.build.directory}/unpack-sources/outputDirectory /configuration /execution /executions /plugin This works very well when doing e.g. 'mvn install' But when runnning e.g. mvn pmd:pmd on the parent project (which also builds the artifact that this project tries to unpack) then the maven-dependency-plugin uses that project's target dir instead taking the sources jar form the repository. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.2:unpack (unpack-artifact-sources) on project javadoc: Error unpacking file: /ade/aime_sdp_924164/target/oracle.ucs.callcontrol/callcontrolapi/target/classes to: /ade/aime_sdp_924164/target/oracle.sdp.tools/javadoc/ target/unpack-sources This is very strange. Anyone with similar experience? Thanks Lucas -- [image: Oracle] http://www.oracle.com http://www.oracle.com Lucas Persson | Principal Member of Technical Staff Phone: +4684773644 | | | Mobile: +46730946656 Oracle Communications Platform ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no . 556254-6746 [image: Green Oracle] http://www.oracle.com/commitment http://www.oracle.com/commitment Oracle is committed to developing practices and products that help protect the environment -- [image: Oracle] http://www.oracle.com Lucas Persson | Principal Member of Technical Staff Phone: +4684773644 | | | Mobile: +46730946656 Oracle Communications Platform ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746 [image: Green Oracle] http://www.oracle.com/commitment Oracle is committed to developing practices and products that help protect the environment
Re: archetype:generate as an authorized user?
Now here's where things get interesting: archetype:generate doesn't seem to pay any attention to my settings.xml. The server logs that it received an unauthenticated user request for the catalog. I was HOPING generate would match the archetypeCatalog URL to the URL of a repository in my settings, but no luck. Is there any way to specify the server when calling archetype:generate? I'd really rather NOT reduce security to be able to use archetypes, if it can be avoided. I've never had any need for such a feature -- to be honest, I don't use archetypes much either. Does Artifactory allow you to set up a public repo/group that has no user security, and then you could just publish your archetypes there? The rest of your repo would still be secured etc. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: archetype:generate as an authorized user?
On Sun, Apr 10, 2011 at 11:08 PM, Brinker, Don-NONEMP dbrin...@collegeboard.org wrote: Hey all, We've got a server in place at my company serving up local artifacts. To secure the server (and not expose our stuff anymore than we have to) we have users defined and anonymous access disabled. So far so good - we can query and deploy artifacts just fine. Now here's where things get interesting: archetype:generate doesn't seem to pay any attention to my settings.xml. The server logs that it received an unauthenticated user request for the catalog. I was HOPING generate would match the archetypeCatalog URL to the URL of a repository in my settings, but no luck. Is there any way to specify the server when calling archetype:generate? I'd really rather NOT reduce security to be able to use archetypes, if it can be avoided. (If it matters, we're using Artifactory, but since the problem is coming from the client, I suspect the same problem would happen with Nexus or anything else). Apologies if this is a FAQ, but I didn't see anything about it after a bit of beating the Internet with the Google Stick, so... This is indeed a FAQ: http://maven.apache.org/archetype/maven-archetype-plugin/faq.html#authentication Thanks - Don - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Can't get mvn site to generating site/reports
Hi, I'm trying to get cobertura working on my project, and it isn't generating any pages or reports for the site. Below is the log and further below the pom.xml. I just want to get maven to generate the tests, cobertura, checkstyle, pmd and findbugs reports to be shown in my CI server (jenkins) Another question: what is the best practice for this, is it running site, or is using a different profile with the instrumentation and report configuration? Just for the record, this is an simple stand-alone app generated using mvn archetype (with just one class and one test). C:\fabricasw\new_workspace\testcoberturamvn site [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for testcobertura:testcobertura:ja r:0.0.1-SNAPSHOT [WARNING] 'reporting.plugins.plugin.version' for org.codehaus.mojo:cobertura-maven-plugin is missing. @ line 78, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] [INFO] Building testcobertura 0.0.1-SNAPSHOT [INFO] [INFO] [INFO] --- cobertura-maven-plugin:2.4:clean (site) @ testcobertura --- [INFO] [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ testcobertura --- [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 2.188s [INFO] Finished at: Mon Apr 11 14:21:13 BRT 2011 [INFO] Final Memory: 5M/10M [INFO] 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdgtestcobertura/groupId artifactIdtestcobertura/artifactId version0.0.1-SNAPSHOT/version packagingjar/packaging nametestcobertura/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId version2.4/version configuration instrumentation / /configuration executions execution idsite/id phasepre-site/phase goals goalclean/goal /goals /execution execution idinstrument/id phasepackage/phase goals goalinstrument/goal goalcobertura/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId version2.8/version /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId version2.6/version /plugin plugin groupIdorg.apache.maven.plugins/groupId
Add properties to pom.properties
Hi all guys, I would like to know if it is possible to include properties in the generated META-INF/maven/${project.groupId}/${project.artifactId}/pom.properties file. Many thanks in advance, Simo http://people.apache.org/~simonetripodi/ http://www.99soft.org/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: archetype:generate as an authorized user?
On Sun, Apr 10, 2011 at 11:08 PM, Brinker, Don-NONEMP dbrin...@collegeboard.org wrote: We've got a server in place at my company serving up local artifacts. To secure the server (and not expose our stuff anymore than we have to) we have users defined and anonymous access disabled. So far so good - we can query and deploy artifacts just fine. Now here's where things get interesting: archetype:generate doesn't seem to pay any attention to my settings.xml. The server logs that it received an unauthenticated user request for the catalog. I was HOPING generate would match the archetypeCatalog URL to the URL of a repository in my settings, but no luck. It doesn't match by url, it matches by repository id. Is there a way to send a repo id in addition to the url? -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't get mvn site to generating site/reports
first thing: *always* pin down the versions of the plugins you want to use. Your log says you're running site-plugin-2.0.1, but it looks like your using maven 3, in which case you have to use the m3 version of the plugin [1]. And as your log states explicitly: there is no version number for the cobertura plugin. If that doesn#t fix it, open a jira with a reproducible test case. HTH, -Lukas [1] http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html emerson wrote: Hi, I'm trying to get cobertura working on my project, and it isn't generating any pages or reports for the site. Below is the log and further below the pom.xml. I just want to get maven to generate the tests, cobertura, checkstyle, pmd and findbugs reports to be shown in my CI server (jenkins) Another question: what is the best practice for this, is it running site, or is using a different profile with the instrumentation and report configuration? Just for the record, this is an simple stand-alone app generated using mvn archetype (with just one class and one test). C:\fabricasw\new_workspace\testcoberturamvn site [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for testcobertura:testcobertura:ja r:0.0.1-SNAPSHOT [WARNING] 'reporting.plugins.plugin.version' for org.codehaus.mojo:cobertura-maven-plugin is missing. @ line 78, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] [INFO] Building testcobertura 0.0.1-SNAPSHOT [INFO] [INFO] [INFO] --- cobertura-maven-plugin:2.4:clean (site) @ testcobertura --- [INFO] [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ testcobertura --- [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 2.188s [INFO] Finished at: Mon Apr 11 14:21:13 BRT 2011 [INFO] Final Memory: 5M/10M [INFO] 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdgtestcobertura/groupId artifactIdtestcobertura/artifactId version0.0.1-SNAPSHOT/version packagingjar/packaging nametestcobertura/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId version2.4/version configuration instrumentation / /configuration executions execution idsite/id phasepre-site/phase goals goalclean/goal /goals /execution execution idinstrument/id phasepackage/phase goals goalinstrument/goal goalcobertura/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId
Strange problem with .m2 folder
Hi folks, I've just come across what seems to be some very strange behaviour in Maven. I'll try to explain as best I can the situation but it's a bit involved. So, I started out with this set up working which was working perfectly: maven 3.0.2 installed in d:\development\maven maven projects installed in c:\users\me\documents\NetBeansProjects .m2 directory in c:\users\me\.m2 nexus 1.9 used as a proxy for all the external repositories we use. everything built fine with a mvn clean install both from inside NetBeans and from the command line. Today I decided to re-home my Documents folder onto the company NAS. So I right click on the folder select location and change it to h:\documents. Much file copying later and everything is moved over. Since file compilation would be too slow over the network I move the NetBeans projects folder onto D so now I have this: maven 3.0.2 installed in d:\development\maven maven projects installed in d:\development\NetBeansProjects .m2 directory in c:\users\me\.m2 nexus 1.9 used as a proxy for all the external repositories we use. my documents folder at h:\documents Now here's where the problems start. When I tried to do a clean and build maven re-downloaded everything and I got a bunch of warnings about not being able to find various POM files. This confused the hell out of me since as far as I could tell nothing do to with maven had changed. Then I noticed that in my H drive I now had a shiny new .m2 directory. A little head scratching later and I realized that the warnings were because there was no settings.xml file in the h:\.m2 directory. Once I'd copied it over from c:\users\me\.m2 everything built fine. My question though is why did my maven create a new .m2 folder for me? I can only assume that it must be using the location of the my documents folder as it's queue for where to put the .m2 folder but surely it should be based on the root folder of the user account by default. Is it possible to force use c:\users\me\.m2 again as builds are now much slower since it has to drag all the jar's over the network each time? Thanks
Re: Strange problem with .m2 folder
Today I decided to re-home my Documents folder onto the company NAS. So I right click on the folder select location and change it to h:\documents. Much file copying later and everything is moved over. Since file compilation would be too slow over the network I move the NetBeans projects folder onto D so now I have this: What does set show for USERPROFILE, HOMEDRIVE, and HOMEPATH. Those are managed by Windows and IIRC they are read/used by Maven to determine where to put the .m2 directory etc. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Strange problem with .m2 folder
USERPROFILE=C:\Users\Graham Smith HOMEDRIVE=C: HOMEPATH=\Users\Graham Smith Exactly as I would expect. I'm running Win 7 btw. D:\Development\NetBeansProjects\core On 11 April 2011 19:47, Wayne Fay wayne...@gmail.com wrote: Today I decided to re-home my Documents folder onto the company NAS. So I right click on the folder select location and change it to h:\documents. Much file copying later and everything is moved over. Since file compilation would be too slow over the network I move the NetBeans projects folder onto D so now I have this: What does set show for USERPROFILE, HOMEDRIVE, and HOMEPATH. Those are managed by Windows and IIRC they are read/used by Maven to determine where to put the .m2 directory etc. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Strange problem with .m2 folder
on the root folder of the user account by default. Is it possible to force use c:\users\me\.m2 again as builds are now much slower since it has to drag all the jar's over the network each time? You can adjust the location of your repo in settings.xml, and it will use c:\... instead. As for your problem, I'm honestly unsure what to make of it right this minute. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Strange problem with .m2 folder
Thanks for your help, I think I've figured out what the problem is. I omitted to mention that I also re-homed my Desktop folder at the same time I re-homed my documents folder as I didn't think it was relevant. It would appear that there is a bug in the JVM that has been around for 6+ years now. Apparently the JVM determines the value of user.home by which should point at the root of the users profile directory by looking at the registry key: [HKEY_CURRENT_USER\Software\ customer \Windows\CurrentVersion\Explorer\Shell Folders\Desktop] and then taking the parent folder. In my case (and many others) that doesn't produce the expected result. http://bugs.sun.com/view_bug.do?bug_id=4787931 http://bugs.sun.com/view_bug.do?bug_id=4787931Looks like I'll be moving my desktop folder back in the morning... On 11 April 2011 19:59, Wayne Fay wayne...@gmail.com wrote: on the root folder of the user account by default. Is it possible to force use c:\users\me\.m2 again as builds are now much slower since it has to drag all the jar's over the network each time? You can adjust the location of your repo in settings.xml, and it will use c:\... instead. As for your problem, I'm honestly unsure what to make of it right this minute. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Strange problem with .m2 folder
It would appear that there is a bug in the JVM that has been around for 6+ years now. Apparently the JVM determines the value of user.home by which should point at the root of the users profile directory by looking at the registry key: [HKEY_CURRENT_USER\Software\ customer \Windows\CurrentVersion\Explorer\Shell Folders\Desktop] and then taking the parent folder. In my case (and many others) that doesn't produce the expected result. Perhaps this should be coded differently in Maven? There is a work-around suggested in that bug report: J2SE 1.5 will have a working System.getenv(String), so users can simply do a System.getenv(USERPROFILE) directly. I agree this is not intuitive. Obviously, most people are just using the system-default homedir and user dir etc so they don't run into this. But we could probably handle this better in Maven. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Can't get mvn site to generating site/reports
Thanks Lukas, it was that!!! I changed to m2 and it started to work. thanks a lot On 11 April 2011 14:50, Lukas Theussl ltheu...@apache.org wrote: first thing: *always* pin down the versions of the plugins you want to use. Your log says you're running site-plugin-2.0.1, but it looks like your using maven 3, in which case you have to use the m3 version of the plugin [1]. And as your log states explicitly: there is no version number for the cobertura plugin. If that doesn#t fix it, open a jira with a reproducible test case. HTH, -Lukas [1] http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html emerson wrote: Hi, I'm trying to get cobertura working on my project, and it isn't generating any pages or reports for the site. Below is the log and further below the pom.xml. I just want to get maven to generate the tests, cobertura, checkstyle, pmd and findbugs reports to be shown in my CI server (jenkins) Another question: what is the best practice for this, is it running site, or is using a different profile with the instrumentation and report configuration? Just for the record, this is an simple stand-alone app generated using mvn archetype (with just one class and one test). C:\fabricasw\new_workspace\testcoberturamvn site [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for testcobertura:testcobertura:ja r:0.0.1-SNAPSHOT [WARNING] 'reporting.plugins.plugin.version' for org.codehaus.mojo:cobertura-maven-plugin is missing. @ line 78, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] [INFO] Building testcobertura 0.0.1-SNAPSHOT [INFO] [INFO] [INFO] --- cobertura-maven-plugin:2.4:clean (site) @ testcobertura --- [INFO] [INFO] --- maven-site-plugin:2.0.1:site (default-site) @ testcobertura --- [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 2.188s [INFO] Finished at: Mon Apr 11 14:21:13 BRT 2011 [INFO] Final Memory: 5M/10M [INFO] 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdgtestcobertura/groupId artifactIdtestcobertura/artifactId version0.0.1-SNAPSHOT/version packagingjar/packaging nametestcobertura/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId version2.4/version configuration instrumentation / /configuration executions execution idsite/id phasepre-site/phase goals goalclean/goal /goals /execution execution idinstrument/id phasepackage/phase goals goalinstrument/goal goalcobertura/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies reporting plugins plugin groupIdorg.apache.maven.plugins/groupId
Re: Dependency Tree question for ears with war dependency
Hi Eric, Eric Miles wrote: I'm having difficulty understanding why performing a dependency:tree on an ear, will give me transitive dependencies for a dependent artifact with packaging type jar, but not of type war. Because a war does not require transitive dependencies, it has them normally embedded in WEB-INF/lib. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Reuse of configuration
All my CI configuration is done in a profile (build and report plugins). This is so that I have the option to not generate the reports when running an on demand CI, and to generate only during nightly builds. As all my projects will have the same number of reports and site related build configuration, I wanted to keep it inside a profile. I read somewhere that the profiles can't be inherited. If this is correct, what is the approach recommended to not have to repeat this same configuration in every single project? thanks Emeson - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: source:jar includes resources; source:test-jar does not; similarly fo jar:jar and jar:test-jar
On 11 April 2011 12:35, Tim Kettler tim.kett...@udo.edu wrote: Hi, Am 11.04.2011 13:00, schrieb sebb: I'm trying to add source and binary test jars to a project. Now source:jar works fine; it picks up NL from theresources section. However, source:test-jar appears to ignore theresources section - is that intentional, or an oversight? In any case, how does one get it to add the resources? Similarly for the binary test jar - it does not seem to want to include the resources. Yes, that's how it works AFAIK. source:jar includes the resources from the resources section and source:test-jar includes the resources from the testResources section. Same for the jar plugin. Makes sense to me. Thanks! I had not realised there was also a testResources section. That fixes the problem. How do I fix these issuse If you absolutely need to include the non-test resources the best way to go is probably to use the assembly plugin and create a custom assembly descriptor. -Tim - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How to get my plugin to execute in a particular phase?
Hi all, I'm following the online documentation to write a plugin (http://maven.apache.org/guides/mini/guide-configuring-plugins.html). I have package sample.plugin; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; /** * Says Hi to the user. * * @goal sayhi * @phase generate-sources */ public class GreetingMojo extends AbstractMojo { /** * The greeting to display. * * @parameter expression=${sayhi.greeting} default-value=Hello World! */ private String greeting; /** * @execute phase=generate-sources */ @Override public void execute() throws MojoExecutionException { getLog().info(greeting); } } This works if I invoke the plugin directly (i.e. mvn greeting:sayhi). I have it configured as buildpluginsplugin groupIdorg.example.maven.plugins/groupId artifactIdgreeting-maven-plugin/artifactId version0.1-SNAPSHOT/version configuration greetingHowdy!/greeting /configuration /plugin/plugins/build so it prints Howdy!. Excellent, so far. But despite the @phase generate-sources and @execute generate-sources I cannot get it to run in the generate-sources phase by simply invoking something like mvn compile. (I'm using Maven 3.0.3 and maven-plugin-api 3.0.) How do I get the greeting plugin to run (by default) in a particular phase? (I know I can use executions to configure it explicitly but the documentation seems to indicate I can configure a default phase.) Cheers, Hilco - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Testing MDB's (integration / junit) how?
Hi David, Great advice, I can see the problems associated with a 20..30 second 'embed+launch+deploy+test' method vs the 1..3 second 'ejb context creation+test' method of OpenEJB. Considering this, (for anyone reading) I think its important to distinctly recognize these as two distinctly separate testing methods. Both have a legitimate reason for existing, but like anything both are fit for purpose. I would expect to see the 1..3 second 'ejb context creation+test' method bound to the default profile's test phase and the 'embed+lanuch+deploy+test' method bound to the integration-test as a profile/plugin that will run on the CI server. I'm repeating myself here.. but for reference... ...the openejb-examples-3.1.4.tar.gzhttp://www.apache.org/dyn/closer.cgi/openejb/3.1.4/openejb-examples-3.1.4.tar.gz and openejb-examples-3.1.4.ziphttp://www.apache.org/dyn/closer.cgi/openejb/3.1.4/openejb-examples-3.1.4.zip from http://openejb.apache.org/download.html contain simple-mdb and simple-mdb-with-descriptor examples that are both maven projects. Thanks OpenEJB ppl, examples are often worth their weight in gold! I'll have to peruse integration testing next :) --AH On Mon, Apr 11, 2011 at 7:02 PM, David Blevins david.blev...@gmail.comwrote: On Apr 11, 2011, at 8:04 AM, Andrew Hughes wrote: Thanks to both of you. The OpenEJB solution seems very clean, the openejb-examples-3.1.4.tar.gz http://www.apache.org/dyn/closer.cgi/openejb/3.1.4/openejb-examples-3.1.4.tar.gz and openejb-examples-3.1.4.zip http://www.apache.org/dyn/closer.cgi/openejb/3.1.4/openejb-examples-3.1.4.zip from http://openejb.apache.org/download.html contain simple-mdb and simple-mdb-with-descriptor examples that are both maven projects. This might be enough for me to get integration tests working, however... I would also like to persue embedded container deployment (such as Glassfish and/or JBoss... or ?). Note that the Embedded EJBContainer API came from the OpenEJB InitialContext embedding approach. At the spec level we almost went with it as-is but decided since we were going to make it an official part of the spec, we might as well have control over the interfaces (InitialContext is a different spec group). So we ended up with 'EJBContainer.createEJBContainer(Map).getContext()' instead of 'new InitialContext(Hashmap)'. I'm not sure if either of those support MDBs as anything JMS related is not part of EJB Lite and therefore not an embedded requirement. Speed wise there still seems to be a big gap. Based on this netbeans howto[1] it looks like Glassfish is in the 23 - 31 second range to run a test. OpenEJB is in the 1, 2 and 3 second range[2][3]. [1] http://netbeans.org/kb/docs/javaee/javaee-entapp-junit.html [2] https://gist.github.com/913283 [3] https://gist.github.com/913286 I am not sure if http://www.jboss.org/arquillian is a good solution or not, I'll look at this when the openejb solution is working. I like what the Arquallian guys are doing. It isn't a container so you'd still need one of those. It's more a second attempt at something like Codehaus Cargo. Though I will note that if OpenEJB is the embedded container you end up using, you will get better test case injection support using OpenEJB directly. Though their OpenEJB adapter digs quite deep into OpenEJB internals so that could easily be improved. -David On Mon, Apr 11, 2011 at 3:53 PM, Aldrin Leal ald...@leal.eng.br wrote: To test an MDB you need a container. Either wrap as an integration test (probably using FailSafe) and/or, better yet: Use OpenEJB and plain JUnit for that. -- -- Aldrin Leal, ald...@leal.eng.br / http://www.leal.eng.br/mnemetica/ On Mon, Apr 11, 2011 at 1:16 AM, Andrew Hughes ahhug...@gmail.com wrote: Howdy, I want to be able to check that the MDB's created actually execute and behave as expected. For reference, the EE5 tutorial ( http://download.oracle.com/javaee/5/tutorial/doc/bnbpq.html) covers two equivalent tests : - *Building, Deploying, and Running the simplemessage Application Using NetBeans IDE* - *Building, Deploying, and Running the simplemessage Application Using Ant* I can't work out how this is best done in Maven (because surprise, surprise, the NetBean's ant scrips are less than intuitive) and I can't find any doco examples on this. Help would be excellent :) Cheers. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
project auto-update when changes in the repository occur, updating only the changes
Hello, I am new to using Maven and I have just downloaded a snapshot, installed the snapshot (mvn install) and I have set it up for eclipse using the command (mvn -Psetup.eclipse). Doing this took a long time. I am wondering if there is a mechanism already working in Maven which will look for and download any changes and build only those updates, into the snapshot that I've set up, or if I must run the whole script on all the code, any time that I want an update. Also, in the POM file, am I supposed to make changes there? Does maven make regular calls to the repository automatically to see what has changed and already do what I am describing? Is that what scm is, for instance? Do I need to write a script to do the eclipse setup automatically? Thank you. Ryan Zoerner
Re: project auto-update when changes in the repository occur, updating only the changes
The reason that I ask if that's what scm is, is that the address from which I downloaded the snapshot is not the same as the address under the scm tag. Thank you. On Mon, Apr 11, 2011 at 9:24 PM, Ryan Zoerner ryanzoer...@gmail.com wrote: Hello, I am new to using Maven and I have just downloaded a snapshot, installed the snapshot (mvn install) and I have set it up for eclipse using the command (mvn -Psetup.eclipse). Doing this took a long time. I am wondering if there is a mechanism already working in Maven which will look for and download any changes and build only those updates, into the snapshot that I've set up, or if I must run the whole script on all the code, any time that I want an update. Also, in the POM file, am I supposed to make changes there? Does maven make regular calls to the repository automatically to see what has changed and already do what I am describing? Is that what scm is, for instance? Do I need to write a script to do the eclipse setup automatically? Thank you. Ryan Zoerner