General exclusion of a dependency
Hi, is it possible to exclude a dependency without specifying from which other dependency it might come from ? Like wherever depA is coming from, exclude it ? Thanks
Re: General exclusion of a dependency
http://jira.codehaus.org/browse/MNG-1977 On Mon, Jan 17, 2011 at 10:49 AM, mremerson...@aim.com wrote: Hi, is it possible to exclude a dependency without specifying from which other dependency it might come from ? Like wherever depA is coming from, exclude it ? Thanks - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: [Maven Users] Deploy .war to shared hosting 'remote server'
I agree that the use of the term 'deploy' seems to have caused my confusion. I was unable to get wagon-maven-plugin to work at all seems to be a problem with m2eclipse integration here in picking up the settings.xml file. However Steffan has come up with a solution using maven-antrun-plugin example given below. plugin artifactIdmaven-antrun-plugin/artifactId version1.6/version executions execution iddefault-cli/id goals goalrun/goal /goals configuration tasks ftp server=ftp.nigelproject.com remotedir= userid=${userid} password=${password} verbose=yes fileset file=target/${project.build.finalName}.war / /ftp /tasks /configuration /execution /executions dependencies dependency groupIdant/groupId artifactIdant-commons-net/artifactId version1.6.5/version /dependency dependency groupIdcommons-net/groupId artifactIdcommons-net/artifactId version1.4.1/version /dependency /dependencies /plugin Thanks for all your help. -Original Message- From: Wayne Fay [mailto:wayne...@gmail.com] Sent: 13 January 2011 17:58 To: jfsmartemail-onj...@yahoo.com.au Cc: nweinr...@btinternet.com Subject: Fwd: [Maven Users] Deploy .war to shared hosting 'remote server' Hi John, I just wanted to forward you this thread from Maven Users. It seems like you might want to add a disclaimer in Java Power Tools around section 2.14 that makes it clear to readers that Maven's use of the term deploy is very different from what they generally expect it to mean. Here's the full thread: http://maven.40175.n5.nabble.com/Deploy-war-to-shared-hosting-remote-server-td3338859.html Nigel, if you find a nice solution to this deployment issue using the wagon plugin as suggested by Wendy, please do post back to the Maven Users list and maybe also to me and John privately -- who knows, maybe John will include it in a future edition of his book and include you in the acknowledgements. ;-) Wayne -- Forwarded message -- From: Nigel Weinronk nweinr...@btinternet.com Date: Thu, Jan 13, 2011 at 10:19 AM Subject: RE: Deploy .war to shared hosting 'remote server' To: Maven Users List users@maven.apache.org Thanks for your time much appreciated. I am looking a Cargo but in the simple case I have the 'shared hosting' remote server does not give me access to 'tomcat/manager' so I think this will not work either but I have only just started looking. -Original Message- From: Wayne Fay [mailto:wayne...@gmail.com] Sent: 13 January 2011 15:48 To: Maven Users List Subject: Re: Deploy .war to shared hosting 'remote server' Maybe I had misunderstood - the maven-deploy-plugin information I had read. For example - chapter 2.14 in the book Java Power Tools. I found that book on Amazon and was able to dig inside it a little bit to look at chapter 2.14. You simply don't know/understand that the use of the word deploy in Maven is different from what you generally understand it to mean, and the author doesn't appear to take the time to explain it in that section either, or if he did, I missed it. Deploy in Maven means upload an artifact to a remote Maven repo using the Maven repo structure/layout so others using Maven can find and use it. That is exactly what the maven-deploy-plugin is doing for you. You can think of deploy in Maven to mean essentially mvn install to a remote server. The next section in the book 2.15 talks about deploying your app to various app servers using Cargo. This is the kind of deployment you are looking for. 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
AW: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?
Thank you all for helping me. You are right I seem to be the only one using maven on OpenVMS. Still ramping up; I've never built maven on OpenVMS due to some JSVN catch down problem and a HP JAVA JVM crash. Next development server running OpenVMS will bring me back a 100% patched OS and a stable running JVM; then I can catch down sources using jsvn (svnkit) more easy. Then allows me building maven using thze ant bootstrap and/or bump it all up to most recent maven versions as I did so many times on my VISTA PC. The results seen on OpenVMS are very very promising for ANT, JSVN and MAVEN; integration among platforms is all for me. NetBeans IDE with distributed NetBeans from HP allows me to have local PC based projects as well as remote projects running/debugging on OpenVMS. Aim : have a fast reliable development environment both VISTA PC with Visual Studio 2010, WCF 3.5, VB.NET, C#.NET AND NetBeans e all based toward my Apache Axis2/J+C Servers on OPenVMS integrating via HP WSIT our very large Spezpla OpenVMS Legacy Server with its Oracle 10g DB. To deliver a bit more insigth to the current problem I am faced with - here the log - part - with the error and the -e and -X switch set. [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ sqljet --- [DEBUG] org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1: [DEBUG]org.apache.maven:maven-plugin-api:jar:2.0.6:compile [DEBUG]org.apache.maven:maven-project:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-settings:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-profile:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0.6:compile [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile [DEBUG] junit:junit:jar:3.8.1:compile [DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile [DEBUG]org.apache.maven:maven-model:jar:2.0.6:runtime [DEBUG]org.apache.maven:maven-artifact:jar:2.0.6:compile [DEBUG]org.apache.maven:maven-archiver:jar:2.4.1:compile [DEBUG] org.codehaus.plexus:plexus-interpolation:jar:1.13:compile [DEBUG]org.codehaus.plexus:plexus-archiver:jar:1.0:compile [DEBUG] org.codehaus.plexus:plexus-io:jar:1.0:compile [DEBUG]commons-lang:commons-lang:jar:2.1:compile [DEBUG]org.codehaus.plexus:plexus-utils:jar:2.0.5:compile [DEBUG] Created new class realm pluginorg.apache.maven.plugins:maven-jar-plugin:2.3.1 [DEBUG] Populating class realm pluginorg.apache.maven.plugins:maven-jar-plugin:2.3.1 [DEBUG] Included: org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1 [DEBUG] Included: junit:junit:jar:3.8.1 [DEBUG] Included: org.apache.maven:maven-archiver:jar:2.4.1 [DEBUG] Included: org.codehaus.plexus:plexus-interpolation:jar:1.13 [DEBUG] Included: org.codehaus.plexus:plexus-archiver:jar:1.0 [DEBUG] Included: org.codehaus.plexus:plexus-io:jar:1.0 [DEBUG] Included: commons-lang:commons-lang:jar:2.1 [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:2.0.5 [DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6 [DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 [DEBUG] Excluded: classworlds:classworlds:jar:1.1-alpha-2 [DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.6 [DEBUG] Configuring mojo org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar from plugin realm ClassRealm[pluginorg.apache.maven.pl ugins:maven-jar-plugin:2.3.1, parent: ClassRealm[maven.api, parent: null]] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar' with basic configurator -- [DEBUG] (f) classesDirectory = /dkb3/sw-projekte/asf/sqljet/trunk/target/classes [DEBUG] (f) defaultManifestFile = /dkb3/sw-projekte/asf/sqljet/trunk/target/classes/META-INF/MANIFEST.MF [DEBUG] (f) finalName = sqljet-1.1.0 [DEBUG] (f) forceCreation = false [DEBUG] (f) outputDirectory = /dkb3/sw-projekte/asf/sqljet/trunk/target [DEBUG] (f) project = MavenProject: org.tmatesoft.sqljet:sqljet:1.1.0 @ /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml [DEBUG] (f) useDefaultManifestFile = false [DEBUG] -- end configuration -- [WARNING] JAR will be empty - no content was marked for inclusion! [INFO] [INFO] BUILD FAILURE [INFO]
Re: [Maven Users] Deploy .war to shared hosting 'remote server'
You could also use the ship-maven-plugin to help with your scripting. On 17 January 2011 11:02, Nigel Weinronk nweinr...@btinternet.com wrote: I agree that the use of the term 'deploy' seems to have caused my confusion. I was unable to get wagon-maven-plugin to work at all seems to be a problem with m2eclipse integration here in picking up the settings.xml file. However Steffan has come up with a solution using maven-antrun-plugin example given below. plugin artifactIdmaven-antrun-plugin/artifactId version1.6/version executions execution iddefault-cli/id goals goalrun/goal /goals configuration tasks ftp server=ftp.nigelproject.com remotedir= userid=${userid} password=${password} verbose=yes fileset file=target/${project.build.finalName}.war / /ftp /tasks /configuration /execution /executions dependencies dependency groupIdant/groupId artifactIdant-commons-net/artifactId version1.6.5/version /dependency dependency groupIdcommons-net/groupId artifactIdcommons-net/artifactId version1.4.1/version /dependency /dependencies /plugin Thanks for all your help. -Original Message- From: Wayne Fay [mailto:wayne...@gmail.com] Sent: 13 January 2011 17:58 To: jfsmartemail-onj...@yahoo.com.au Cc: nweinr...@btinternet.com Subject: Fwd: [Maven Users] Deploy .war to shared hosting 'remote server' Hi John, I just wanted to forward you this thread from Maven Users. It seems like you might want to add a disclaimer in Java Power Tools around section 2.14 that makes it clear to readers that Maven's use of the term deploy is very different from what they generally expect it to mean. Here's the full thread: http://maven.40175.n5.nabble.com/Deploy-war-to-shared-hosting-remote-server-td3338859.html Nigel, if you find a nice solution to this deployment issue using the wagon plugin as suggested by Wendy, please do post back to the Maven Users list and maybe also to me and John privately -- who knows, maybe John will include it in a future edition of his book and include you in the acknowledgements. ;-) Wayne -- Forwarded message -- From: Nigel Weinronk nweinr...@btinternet.com Date: Thu, Jan 13, 2011 at 10:19 AM Subject: RE: Deploy .war to shared hosting 'remote server' To: Maven Users List users@maven.apache.org Thanks for your time much appreciated. I am looking a Cargo but in the simple case I have the 'shared hosting' remote server does not give me access to 'tomcat/manager' so I think this will not work either but I have only just started looking. -Original Message- From: Wayne Fay [mailto:wayne...@gmail.com] Sent: 13 January 2011 15:48 To: Maven Users List Subject: Re: Deploy .war to shared hosting 'remote server' Maybe I had misunderstood - the maven-deploy-plugin information I had read. For example - chapter 2.14 in the book Java Power Tools. I found that book on Amazon and was able to dig inside it a little bit to look at chapter 2.14. You simply don't know/understand that the use of the word deploy in Maven is different from what you generally understand it to mean, and the author doesn't appear to take the time to explain it in that section either, or if he did, I missed it. Deploy in Maven means upload an artifact to a remote Maven repo using the Maven repo structure/layout so others using Maven can find and use it. That is exactly what the maven-deploy-plugin is doing for you. You can think of deploy in Maven to mean essentially mvn install to a remote server. The next section in the book 2.15 talks about deploying your app to various app servers using Cargo. This is the kind of deployment you are looking for. 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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: [Maven Users] Deploy .war to shared hosting 'remote server'
wagon-maven-plugin approach works with m2eclipse 0.12.0 Nigel -Original Message- From: Nigel Weinronk [mailto:nweinr...@btinternet.com] Sent: 17 January 2011 11:02 To: 'Wayne Fay'; jfsmartemail-onj...@yahoo.com.au; 'Maven Users List' Cc: 'Steffan Westcott' Subject: RE: [Maven Users] Deploy .war to shared hosting 'remote server' I agree that the use of the term 'deploy' seems to have caused my confusion. I was unable to get wagon-maven-plugin to work at all seems to be a problem with m2eclipse integration here in picking up the settings.xml file. However Steffan has come up with a solution using maven-antrun-plugin example given below. plugin artifactIdmaven-antrun-plugin/artifactId version1.6/version executions execution iddefault-cli/id goals goalrun/goal /goals configuration tasks ftp server=ftp.nigelproject.com remotedir= userid=${userid} password=${password} verbose=yes fileset file=target/${project.build.finalName}.war / /ftp /tasks /configuration /execution /executions dependencies dependency groupIdant/groupId artifactIdant-commons-net/artifactId version1.6.5/version /dependency dependency groupIdcommons-net/groupId artifactIdcommons-net/artifactId version1.4.1/version /dependency /dependencies /plugin Thanks for all your help. -Original Message- From: Wayne Fay [mailto:wayne...@gmail.com] Sent: 13 January 2011 17:58 To: jfsmartemail-onj...@yahoo.com.au Cc: nweinr...@btinternet.com Subject: Fwd: [Maven Users] Deploy .war to shared hosting 'remote server' Hi John, I just wanted to forward you this thread from Maven Users. It seems like you might want to add a disclaimer in Java Power Tools around section 2.14 that makes it clear to readers that Maven's use of the term deploy is very different from what they generally expect it to mean. Here's the full thread: http://maven.40175.n5.nabble.com/Deploy-war-to-shared-hosting-remote-server-td3338859.html Nigel, if you find a nice solution to this deployment issue using the wagon plugin as suggested by Wendy, please do post back to the Maven Users list and maybe also to me and John privately -- who knows, maybe John will include it in a future edition of his book and include you in the acknowledgements. ;-) Wayne -- Forwarded message -- From: Nigel Weinronk nweinr...@btinternet.com Date: Thu, Jan 13, 2011 at 10:19 AM Subject: RE: Deploy .war to shared hosting 'remote server' To: Maven Users List users@maven.apache.org Thanks for your time much appreciated. I am looking a Cargo but in the simple case I have the 'shared hosting' remote server does not give me access to 'tomcat/manager' so I think this will not work either but I have only just started looking. -Original Message- From: Wayne Fay [mailto:wayne...@gmail.com] Sent: 13 January 2011 15:48 To: Maven Users List Subject: Re: Deploy .war to shared hosting 'remote server' Maybe I had misunderstood - the maven-deploy-plugin information I had read. For example - chapter 2.14 in the book Java Power Tools. I found that book on Amazon and was able to dig inside it a little bit to look at chapter 2.14. You simply don't know/understand that the use of the word deploy in Maven is different from what you generally understand it to mean, and the author doesn't appear to take the time to explain it in that section either, or if he did, I missed it. Deploy in Maven means upload an artifact to a remote Maven repo using the Maven repo structure/layout so others using Maven can find and use it. That is exactly what the maven-deploy-plugin is doing for you. You can think of deploy in Maven to mean essentially mvn install to a remote server. The next section in the book 2.15 talks about deploying your app to various app servers using Cargo. This is the kind of deployment you are looking for. 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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: General exclusion of a dependency
Hi, On Mon, Jan 17, 2011 at 4:49 AM, mremerson...@aim.com wrote: is it possible to exclude a dependency without specifying from which other dependency it might come from ? Like wherever depA is coming from, exclude it ? Until MNG-1977 is resolved, you can perform a simple work around. E.g. project build dependencies groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId scopeprovided/scope /dependencies /build /project The scope=provided instructs Maven to not actually bring that dependency into the classpath, thus, it behaves as a global exclude. -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Error while compiling : annotations are not supported in -source 1.3
From what I could comprehend so far : 1. I made some changes in the pom.xml (indicated in Bold). 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 groupIdorg.beginningee6.book/groupId artifactIdchapters/artifactId version2.0/version packagingpom/packaging nameChapters Parent/name descriptionRoot pom.xml for all the chapters' code/description modules modulechapter02/module /modules properties derby-version10.6.2.1/derby-version eclipselink-version2.1.2/eclipselink-version javax.persistence-version2.0.0/javax.persistence-version glassfish-version3.0.1-b20/glassfish-version grizzly-version1.8.6.3/grizzly-version jaxb-version2.1.10/jaxb-version jaxws-version2.2/jaxws-version jaxrs-version1.1.1/jaxrs-version jersey-version1.2/jersey-version jsf-version2.0/jsf-version junit-version4.8.2/junit-version plugin-jar-version2.3.1/plugin-jar-version plugin-war-version2.1.1/plugin-war-version plugin-maven-processor1.3.5/plugin-maven-processor !--plugin-maven-compiler2.3.2/plugin-maven-compiler-- plugin-maven-jaxws1.10/plugin-maven-jaxws xmlunit-version1.2/xmlunit-version project.build.sourceEncodingUTF-8/project.build.sourceEncoding project.reporting.outputEncodingUTF-8/project.reporting.outputEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version${junit-version}/version scopetest/scope /dependency /dependencies repositories !--repository-- !--idmaven-repository.dev.java.net/id-- !--nameJava.net Repository for Maven 1/name-- !--urlhttp://download.java.net/maven/1/url-- !--layoutlegacy/layout-- !--/repository-- repository idmaven2-repository.dev.java.net/id nameJava.net Repository for Maven 2/name urlhttp://download.java.net/maven/2/url layoutdefault/layout /repository repository idglassfish-maven-repository.dev.java.net/id nameGlassFish Maven Repository/name urlhttp://download.java.net/maven/glassfish/url /repository repository idEclipseLink Repo/id nameEclipse maven repository http://eclipse.ialto.org/rt/eclipselink/maven.repo//name urlhttp://mirror.csclub.uwaterloo.ca/eclipse/rt/eclipselink/maven.repo//url /repository repository idEclipseLink Ialto Repo/id nameEclipse maven http://eclipse.ialto.com/rt/eclipselink/maven.repo//name urlhttp://www.eclipse.org/downloads/download.php?r=1amp;nf=1amp;file=/rt/eclipselink/maven.repo/url /repository !--repository-- !--idApache Repo/id-- !--nameApache repository for Derby/name-- !--urlhttp://people.apache.org/repo/m1-ibiblio-rsync-repository/url-- !--layoutlegacy/layout-- !--/repository-- /repositories pluginRepositories pluginRepository idmaven2-repository.dev.java.net/id urlhttp://download.java.net/maven/2/url /pluginRepository pluginRepository idmaven-annotation-plugin/id urlhttp://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo/url /pluginRepository /pluginRepositories build pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.3.2/version configuration source1.6/source target1.6/target /configuration /plugin /plugins /pluginManagement /build /project ---End Of pom.xml 2. I ran mvn help:effective-pom and this is what I got c:\jemvn help:effective-pom [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] chapter02 [INFO] Chapters Parent [INFO] Searching repository for plugin with prefix: 'help'. [INFO] [INFO] Building Chapters Parent [INFO]task-segment: [help:effective-pom] (aggregator-style) [INFO] [INFO] [help:effective-pom {execution: default-cli}] [INFO] Effective POMs, after inheritance, interpolation, and profiles are applied: ?xml version=1.0 encoding=UTF-8? !-- == --
Re: General exclusion of a dependency
I wouldn't recommended using provided scope as you or your fellow developers may unintentionally in development/compile time make use of some resource or type from dependency in provided scope, but then get a nasty surprise at runtime. Typically I'd use dependencyManagement at parent level, and exclude unwanted dependency as many times as needed. If that dependency set with exclusions repeats across several different projects, then define it once in a module with pom packaging, which gets imported (import scope) in different projects. Regards, Stevo. On Mon, Jan 17, 2011 at 1:59 PM, Jesse Farinacci jie...@gmail.com wrote: Hi, On Mon, Jan 17, 2011 at 4:49 AM, mremerson...@aim.com wrote: is it possible to exclude a dependency without specifying from which other dependency it might come from ? Like wherever depA is coming from, exclude it ? Until MNG-1977 is resolved, you can perform a simple work around. E.g. project build dependencies groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId scopeprovided/scope /dependencies /build /project The scope=provided instructs Maven to not actually bring that dependency into the classpath, thus, it behaves as a global exclude. -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - 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
Placeholder for version in archetype
In the archetype I don´t want to use in dependencies the real versions (they change very often and the maintenance of them would be very time-consuming). Instead I would like to set something like version9.9.9-SNAPSHOT/version, so using the archetype it would not be possible to forget setting the correct version. Unfortunatelly I get the message 'Unable to download the artifact from any repository' during creating the archetype. Is it any possibility to do it? Many thanks for your hints, Sonja -- Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: General exclusion of a dependency
On Mon, Jan 17, 2011 at 7:59 AM, Jesse Farinacci jie...@gmail.com wrote: The scope=provided instructs Maven to not actually bring that dependency into the classpath, thus, it behaves as a global exclude. My understanding of 'provided' is that it *does* go on the classpath for compilation, but it is not transitive (and does not get packaged). The typical use is for the Servlet API in your .war file -- you need it to compile, but you don't want it in WEB-INF/lib because the container will provide it. http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Distinguishing artifacts created on branches
Hi, I want to deploy alternate artifacts from my branches so that other developers can depend on them. Say, I have a product called groupIdcom.mycompany.tool/groupId artifactIdtool/artifactId version5.2-SNAPSHOT/version Now, I'd like to create a branch of this one where I add a new feature. And this early adopter developer here wants to already build on my new feature, even before I merge it back to trunk, so I deploy my artifacts to Nexus. Now, I obviously can't deploy them under the same GAV coordinates, otherwise they'd overwrite the ones generated from trunk. I can think of two different options: 1) Changing the version number groupIdcom.mycompany.tool/groupId artifactIdtool/artifactId version5.2-MYBRANCH-SNAPSHOT/version The good thing about this is that I can use the Versions plugin to set change the version number even in a multi-module project. The bad thing is that whenever a release happens on trunk, or when I merge the branch back to trunk, I get conflicts in all my POMs about the version number. 2) Changing the group ID groupIdcom.mycompany.tool.mybranch/groupId artifactIdtool/artifactId version5.2-SNAPSHOT/version This looks a bit better, but I can't use the versions plugin, and updating the groupId in many places in a big multi-module project is quite troublesome. Also, it doesn't seem correct semantically. Do you have any advice on this? Thanks, Lorant
Re: Distinguishing artifacts created on branches
2011/1/17 Lóránt Pintér lorant.pin...@gmail.com: Now, I'd like to create a branch of this one where I add a new feature. And this early adopter developer here wants to already build on my new feature, even before I merge it back to trunk, so I deploy my artifacts to Nexus. Now, I obviously can't deploy them under the same GAV coordinates, otherwise they'd overwrite the ones generated from trunk. I can think of two different options: Option 1, change the version number. When you merge, specify a range of revision numbers. That way you merge only the changes, not the state of the branch which includes the different version number. (Is this Subversion or something else?) Don't change the groupId, to Maven that makes it a totally different artifact. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Distinguishing artifacts created on branches
Using a classifier MAY be appropriate for this use case. On Jan 17, 2011 8:57 AM, Lóránt Pintér lorant.pin...@gmail.com wrote: Hi, I want to deploy alternate artifacts from my branches so that other developers can depend on them. Say, I have a product called groupIdcom.mycompany.tool/groupId artifactIdtool/artifactId version5.2-SNAPSHOT/version Now, I'd like to create a branch of this one where I add a new feature. And this early adopter developer here wants to already build on my new feature, even before I merge it back to trunk, so I deploy my artifacts to Nexus. Now, I obviously can't deploy them under the same GAV coordinates, otherwise they'd overwrite the ones generated from trunk. I can think of two different options: 1) Changing the version number groupIdcom.mycompany.tool/groupId artifactIdtool/artifactId version5.2-MYBRANCH-SNAPSHOT/version The good thing about this is that I can use the Versions plugin to set change the version number even in a multi-module project. The bad thing is that whenever a release happens on trunk, or when I merge the branch back to trunk, I get conflicts in all my POMs about the version number. 2) Changing the group ID groupIdcom.mycompany.tool.mybranch/groupId artifactIdtool/artifactId version5.2-SNAPSHOT/version This looks a bit better, but I can't use the versions plugin, and updating the groupId in many places in a big multi-module project is quite troublesome. Also, it doesn't seem correct semantically. Do you have any advice on this? Thanks, Lorant
Re: General exclusion of a dependency
I have described innumerable times how aggregator POMs fix many problems and this is one of them. I exclude dependencies in the aggregated library and the module POMs never have to worry about this. This saves a lot of grief in our case where we have about 60 deliverable modules that make up the application. The 10 or so aggregation POMs deal with all the exclusions so the 60 projects do not worry about this issue. The exclusions are very stable once you figure out what you want and where you want to provide it. After you set up your aggregations, you are done until you change your mind. The individual developers do not have to worry about choice of version or providing it at runtime. The Maven dependency graph and hierarchy are very useful while setting this up but after that, the developers do not have to reference this. We probably use close to 75 third party libraries so this was a big issue for us. It also makes it easier to ensure that all the localhosts, test servers and production servers are all running the same set of libraries. Ron On 17/01/2011 8:12 AM, Stevo Slavić wrote: I wouldn't recommended using provided scope as you or your fellow developers may unintentionally in development/compile time make use of some resource or type from dependency in provided scope, but then get a nasty surprise at runtime. Typically I'd use dependencyManagement at parent level, and exclude unwanted dependency as many times as needed. If that dependency set with exclusions repeats across several different projects, then define it once in a module with pom packaging, which gets imported (import scope) in different projects. Regards, Stevo. On Mon, Jan 17, 2011 at 1:59 PM, Jesse Farinaccijie...@gmail.com wrote: Hi, On Mon, Jan 17, 2011 at 4:49 AM,mremerson...@aim.com wrote: is it possible to exclude a dependency without specifying from which other dependency it might come from ? Like wherever depA is coming from, exclude it ? Until MNG-1977 is resolved, you can perform a simple work around. E.g. project build dependencies groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId scopeprovided/scope /dependencies /build /project The scope=provided instructs Maven to not actually bring that dependency into the classpath, thus, it behaves as a global exclude. -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - 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: Placeholder for version in archetype
This is a bad idea and you should not do this. You need to have repeatable builds. If you are building something that will last, you will eventually have to maintain many versions of your application and if you do not control the versions of your dependencies, you will have very bad things happen to you when you are need to make a patch to a production system. It may build OK and your tests of your patches might work but a subtle change to one of your dependencies might cause a completely unrelated part of your application to suddenly fail after you have deployed your patch. Fix your dependencies once per release. It takes a bit of time but it is part of the process of starting a new release. Ron On 17/01/2011 8:26 AM, sonja.stoc...@gmx.de wrote: In the archetype I don´t want to use in dependencies the real versions (they change very often and the maintenance of them would be very time-consuming). Instead I would like to set something like version9.9.9-SNAPSHOT/version, so using the archetype it would not be possible to forget setting the correct version. Unfortunatelly I get the message 'Unable to download the artifact from any repository' during creating the archetype. Is it any possibility to do it? Many thanks for your hints, Sonja - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: General exclusion of a dependency
Wendy is right. Provided scope is not the solution. /Anders On Mon, Jan 17, 2011 at 14:46, Wendy Smoak wsm...@gmail.com wrote: On Mon, Jan 17, 2011 at 7:59 AM, Jesse Farinacci jie...@gmail.com wrote: The scope=provided instructs Maven to not actually bring that dependency into the classpath, thus, it behaves as a global exclude. My understanding of 'provided' is that it *does* go on the classpath for compilation, but it is not transitive (and does not get packaged). The typical use is for the Servlet API in your .war file -- you need it to compile, but you don't want it in WEB-INF/lib because the container will provide it. http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Distinguishing artifacts created on branches
Using the branch id in the version number will make it easier to understand the relation between the source and the binary that it makes. If you every want to know how developer X actually got the test to work last month, it will be nice to be able to use the dependencies from his project to find a POM and the rest of the sources that match up by GAV and SCM branch id. Ron On 17/01/2011 9:02 AM, Ryan Connolly wrote: Using a classifier MAY be appropriate for this use case. On Jan 17, 2011 8:57 AM, Lóránt Pintérlorant.pin...@gmail.com wrote: Hi, I want to deploy alternate artifacts from my branches so that other developers can depend on them. Say, I have a product called groupIdcom.mycompany.tool/groupId artifactIdtool/artifactId version5.2-SNAPSHOT/version Now, I'd like to create a branch of this one where I add a new feature. And this early adopter developer here wants to already build on my new feature, even before I merge it back to trunk, so I deploy my artifacts to Nexus. Now, I obviously can't deploy them under the same GAV coordinates, otherwise they'd overwrite the ones generated from trunk. I can think of two different options: 1) Changing the version number groupIdcom.mycompany.tool/groupId artifactIdtool/artifactId version5.2-MYBRANCH-SNAPSHOT/version The good thing about this is that I can use the Versions plugin to set change the version number even in a multi-module project. The bad thing is that whenever a release happens on trunk, or when I merge the branch back to trunk, I get conflicts in all my POMs about the version number. 2) Changing the group ID groupIdcom.mycompany.tool.mybranch/groupId artifactIdtool/artifactId version5.2-SNAPSHOT/version This looks a bit better, but I can't use the versions plugin, and updating the groupId in many places in a big multi-module project is quite troublesome. Also, it doesn't seem correct semantically. Do you have any advice on this? Thanks, Lorant - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Groovy Maven project and groovy tests
I want to create a groovy maven project and be able to execute groovy tests, Geb test, spock tests, etc. To start, I just want to execute tests that extend GroovyTestCase. I placed tests in src/test/groovy, but they won't execute. Only the tests in src/test/java will execute. I created the project using the quickstart archetype, then configured the pom from the gmaven 1.0 wiki. http://docs.codehaus.org/display/GMAVEN/GMaven+1.0+Release project dependencyManagement dependencies dependency groupIdorg.codehaus.groovy.maven/groupId artifactIdgmaven-mojo/artifactId version1.0/version /dependency dependency groupIdorg.codehaus.groovy.maven.runtime/groupId artifactIdgmaven-runtime-1.6/artifactId version1.0/version /dependency /dependencies /dependencyManagement build pluginManagement plugins plugin groupIdorg.codehaus.groovy.maven/groupId artifactIdgmaven-plugin/artifactId version1.0/version /plugin /plugins /pluginManagement /build /project I then added src/test/groovy and an example Test: package com.mydomain.whatever; import groovy.util.GroovyTestCase class GroovyAppTest extends GroovyTestCase { void testSomething() { assert 1 == 1 assert 2 + 2 == 4 : We're in trouble, arithmetic is broken } } when I run mvn test I get: --- T E S T S --- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 3 seconds [INFO] Finished at: Mon Jan 17 08:09:29 MST 2011 [INFO] Final Memory: 16M/81M [INFO]
Re: Groovy Maven project and groovy tests
Hey Ed, I believe you need to add an executions element containing the testCompile goal. Below is my gmaven configuration: plugin groupIdorg.codehaus.gmaven/groupId artifactIdgmaven-plugin/artifactId version1.2/version configuration providerSelection1.7/providerSelection /configuration extensionstrue/extensions inheritedtrue/inherited executions execution goals goalgenerateStubs/goal goalcompile/goal goalgenerateTestStubs/goal goaltestCompile/goal /goals /execution /executions /plugin Hope this helps From: Ed Young e...@summitbid.com To: Maven Users List users@maven.apache.org Sent: Mon, January 17, 2011 10:13:17 AM Subject: Groovy Maven project and groovy tests I want to create a groovy maven project and be able to execute groovy tests, Geb test, spock tests, etc. To start, I just want to execute tests that extend GroovyTestCase. I placed tests in src/test/groovy, but they won't execute. Only the tests in src/test/java will execute. I created the project using the quickstart archetype, then configured the pom from the gmaven 1.0 wiki. http://docs.codehaus.org/display/GMAVEN/GMaven+1.0+Release project dependencyManagement dependencies dependency groupIdorg.codehaus.groovy.maven/groupId artifactIdgmaven-mojo/artifactId version1.0/version /dependency dependency groupIdorg.codehaus.groovy.maven.runtime/groupId artifactIdgmaven-runtime-1.6/artifactId version1.0/version /dependency /dependencies /dependencyManagement build pluginManagement plugins plugin groupIdorg.codehaus.groovy.maven/groupId artifactIdgmaven-plugin/artifactId version1.0/version /plugin /plugins /pluginManagement /build /project I then added src/test/groovy and an example Test: package com.mydomain.whatever; import groovy.util.GroovyTestCase class GroovyAppTest extends GroovyTestCase { void testSomething() { assert 1 == 1 assert 2 + 2 == 4 : We're in trouble, arithmetic is broken } } when I run mvn test I get: --- T E S T S --- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 3 seconds [INFO] Finished at: Mon Jan 17 08:09:29 MST 2011 [INFO] Final Memory: 16M/81M [INFO]
Re: Groovy Maven project and groovy tests
thanks for the reply. I've added it to my build section, but still not running my test in src/test/groovy + package name. Here's my entire pom: 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 groupIdcom.comcast.neto/groupId artifactIdChimpsFuncTest/artifactId version1.0-SNAPSHOT/version packagingjar/packaging nameChimpsFuncTest/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdorg.codehaus.groovy.maven/groupId artifactIdgmaven-mojo/artifactId version1.0/version /dependency dependency groupIdorg.codehaus.groovy.maven.runtime/groupId artifactIdgmaven-runtime-1.6/artifactId version1.0/version /dependency dependency groupIdorg.codehaus.geb/groupId artifactIdgeb-core/artifactId versionRELEASE/version /dependency dependency groupIdorg.seleniumhq.selenium/groupId artifactIdselenium-firefox-driver/artifactId versionRELEASE/version /dependency /dependencies build pluginManagement plugins plugin groupIdorg.codehaus.gmaven/groupId artifactIdgmaven-plugin/artifactId version1.2/version configuration providerSelection1.7/providerSelection /configuration extensionstrue/extensions inheritedtrue/inherited executions execution goals goalgenerateStubs/goal goalcompile/goal goalgenerateTestStubs/goal goaltestCompile/goal /goals /execution /executions /plugin /plugins /pluginManagement /build /project See anything amiss? On Mon, Jan 17, 2011 at 8:27 AM, John Prystash stash1...@yahoo.com wrote: Hey Ed, I believe you need to add an executions element containing the testCompile goal. Below is my gmaven configuration: plugin groupIdorg.codehaus.gmaven/groupId artifactIdgmaven-plugin/artifactId version1.2/version configuration providerSelection1.7/providerSelection /configuration extensionstrue/extensions inheritedtrue/inherited executions execution goals goalgenerateStubs/goal goalcompile/goal goalgenerateTestStubs/goal goaltestCompile/goal /goals /execution /executions /plugin Hope this helps From: Ed Young e...@summitbid.com To: Maven Users List users@maven.apache.org Sent: Mon, January 17, 2011 10:13:17 AM Subject: Groovy Maven project and groovy tests I want to create a groovy maven project and be able to execute groovy tests, Geb test, spock tests, etc. To start, I just want to execute tests that extend GroovyTestCase. I placed tests in src/test/groovy, but they won't execute. Only the tests in src/test/java will execute. I created the project using the quickstart archetype, then configured the pom from the gmaven 1.0 wiki. http://docs.codehaus.org/display/GMAVEN/GMaven+1.0+Release project dependencyManagement dependencies dependency groupIdorg.codehaus.groovy.maven/groupId artifactIdgmaven-mojo/artifactId version1.0/version /dependency dependency groupIdorg.codehaus.groovy.maven.runtime/groupId artifactIdgmaven-runtime-1.6/artifactId version1.0/version /dependency /dependencies /dependencyManagement build pluginManagement plugins plugin groupIdorg.codehaus.groovy.maven/groupId artifactIdgmaven-plugin/artifactId version1.0/version /plugin /plugins /pluginManagement /build /project I then added src/test/groovy and an example Test: package com.mydomain.whatever; import groovy.util.GroovyTestCase class GroovyAppTest extends
Skipping rpm build under windows
Hi, I have a project where a set of RPMs are generated during the maven build process. This works brilliantly when developing with linux/eclipse, but fails on windows xp/eclipse as there is no rpmbuild command. The developers using windows have been deleting the rpm execution goal part of the pom.xml so that the project builds and can be tested locally. This seems quite a nasty hack as there are 8 poms, and it makes svn usage annoying. I need a solution that allows us to use just one version of each pom that builds on windows and creates RPMs additionally on linux. A perfectly acceptable solution is to skip the rpmbuild part if you're using windows/rpmbuild isn't found, but I don't know how to do this. Suggestions? Many thanks -- View this message in context: http://maven.40175.n5.nabble.com/Skipping-rpm-build-under-windows-tp3344638p3344638.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
[ANN] Maven Indexer version 4.0.0 Released
The Maven team is pleased to announce the release of the Maven Indexer, version 4.0.0 This project creates portable indexes from maven repositories, which can be used to search for artifacts. You should specify the version in your project's dependency configuration: dependency groupIdorg.apache.maven.indexer/groupId artifactIdindexer-core/artifactId version4.0.0/version /dependency Release Notes - Maven Indexer 4.0.0 ** Improvement * [MINDEXER-4] - Upgrade to Lucene 3.0.3 * [MINDEXER-7] - Make IndexingContext be able to receive remote updates and index local content simultaneously ** New Feature * [MINDEXER-1] - Introduce MergedIndexingContext, an IndexingContext implementation that gives RO view on multiple IndexingContexts presented logically as one * [MINDEXER-2] - Make Indexer threadsafe ** Task * [MINDEXER-5] - Upgrade to Maven 3.0 models * [MINDEXER-6] - Use Aether version implementation Enjoy, -The Maven team
dependency:build-classpath seems to ignore configuration
I am trying to use dependency:build-classpath. If I run mvn dependency:analyze all seems fine, but if I do mvn dependency:build-classpath, it seems to ignore my configuration. For example, the scope and outputFileFilter settings are ignored in the second case. Am I doing something wrong? Here is the pertinent part of my pom: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.0.2/version configuration source1.6/source target1.6/target /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idbuild-classpath/id goals goalbuild-classpath/goal /goals configuration includeScoperuntime/includeScope excludeScopetest/excludeScope outputFilterFiletrue/outputFilterFile /configuration /execution /executions /plugin /plugins /build - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] JBoss Maven Plugin 1.5.0 Released
Hi, The Mojo team is pleased to announce the release of the JBoss Maven Plugin version 1.5.0. This plugin manages the ability to start/stop the JBoss Application Server and to deploy/undeploy files to the JBoss Application Server. This releases fixes several bugs and provides a couple of minor enhancements. http://mojo.codehaus.org/jboss-maven-plugin/ To get this update, simply specify the version in your project's plugin configuration: plugin groupIdorg.codehaus.mojo/groupId artifactIdjboss-maven-plugin/artifactId version1.5.0/version /plugin Release Notes - Maven 2.x JBoss Plugin - Version 1.5.0 ** Bug * [MJBOSS-49] - Console buffer isn't flushed on linux, preventing Jboss SOA-P startup * [MJBOSS-52] - Command arguments not passed correctly to run.sh/shutdown.sh on unix * [MJBOSS-53] - hard-undeploy doesn't cope with exploded archives * [MJBOSS-54] - not runnable run.bat generated on windows * [MJBOSS-55] - jboss plugin incompatible with jboss AS 6 - mojo produces incorrect cmd invocation when starting ** Improvement * [MJBOSS-51] - Remove have a nice day! from hard-undeploy ** New Feature * [MJBOSS-47] - Wait a given app to start * [MJBOSS-57] - Can't skip plugin to run even if tests are skipped and phase is set to test. Enjoy, The Mojo team. Paul Gier - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Skipping rpm build under windows
You can use a profile to build your rpm project. profile idrpm/id activation os familylinux/family archi386/arch /os /activation modules modulemodule which builds your rpm/module /modules /profile -Original Message- From: chazmuzz [mailto:char...@coreware.co.uk] Sent: Monday, January 17, 2011 11:05 AM To: users@maven.apache.org Subject: Skipping rpm build under windows Hi, I have a project where a set of RPMs are generated during the maven build process. This works brilliantly when developing with linux/eclipse, but fails on windows xp/eclipse as there is no rpmbuild command. The developers using windows have been deleting the rpm execution goal part of the pom.xml so that the project builds and can be tested locally. This seems quite a nasty hack as there are 8 poms, and it makes svn usage annoying. I need a solution that allows us to use just one version of each pom that builds on windows and creates RPMs additionally on linux. A perfectly acceptable solution is to skip the rpmbuild part if you're using windows/rpmbuild isn't found, but I don't know how to do this. Suggestions? Many thanks -- View this message in context: http://maven.40175.n5.nabble.com/Skipping- rpm-build-under-windows-tp3344638p3344638.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: Groovy Maven project and groovy tests
I don't believe you need to define the dependencies on gmaven-mojo and gmaven-runtime any longer. Maybe add a dependency on Groovy? Or see what the output is for running: $ mvn -Dgmaven.logging=DEBUG I believe this POM gives some sort of a bare minimum needed to run the Groovy tests. In a small project of mine, it runs the tests found under src/test/groovy: ?xml version=1.0 encoding=utf-8? modelVersion4.0.0/modelVersion groupIdprystasj/groupId artifactIdtest/artifactId nameExample Project/name version1.0-SNAPSHOT/version build plugins plugin groupIdorg.codehaus.gmaven/groupId artifactIdgmaven-plugin/artifactId version1.2/version configuration providerSelection1.7/providerSelection /configuration extensionstrue/extensions inheritedtrue/inherited executions execution goals goalgenerateStubs/goal goalcompile/goal goalgenerateTestStubs/goal goaltestCompile/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupIdorg.codehaus.groovy/groupId artifactIdgroovy-all/artifactId version1.7.4/version /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.8.1/version scopetest/scope /dependency /dependencies /project From: Ed Young e...@summitbid.com To: Maven Users List users@maven.apache.org Sent: Mon, January 17, 2011 10:59:32 AM Subject: Re: Groovy Maven project and groovy tests thanks for the reply. I've added it to my build section, but still not running my test in src/test/groovy + package name. Here's my entire pom: 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 groupIdcom.comcast.neto/groupId artifactIdChimpsFuncTest/artifactId version1.0-SNAPSHOT/version packagingjar/packaging nameChimpsFuncTest/name http://maven.apache.org properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdorg.codehaus.groovy.maven/groupId artifactIdgmaven-mojo/artifactId version1.0/version /dependency dependency groupIdorg.codehaus.groovy.maven.runtime/groupId artifactIdgmaven-runtime-1.6/artifactId version1.0/version /dependency dependency groupIdorg.codehaus.geb/groupId artifactIdgeb-core/artifactId versionRELEASE/version /dependency dependency groupIdorg.seleniumhq.selenium/groupId artifactIdselenium-firefox-driver/artifactId versionRELEASE/version /dependency /dependencies build pluginManagement plugins plugin groupIdorg.codehaus.gmaven/groupId artifactIdgmaven-plugin/artifactId version1.2/version configuration providerSelection1.7/providerSelection /configuration extensionstrue/extensions inheritedtrue/inherited executions execution goals goalgenerateStubs/goal goalcompile/goal goalgenerateTestStubs/goal goaltestCompile/goal /goals /execution /executions /plugin /plugins /pluginManagement /build /project See anything amiss? On Mon, Jan 17, 2011 at 8:27 AM, John Prystash stash1...@yahoo.com wrote: Hey Ed, I believe you need to add an executions element containing the testCompile goal. Below is my gmaven configuration: plugin groupIdorg.codehaus.gmaven/groupId artifactIdgmaven-plugin/artifactId version1.2/version configuration providerSelection1.7/providerSelection /configuration extensionstrue/extensions inheritedtrue/inherited executions execution goals goalgenerateStubs/goal goalcompile/goal goalgenerateTestStubs/goal goaltestCompile/goal /goals /execution /executions /plugin Hope this helps
Re: Error while compiling : annotations are not supported in -source 1.3
1. I made some changes in the pom.xml (indicated in Bold). This list strips HTML and RTF so no one can see your bold text. 2. I ran mvn help:effective-pom and this is what I got OK... but what happens (now) when you run mvn compile? I assume you are running all of this from the command line, and not from Eclipse etc, right? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Skipping rpm build under windows
You can use a profile to build your rpm project. This would normally be my response too... but I personally dislike profiles for things if there is another way to handle it. Profiles can make builds more complicated than absolutely necessary. Surely the rpmbuild plugin could be adjusted to check the OS, or check for the existence of the rpmbuild executable or something, and then ignore with a warning (or fail, configurable in the plugin config) if it wasn't found, or something...? This just seems like a common use case and maybe the rpmbuild plugin devs should find a little bit smarter way to handle it. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Groovy Maven project and groovy tests
I added the groovy dependency (like yours), and removed (commented out) the gmaven-mojo and runtime. Still no tests run. Hmmm... running it like this: mvn -Dgmaven.logging=DEBUG test yeilds: $ mvn -Dgmaven.logging=DEBUG test [INFO] Scanning for projects... [WARNING] Profile with id: 'property-overrides' has not been activated. [WARNING] Profile with id: 'iblibio-repo' has not been activated. [INFO] [INFO] Building ChimpsFuncTest [INFO]task-segment: [test] [INFO] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/eyoung2297k/development/workspace-sts2/ChimpsFuncTestMaven/src/main/resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/eyoung2297k/development/workspace-sts2/ChimpsFuncTestMaven/src/test/resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: /Users/eyoung2297k/development/workspace-sts2/ChimpsFuncTestMaven/target/surefire-reports --- T E S T S --- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 3 seconds [INFO] Finished at: Mon Jan 17 10:27:43 MST 2011 [INFO] Final Memory: 14M/81M [INFO] On Mon, Jan 17, 2011 at 9:32 AM, John Prystash stash1...@yahoo.com wrote: I don't believe you need to define the dependencies on gmaven-mojo and gmaven-runtime any longer. Maybe add a dependency on Groovy? Or see what the output is for running: $ mvn -Dgmaven.logging=DEBUG I believe this POM gives some sort of a bare minimum needed to run the Groovy tests. In a small project of mine, it runs the tests found under src/test/groovy: ?xml version=1.0 encoding=utf-8? modelVersion4.0.0/modelVersion groupIdprystasj/groupId artifactIdtest/artifactId nameExample Project/name version1.0-SNAPSHOT/version build plugins plugin groupIdorg.codehaus.gmaven/groupId artifactIdgmaven-plugin/artifactId version1.2/version configuration providerSelection1.7/providerSelection /configuration extensionstrue/extensions inheritedtrue/inherited executions execution goals goalgenerateStubs/goal goalcompile/goal goalgenerateTestStubs/goal goaltestCompile/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupIdorg.codehaus.groovy/groupId artifactIdgroovy-all/artifactId version1.7.4/version /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.8.1/version scopetest/scope /dependency /dependencies /project From: Ed Young e...@summitbid.com To: Maven Users List users@maven.apache.org Sent: Mon, January 17, 2011 10:59:32 AM Subject: Re: Groovy Maven project and groovy tests thanks for the reply. I've added it to my build section, but still not running my test in src/test/groovy + package name. Here's my entire pom: 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 groupIdcom.comcast.neto/groupId artifactIdChimpsFuncTest/artifactId version1.0-SNAPSHOT/version packagingjar/packaging nameChimpsFuncTest/name http://maven.apache.org properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdorg.codehaus.groovy.maven/groupId artifactIdgmaven-mojo/artifactId version1.0/version /dependency dependency groupIdorg.codehaus.groovy.maven.runtime/groupId
Re: Groovy Maven project and groovy tests
Hmm, maybe post your POM again as it is? I'm out of ideas, but something isn't configured right obviously. When I use the logging swtich, I get output along the lines of: [DEBUG] TestCompileMojo - Detected compatible provider: 1.6 [INFO] [groovy:testCompile {execution: default}] [DEBUG] TestCompileMojo - Artifact loader configured with handler: org.codehaus.gmaven.plugin.ProviderMojoSupport$ArtifactHandlerImpl@5130500f [DEBUG] DefaultProviderManager - Using cached provider '[1.7] 'Groovy v1.7-beta-2' (version: 1.7.0-beta-2, type: org.codehaus.gmaven.runtime.v1_7.ProviderImpl)' for selection: 1.7 [DEBUG] TestCompileMojo - Project Classpath: [DEBUG] TestCompileMojo - file:/tmp/test/target/test-classes/ [DEBUG] TestCompileMojo - file:/tmp/test/target/classes/ [DEBUG] TestCompileMojo - file:/home/prystasj/.m2/repository/org/codehaus/groovy/groovy-all/1.7.4/groovy-all-1.7.4.jar [DEBUG] TestCompileMojo - file:/home/prystasj/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar [DEBUG] TestCompileMojo - Scanning for sources in: /tmp/test/src/test/groovy [DEBUG] TestCompileMojo - Forcing to compile: [DEBUG] TestCompileMojo - + /tmp/test/src/test/groovy/prystasj/ExampleTest.groovy [DEBUG] ClassCompilerFeature$ClassCompilerImpl - Added: file:/tmp/test/src/test/groovy/prystasj/ExampleTest.groovy [DEBUG] TestCompileMojo - + /tmp/test/src/test/groovy/prystasj/HelperTest.groovy [DEBUG] ClassCompilerFeature$ClassCompilerImpl - Added: file:/tmp/test/src/test/groovy/prystasj/HelperTest.groovy [DEBUG] ClassCompilerFeature$ClassCompilerImpl - Classpath: [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/tmp/test/target/test-classes/ [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/tmp/test/target/classes/ [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/home/prystasj/.m2/repository/org/codehaus/groovy/groovy-all/1.7.4/groovy-all-1.7.4.jar [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/home/prystasj/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar [DEBUG] ClassCompilerFeature$ClassCompilerImpl - Compiling 2 sources [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/tmp/test/src/test/groovy/prystasj/ExampleTest.groovy [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/tmp/test/src/test/groovy/prystasj/HelperTest.groovy [DEBUG] ClassCompilerFeature$ClassCompilerImpl - Compiled 2 classes: [DEBUG] ClassCompilerFeature$ClassCompilerImpl - prystasj.ExampleTest [DEBUG] ClassCompilerFeature$ClassCompilerImpl - prystasj.HelperTest [INFO] TestCompileMojo - Compiled 2 Groovy classes [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: /tmp/test/target/surefire-reports --- T E S T S --- Running prystasj.ExampleTest Hello World Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.143 sec Running prystasj.HelperTest Hello World Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec Results : Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 From: Ed Young e...@summitbid.com To: Maven Users List users@maven.apache.org Sent: Mon, January 17, 2011 12:30:44 PM Subject: Re: Groovy Maven project and groovy tests I added the groovy dependency (like yours), and removed (commented out) the gmaven-mojo and runtime. Still no tests run. Hmmm... running it like this: mvn -Dgmaven.logging=DEBUG test yeilds: $ mvn -Dgmaven.logging=DEBUG test [INFO] Scanning for projects... [WARNING] Profile with id: 'property-overrides' has not been activated. [WARNING] Profile with id: 'iblibio-repo' has not been activated. [INFO] [INFO] Building ChimpsFuncTest [INFO]task-segment: [test] [INFO] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/eyoung2297k/development/workspace-sts2/ChimpsFuncTestMaven/src/main/resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/eyoung2297k/development/workspace-sts2/ChimpsFuncTestMaven/src/test/resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: /Users/eyoung2297k/development/workspace-sts2/ChimpsFuncTestMaven/target/surefire-reports --- T E S T S --- There
Re: Groovy Maven project and groovy tests
you might be able to glean some help from a groovy-based maven plugin I'm working on http://code.google.com/p/indoorsdog/source/browse/#svn%2Fjacoco%2Ftrunk%2Fjacoco-maven-plugin -- View this message in context: http://maven.40175.n5.nabble.com/Groovy-Maven-project-and-groovy-tests-tp3344543p3344941.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
set up maven repository for all the mirrors
Hello everyone, I found this is really useful to setup internal maven repository http://www.jfrog.org/products.php, which takes care of getting dependencies by looking into all repositories. A simple question, I want to setup this in an intranet environment; by allowing ldap authentication; Right now, I am able to access in my local box as, http://localhost:8080/artifactory with jetty-7 servelt container running on port 8080. is it possible to have customized url by having apache-webserver installed, like, http://repo.mycompany.com/artifactory -- View this message in context: http://maven.40175.n5.nabble.com/set-up-maven-repository-for-all-the-mirrors-tp3344955p3344955.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
Maven Hibernate
Hello everyone, I have a problem with Hibernate and Maven : I have an EAR project which contains an EAR and an EJB project. Into my EJB project, I succed to configure and to use correctly Hibernate. But when I wish to consume a web service, Netbeans add automaticaly (I don't know why) in my pom.xml the following code : resources resource targetPathMETA-INF/targetPath directorysrc/directory includes/ /resource /resources Then, when I deploy the EAR into a JBoss 5 server, I have an error saying that the persistence unit is not found. It is surely the code above that block, but when I remove it, it pass the compilation and the deployment but I had an error during the execution because it can't found the WSDL. So I'm totally blocked :( I don't know if I had to remove or not the code above, if I had to change it, why my persistence unit is not found etc... -- View this message in context: http://maven.40175.n5.nabble.com/Maven-Hibernate-tp3344921p3344921.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: Groovy Maven project and groovy tests
I'm stumped too. Here's the whole pom It's a maven project with nothing but one GroovyTestCase in src/test/groovy 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 groupIdcom.comcast.neto/groupId artifactIdChimpsFuncTest/artifactId version1.0-SNAPSHOT/version packagingjar/packaging nameChimpsFuncTest/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.8.1/version scopetest/scope /dependency dependency groupIdorg.codehaus.groovy/groupId artifactIdgroovy-all/artifactId version1.7.4/version /dependency !-- dependency -- !-- groupIdorg.codehaus.groovy.maven/groupId -- !-- artifactIdgmaven-mojo/artifactId -- !-- version1.0/version -- !-- /dependency -- !-- dependency -- !-- groupIdorg.codehaus.groovy.maven.runtime/groupId -- !-- artifactIdgmaven-runtime-1.6/artifactId -- !-- version1.0/version -- !-- /dependency -- dependency groupIdorg.codehaus.geb/groupId artifactIdgeb-core/artifactId versionRELEASE/version /dependency dependency groupIdorg.seleniumhq.selenium/groupId artifactIdselenium-firefox-driver/artifactId versionRELEASE/version /dependency /dependencies build pluginManagement plugins plugin groupIdorg.codehaus.gmaven/groupId artifactIdgmaven-plugin/artifactId version1.2/version configuration providerSelection1.7/providerSelection /configuration extensionstrue/extensions inheritedtrue/inherited executions execution goals goalgenerateStubs/goal goalcompile/goal goalgenerateTestStubs/goal goaltestCompile/goal /goals /execution /executions /plugin /plugins /pluginManagement /build /project On Mon, Jan 17, 2011 at 11:21 AM, John Prystash stash1...@yahoo.com wrote: Hmm, maybe post your POM again as it is? I'm out of ideas, but something isn't configured right obviously. When I use the logging swtich, I get output along the lines of: [DEBUG] TestCompileMojo - Detected compatible provider: 1.6 [INFO] [groovy:testCompile {execution: default}] [DEBUG] TestCompileMojo - Artifact loader configured with handler: org.codehaus.gmaven.plugin.ProviderMojoSupport$ArtifactHandlerImpl@5130500f [DEBUG] DefaultProviderManager - Using cached provider '[1.7] 'Groovy v1.7-beta-2' (version: 1.7.0-beta-2, type: org.codehaus.gmaven.runtime.v1_7.ProviderImpl)' for selection: 1.7 [DEBUG] TestCompileMojo - Project Classpath: [DEBUG] TestCompileMojo - file:/tmp/test/target/test-classes/ [DEBUG] TestCompileMojo - file:/tmp/test/target/classes/ [DEBUG] TestCompileMojo - file:/home/prystasj/.m2/repository/org/codehaus/groovy/groovy-all/1.7.4/groovy-all-1.7.4.jar [DEBUG] TestCompileMojo - file:/home/prystasj/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar [DEBUG] TestCompileMojo - Scanning for sources in: /tmp/test/src/test/groovy [DEBUG] TestCompileMojo - Forcing to compile: [DEBUG] TestCompileMojo - + /tmp/test/src/test/groovy/prystasj/ExampleTest.groovy [DEBUG] ClassCompilerFeature$ClassCompilerImpl - Added: file:/tmp/test/src/test/groovy/prystasj/ExampleTest.groovy [DEBUG] TestCompileMojo - + /tmp/test/src/test/groovy/prystasj/HelperTest.groovy [DEBUG] ClassCompilerFeature$ClassCompilerImpl - Added: file:/tmp/test/src/test/groovy/prystasj/HelperTest.groovy [DEBUG] ClassCompilerFeature$ClassCompilerImpl - Classpath: [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/tmp/test/target/test-classes/ [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/tmp/test/target/classes/ [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/home/prystasj/.m2/repository/org/codehaus/groovy/groovy-all/1.7.4/groovy-all-1.7.4.jar [DEBUG] ClassCompilerFeature$ClassCompilerImpl - file:/home/prystasj/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar [DEBUG] ClassCompilerFeature$ClassCompilerImpl - Compiling 2 sources [DEBUG] ClassCompilerFeature$ClassCompilerImpl -
Re: Groovy Maven project and groovy tests
one thing that sticks out is that you aren't binding the gmaven goals, they are just in in pluginManagementplugins not buildplugins -- View this message in context: http://maven.40175.n5.nabble.com/Groovy-Maven-project-and-groovy-tests-tp3344543p3345067.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: Distinguishing artifacts created on branches
We make extensive use of branches and including the branch in the version number is definitely the way to go.Merging between branches does involve resolving the version number, the person in charge of merging should know what to do. I found that the versions plugin isn't much help when you start adding the branch name in - things like 'most recent snapshot' don't take into account the current branch as maven has no knowledge of it. Also I have written scripts that can check that the version number matches the current (git) branch - having a plugin would be nice for this kind of thing. Overall I think that maven kind of ignores the problem of branches of projects and doesn't really help at all in making the workflow easy. I would love to see some kind of acknowledgement of branches in maven but I'm probably being overly optimistic. Lindsay -Original Message- From: Ron Wheeler [mailto:rwhee...@artifact-software.com] Sent: Tuesday, 18 January 2011 3:38 a.m. To: users@maven.apache.org Subject: Re: Distinguishing artifacts created on branches Using the branch id in the version number will make it easier to understand the relation between the source and the binary that it makes. If you every want to know how developer X actually got the test to work last month, it will be nice to be able to use the dependencies from his project to find a POM and the rest of the sources that match up by GAV and SCM branch id. Ron On 17/01/2011 9:02 AM, Ryan Connolly wrote: Using a classifier MAY be appropriate for this use case. On Jan 17, 2011 8:57 AM, Lóránt Pintérlorant.pin...@gmail.com wrote: Hi, I want to deploy alternate artifacts from my branches so that other developers can depend on them. Say, I have a product called groupIdcom.mycompany.tool/groupId artifactIdtool/artifactId version5.2-SNAPSHOT/version Now, I'd like to create a branch of this one where I add a new feature. And this early adopter developer here wants to already build on my new feature, even before I merge it back to trunk, so I deploy my artifacts to Nexus. Now, I obviously can't deploy them under the same GAV coordinates, otherwise they'd overwrite the ones generated from trunk. I can think of two different options: 1) Changing the version number groupIdcom.mycompany.tool/groupId artifactIdtool/artifactId version5.2-MYBRANCH-SNAPSHOT/version The good thing about this is that I can use the Versions plugin to set change the version number even in a multi-module project. The bad thing is that whenever a release happens on trunk, or when I merge the branch back to trunk, I get conflicts in all my POMs about the version number. 2) Changing the group ID groupIdcom.mycompany.tool.mybranch/groupId artifactIdtool/artifactId version5.2-SNAPSHOT/version This looks a bit better, but I can't use the versions plugin, and updating the groupId in many places in a big multi-module project is quite troublesome. Also, it doesn't seem correct semantically. Do you have any advice on this? Thanks, Lorant - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
parent pom and child compile; child needs sibling classes
I have the following setup using Maven3 (or 2.2): Parent-Pom (same directory level as Child1,2. Use relativePath for parent in Child1, Child2) Child1: ClassA, ClassB Child2: ClassA_Entity.aj, ClassB_Entity.aj So Child2 needs Child1 classes to augment with aspectj. I have all of the aspectj components setup correctly (e.g. Child1 dependency is on the inpath, etc.). Everything works fine if I run package or test in the parent directory. Child2 sees the assembly from Child1 just as the docs suggest. The docs also say that if I run mvn test (for example) in Child2, then Child1 has to be in the repository because maven won't build Child1. However, is there a setting that says, don't expect Child1 in the repository, just use the target class files since its a sibling child? The docs also say that if I run mvn test in the parent, Child2 will see the target directory in Child1 and not have to have Child1 in the repository. So its slightly different behavior depending on where you issues the test or assembly command in the parent or child projects. That's fine, but for various IDE reasons, I would like to have Child1 target classes directly accessed whenever I run a maven command in Child2. Is there a switch that says when I issue a mvn command in Child2 to use the target classes in Child1 instead of forcing Child1 to have to be in the repository? I had envisioned 2-3 child projects each depending on a sibling or two that augment the basic classes using aspectj. In this case, chaining helps me with IDE development. ADJT in eclipse can do this, but when I use m2eclipse and it runs maven under the hood on a full rebuild, maven forces the sibling to be in the repository, which its not (and which incurs even more build time to force it to be in the repository). Is there another way to handle this that is a better pattern or approach? -- View this message in context: http://maven.40175.n5.nabble.com/parent-pom-and-child-compile-child-needs-sibling-classes-tp3345200p3345200.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: parent pom and child compile; child needs sibling classes
However, is there a setting that says, don't expect Child1 in the repository, just use the target class files since its a sibling child? The No. various IDE reasons, I would like to have Child1 target classes directly accessed whenever I run a maven command in Child2. You can't. Is there a switch that says when I issue a mvn command in Child2 to use the target classes in Child1 instead of forcing Child1 to have to be in the repository? No. Unless you are building from the parent, as you already stated. Is there another way to handle this that is a better pattern or approach? The reactor plugin may be helpful, but I'm honestly unsure as I've never formally used it as yet. http://stackoverflow.com/questions/2050241/what-is-the-maven-reactor Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: set up maven repository for all the mirrors
is it possible to have customized url by having apache-webserver installed, like, http://repo.mycompany.com/artifactory Probably. But we're not experts on Artifactory here. Why aren't you asking the Artifactory people who created the software you are running and now have questions about? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: dependency:build-classpath seems to ignore configuration
i don't think the classpath is filtered based on those values in this goal, it just dumps the actual classpath that would match the desired scope. On Mon, Jan 17, 2011 at 10:52 AM, John Anderson dayt...@comcast.net wrote: I am trying to use dependency:build-classpath. If I run mvn dependency:analyze all seems fine, but if I do mvn dependency:build-classpath, it seems to ignore my configuration. For example, the scope and outputFileFilter settings are ignored in the second case. Am I doing something wrong? Here is the pertinent part of my pom: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.0.2/version configuration source1.6/source target1.6/target /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idbuild-classpath/id goals goalbuild-classpath/goal /goals configuration includeScoperuntime/includeScope excludeScopetest/excludeScope outputFilterFiletrue/outputFilterFile /configuration /execution /executions /plugin /plugins /build - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Overriding properties from command line arguments
Hi guys! I have a problem with something I took for granted until now :P What I need is to override a property value by passing a new value from the command line. For example, I have something like this in my pom.xml: ... properties myPropmyDefault/myProp /properties ... and then I run a goal with some arguments...let's say... mvn help:effective-pom -DmyProp=myValue So, what I was expecting was to override myDefault with myValue but that's not happening. Is that the correct behavior? If that's the way it works, how can I do what I want? (maybe profiles?) Thanks in advance, Vic
Re: Groovy Maven project and groovy tests
Yes, that was it. I removed the pluginManagement tags. Now to to get my Geb tests working. Thanks. On Mon, Jan 17, 2011 at 1:29 PM, lukewpatterson lukewpatter...@gmail.comwrote: one thing that sticks out is that you aren't binding the gmaven goals, they are just in in pluginManagementplugins not buildplugins -- View this message in context: http://maven.40175.n5.nabble.com/Groovy-Maven-project-and-groovy-tests-tp3344543p3345067.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 -- - Ed
Re: Overriding properties from command line arguments
I think you're confusing Maven properties and system properties. myProp as defined within the properties section is a Maven property. You cannot override that through a Java system property (-DmyProp). However, in your POM you could reference your myProp property through ${myProp}. If you execute Maven through mvn install -DmyProp=blabla, the ${myProp} reference should pick up the Java system property you define ('blabla') instead of the Maven property defined in the POM. /Anders On Tue, Jan 18, 2011 at 00:28, Victor Calvello vcalve...@gmail.com wrote: Hi guys! I have a problem with something I took for granted until now :P What I need is to override a property value by passing a new value from the command line. For example, I have something like this in my pom.xml: ... properties myPropmyDefault/myProp /properties ... and then I run a goal with some arguments...let's say... mvn help:effective-pom -DmyProp=myValue So, what I was expecting was to override myDefault with myValue but that's not happening. Is that the correct behavior? If that's the way it works, how can I do what I want? (maybe profiles?) Thanks in advance, Vic
Re: Maven release:perform deploy failed access denied
Ok, I guess it's getting a little better... but there's something I'm not sure to understand. First, my project is a multi-module project, should I set special arguments when I launch release:perform ? An then, I wonder what's the differences, in my main pom.xml between the tag distributionManagement, used by the deploy task, and the other tag repositories... In the tag repositories, I added 2 tags repository to set my nexus snapshot and releases URL. I don't really know what I have to set in the distributionManagement tag... it's like I have to indicate my nexus server twice ? I tried to remove thoses tags, but there are mandatory... Thx for your help, -- View this message in context: http://maven.40175.n5.nabble.com/Maven-release-perform-deploy-failed-access-denied-tp3339497p3345723.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: AW: why does maven use /bin/sh -c ls -1lna /djb3/... just to get a file attribute?
This would seem like its related to the format of the output of /bin/sh -c ls -1nlad /dkb3/sw-projekte/asf/sqljet/trunk/pom.xml from OpenVMS. I fixed a bug in this code some time ago, and in the process I encoded the format of the screen scraping into a unit test. So at least there is test coverage. You can see the test in https://github.com/sonatype/plexus-components/commit/13e8d84c0eff1bb26229b1ab904b343d2983a452 Looks like you need to make adjustments to the code/test for OpenVMS. Kristian Den 17.01.2011 12:18, skrev Stadelmann Josef: Thank you all for helping me. You are right I seem to be the only one using maven on OpenVMS. Still ramping up; I've never built maven on OpenVMS due to some JSVN catch down problem and a HP JAVA JVM crash. Next development server running OpenVMS will bring me back a 100% patched OS and a stable running JVM; then I can catch down sources using jsvn (svnkit) more easy. Then allows me building maven using thze ant bootstrap and/or bump it all up to most recent maven versions as I did so many times on my VISTA PC. The results seen on OpenVMS are very very promising for ANT, JSVN and MAVEN; integration among platforms is all for me. NetBeans IDE with distributed NetBeans from HP allows me to have local PC based projects as well as remote projects running/debugging on OpenVMS. Aim : have a fast reliable development environment both VISTA PC with Visual Studio 2010, WCF 3.5, VB.NET, C#.NET AND NetBeans e all based toward my Apache Axis2/J+C Servers on OPenVMS integrating via HP WSIT our very large Spezpla OpenVMS Legacy Server with its Oracle 10g DB. To deliver a bit more insigth to the current problem I am faced with - here the log - part - with the error and the -e and -X switch set. [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ sqljet --- [DEBUG] org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1: [DEBUG]org.apache.maven:maven-plugin-api:jar:2.0.6:compile [DEBUG]org.apache.maven:maven-project:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-settings:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-profile:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.6:compile [DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0.6:compile [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile [DEBUG] junit:junit:jar:3.8.1:compile [DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile [DEBUG]org.apache.maven:maven-model:jar:2.0.6:runtime [DEBUG]org.apache.maven:maven-artifact:jar:2.0.6:compile [DEBUG]org.apache.maven:maven-archiver:jar:2.4.1:compile [DEBUG] org.codehaus.plexus:plexus-interpolation:jar:1.13:compile [DEBUG]org.codehaus.plexus:plexus-archiver:jar:1.0:compile [DEBUG] org.codehaus.plexus:plexus-io:jar:1.0:compile [DEBUG]commons-lang:commons-lang:jar:2.1:compile [DEBUG]org.codehaus.plexus:plexus-utils:jar:2.0.5:compile [DEBUG] Created new class realm pluginorg.apache.maven.plugins:maven-jar-plugin:2.3.1 [DEBUG] Populating class realm pluginorg.apache.maven.plugins:maven-jar-plugin:2.3.1 [DEBUG] Included: org.apache.maven.plugins:maven-jar-plugin:jar:2.3.1 [DEBUG] Included: junit:junit:jar:3.8.1 [DEBUG] Included: org.apache.maven:maven-archiver:jar:2.4.1 [DEBUG] Included: org.codehaus.plexus:plexus-interpolation:jar:1.13 [DEBUG] Included: org.codehaus.plexus:plexus-archiver:jar:1.0 [DEBUG] Included: org.codehaus.plexus:plexus-io:jar:1.0 [DEBUG] Included: commons-lang:commons-lang:jar:2.1 [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:2.0.5 [DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6 [DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 [DEBUG] Excluded: classworlds:classworlds:jar:1.1-alpha-2 [DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.6 [DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.6 [DEBUG] Configuring mojo org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar from plugin realm ClassRealm[pluginorg.apache.maven.pl ugins:maven-jar-plugin:2.3.1, parent: ClassRealm[maven.api, parent: null]] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jar-plugin:2.3.1:jar' with basic configurator -- [DEBUG] (f) classesDirectory = /dkb3/sw-projekte/asf/sqljet/trunk/target/classes [DEBUG] (f) defaultManifestFile =
Re: Maven release:perform deploy failed access denied
Regarding special args for release:peform I don't understand the question. What args to spec depends on what you want to do. Try it, read/google and come back when you have a specific question. Regarding distMagmt you need to spec a snapshot repo if you deloy snapshots and a (release) repo if you deploy a release (like you do with release:perform). If you deploya maven site you also need to spec a site url in distMgmt. It's three different things. If you have the same id for all of them you only need to define one set of credentials in settings.xml. However, I normally have three different ids and duplicate the creds in settings.xml. /Anders On Tue, Jan 18, 2011 at 08:14, jeb001 jeremy.jar...@gmail.com wrote: Ok, I guess it's getting a little better... but there's something I'm not sure to understand. First, my project is a multi-module project, should I set special arguments when I launch release:perform ? An then, I wonder what's the differences, in my main pom.xml between the tag distributionManagement, used by the deploy task, and the other tag repositories... In the tag repositories, I added 2 tags repository to set my nexus snapshot and releases URL. I don't really know what I have to set in the distributionManagement tag... it's like I have to indicate my nexus server twice ? I tried to remove thoses tags, but there are mandatory... Thx for your help, -- View this message in context: http://maven.40175.n5.nabble.com/Maven-release-perform-deploy-failed-access-denied-tp3339497p3345723.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
problem when upgrading from maven2 to maven3
Dear all maven developers, I have a project which was build by maven2, It always works well when build or package it using maven2. But it came out a build error after i upgraded maven from maven2 to maven3. The main error message is :it can't find a special method in a class. Aware of collision of different version jars, I find the project have two related dependencies, one is A, another is B. There are a class C with the same name, but the class C in B provide method m, which is not provided by the class C in A. I run the command mvn dependency:tree. In the dependency tree, I saw that the project dependents A and B directly. I moved declaration of B before A, but it made no difference. other way, A and B are necessary, neither of them is permitted to remove. Can you tell me what I can do? and why a project work with maven2 well can't not be build with maven3? best regards yours sincerely Yongpo Liu
Re: parent pom and child compile; child needs sibling classes
Thanks for the response. Based on your comments I looked into maven reactor. It looks like in 2.2 and 3.0 some of the functionality has been exposed as command line options directly. It does help project build subsets, so now I understand how it works. It does not help with the classpath resolution issue. m2eclipse seems to know how to add projects in the eclipse workspace to a project repository to resolve from but not core maven. Perhaps there is a plugin that allows you to arbitrarily specify relative paths of folders for resolving classes on the classpath for certain scopes e.g. test. I'll keep an eye out. Meanwhile, I'll try to address my needs another way or understand if I am trying to do something that is really not needed. -- View this message in context: http://maven.40175.n5.nabble.com/parent-pom-and-child-compile-child-needs-sibling-classes-tp3345200p3345453.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
Changing the groupId/artifactId of an artifact in the next version but keep maven conflict detection
Hi, We have a pom.xml for the drools guvnor repository jar, with this identification: groupIdorg.drools/groupId artifactIddrools-repository/artifactId version5.1.0/version Now, for the next version of that jar, we need to change the identification to: groupIdorg.drools.guvnor/groupId artifactIdguvnor-repository/artifactId version5.2.0/version It's the same code in the jar, but the original identification was wrong and we're fixing that now. The problem is, what happens if one of our users has this dependency tree? - foo -- foo depends on bar --- bar depends on org.drools:drools-repository:5.1.0 -- foo depends on org.drools.guvnor:guvnor-repository:5.2.0 Maven will not detect the dependency conflict between - org.drools:drools-repository:5.1.0 - org.drools.guvnor:guvnor-repository:5.2.0 and it will put both of them in the classpath, instead of just 5.2.0. Is there any way to tell maven in the 5.2.0 pom.xml, something like this: groupIdorg.drools.guvnor/groupId artifactIdguvnor-repository/artifactId version5.2.0/version legacy-identifications legacy-identification groupIdorg.drools/groupId artifactIddrools-repository/artifactId legacy-identification /legacy-identifications So it does detect the dependency conflict and lets just 5.2.0 survive? -- With kind regards, Geoffrey De Smet - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org