Re: surefire-junit47 provider does not see my tests (while older one does but fails)
I haven't looked at the code, but did you try adding includes to the config and not just excludes ? If that solves the issue you should file a jira. Kristian Den 06.04.2011 19:00, skrev Igor Petruk: Hi. I forced surefire provider in the following way plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.8/version configuration excludes exclude**/manual/**/exclude /excludes /configuration dependencies dependency groupIdorg.apache.maven.surefire/groupId artifactIdsurefire-junit47/artifactId version2.8/version /dependency /dependencies /plugin When I run the tests it says There are no tests to run. If I don't force the provider tests fail in a regular way with something like java.lang.AbstractMethodError at org.springframework.test.context.TestContextManager.afterTestClass(TestContextManager.java:448) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:77) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) reported to surefire-reports (not to console) What could be the reason of a new provider not finding the test. I use Spring 3, JUnit 4.7 Thanks - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] Maven Indexer version 4.1.0 Released
The Maven team is pleased to announce the release of the Maven Indexer, version 4.1.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.1.0/version /dependency Release Notes - Maven Indexer 4.1.0 ** Bug * [MINDEXER-12] - IOException downloading *.gz masked by IOE of *.zip * [MINDEXER-13] - *.gz index not loadable using default LightweightHttpWagon * [MINDEXER-14] - FlatSearchResponse.totalHits = 1000 when there are in fact more * [MINDEXER-16] - Transport format is not backward compatible ** Improvement * [MINDEXER-10] - BottleWarmer thread name should contain Context ID at least * [MINDEXER-15] - Indexer blindly opens JARs for inspection, causing logspam * [MINDEXER-17] - Indexer spawned threads should be identifiable * [MINDEXER-18] - Indexer is OOM prone while indexing large ZIP files * [MINDEXER-20] - Make IndexDataReader.readIndex fail fast on garbage input Enjoy, -The Maven team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Checkout and Build all dependencies
We have a compliance/audit requirement that we need to be able to exactly reproduce builds. (Current requirement does not allow the build machine access to our internal nexus repository.) We have a few projects with typical maven dependency hierarchy. Is there a way that I could setup a build script that would fetch all dependencies from SVN and then trigger a complete build. Of course, we start the build process by deleting everything from the local maven repository. Then, we build going down the dependency hierarchy. As we build a parent, we install it in the local maven repository on the build machine. This does seem to be something that CruiseControl and Hudson do. Should I consider just setting up CruiseControl or Hudson to perform the builds for us? Or, is there a better way to setup this checkout and build process. Any advice much appreciated. -- Anas Mughal -- View this message in context: http://maven.40175.n5.nabble.com/Checkout-and-Build-all-dependencies-tp4287477p4287477.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: The maven-assembly-plugin and a large complex project.
Here we have a similar setup, we manage to build everything into a WAR including dependent jars using reactor/assembly project: BTW, we use separate poms for parent (inheritance) and reactor (multi-module), which I think makes sense as all sub-modules have the parent as parent but not one sub-module even knows about the reactor one (which serves just to build everything). So the reactor project lists ALL other modules (besides parent, only used to inherit properties). Not a module depends or inherits from reactor module. The war module depends on some jars, which in turn depend on other jars etc. So when we issue mvn install or mvn deploy in the reactor project, it will first see the dependency graph going from the war to everything else, and first install/deploy the needed things (jars) so, when it reaches the war for packaging, all the necesary jars have already been installed/deployed, and are available as dependencies to the war, which gets packaged and installed/deployed as expected. So I thing the tricky part for us to see about reactor and parent and modules and all this stuff was separating concerns: our parent only used to inherit, the reactor only used to lists all other modules, and the build order is determined by a correctly specified dependency graph (the war depends on jars, etc). With multiple wars I believe it should behave the same way, if dependencies spring from the wars to the jars they depend on (and thus when building separate graphs are calculated each culminating in a war with other dependencies included inside as jars). Em 06-04-2011 15:46, Wendy Smoak escreveu: On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbonsadam.s.gibb...@gmail.com wrote: Also I refer you to: http://maven.apache.org/plugins/maven-assembly-plugin/which states that it can create distributions in the war format. It *can* but you generally only need it if the war plugin is not doing what you need. When building a war, the war plugin is the logical choice _until_ you run into some complication that the war plugin can't solve. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: The maven-assembly-plugin and a large complex project.
Alex, that's perfect! Exactly the kind of thing I'm trying to do myself. Would you mind posting your reactor, war, jar and parent poms please? I'd really like to see a working example of this in action. Cheers, Adam On 7 April 2011 09:51, Alex Lopez alo...@flordeutopia.pt wrote: Here we have a similar setup, we manage to build everything into a WAR including dependent jars using reactor/assembly project: BTW, we use separate poms for parent (inheritance) and reactor (multi-module), which I think makes sense as all sub-modules have the parent as parent but not one sub-module even knows about the reactor one (which serves just to build everything). So the reactor project lists ALL other modules (besides parent, only used to inherit properties). Not a module depends or inherits from reactor module. The war module depends on some jars, which in turn depend on other jars etc. So when we issue mvn install or mvn deploy in the reactor project, it will first see the dependency graph going from the war to everything else, and first install/deploy the needed things (jars) so, when it reaches the war for packaging, all the necesary jars have already been installed/deployed, and are available as dependencies to the war, which gets packaged and installed/deployed as expected. So I thing the tricky part for us to see about reactor and parent and modules and all this stuff was separating concerns: our parent only used to inherit, the reactor only used to lists all other modules, and the build order is determined by a correctly specified dependency graph (the war depends on jars, etc). With multiple wars I believe it should behave the same way, if dependencies spring from the wars to the jars they depend on (and thus when building separate graphs are calculated each culminating in a war with other dependencies included inside as jars). Em 06-04-2011 15:46, Wendy Smoak escreveu: On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbonsadam.s.gibb...@gmail.com wrote: Also I refer you to: http://maven.apache.org/plugins/maven-assembly-plugin/which states that it can create distributions in the war format. It *can* but you generally only need it if the war plugin is not doing what you need. When building a war, the war plugin is the logical choice _until_ you run into some complication that the war plugin can't solve. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven-surefire-plugin additionalClasspathElement not working ?
Does anybody know why this is not working: c:/_composer/_config/libraries/picketlink-bindings-1.0.4.final.jar I keep receiving the following error while running the itblast-plugin on tomcat5x: java.lang.ClassNotFoundException: org.picketlink.identity.federation.bindings.tomcat.sp.SPPostSignatureFormAuthenticator Complete plugin: org.apache.maven.plugins maven-surefire-plugin 2.8 false ${VMARGS__TEST_PROPERTY_FILE_SQLSERVER} ${VMARGS__MAVEN_SUREFIRE_PLUGIN_2} false c:/_composer/_config/libraries/picketlink-bindings-1.0.4.final.jar -- View this message in context: http://maven.40175.n5.nabble.com/maven-surefire-plugin-additionalClasspathElement-not-working-tp4288032p4288032.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 surefire plugin run twice with different argLine setttings
Within our build process we would like to run all unittests twice. Because we would like to test everything against SQL Server and Oracle. To achieve this I added the maven-surefire-plugin to the pom twice. The first one has id 'run_tests_oracle_id' and the second one is called 'run_tests_sqlserver_id'. Now in the configuration I use the argLine to set which database has to be used. But each time when the build is executed the latest configuration of maven-surefire-plugin is used. So it seems not possible to load two maven-surefire-plugins with two different configurations? Does somebody know a solution for this? Main purpose is running all unittest twice on two different databases using maven-surefire-plugin and the itblast-plugin. Thx in advance. run_tests_oracle_id run_tests_oracle org.apache.maven.plugins maven-surefire-plugin 2.8 false ${VMARGS__TEST_PROPERTY_FILE_ORACLE} ${VMARGS__MAVEN_SUREFIRE_PLUGIN_1} false c:/_composer/_config/libraries/picketlink-bindings-1.0.4.final.jar org.twdata.maven maven-itblast-plugin 0.5 itblast_oracle post-integration-test execute tomcat5x ${APPSERVER_DB_ORACLE__PORT__HTTP} ${APPSERVER_DB_ORACLE__PORT__RMI} ${junit.test.pattern} run_tests_sqlserver_id run_tests_sqlserver org.apache.maven.plugins maven-surefire-plugin 2.8 false ${VMARGS__TEST_PROPERTY_FILE_SQLSERVER} ${VMARGS__MAVEN_SUREFIRE_PLUGIN_2} false org.twdata.maven maven-itblast-plugin 0.5 itblast_sqlserver verify execute jetty6x ${APPSERVER_DB_SQLSRV__PORT__HTTP}
Re: Maven surefire plugin run twice with different argLine setttings
Hi Hugo, Your XML from both of your mails is garbled, unreadable (by Nabble UI if I'm right). Please use proper MUA or even better paste (http://pastebin.com/) or gist ( https://gist.github.com/) them and send the links to them instead. Thanks, ~t~ On Thu, Apr 7, 2011 at 11:03 AM, Hugo de Oude hdo...@allshare.nl wrote: Within our build process we would like to run all unittests twice. Because we would like to test everything against SQL Server and Oracle. To achieve this I added the maven-surefire-plugin to the pom twice. The first one has id 'run_tests_oracle_id' and the second one is called 'run_tests_sqlserver_id'. Now in the configuration I use the argLine to set which database has to be used. But each time when the build is executed the latest configuration of maven-surefire-plugin is used. So it seems not possible to load two maven-surefire-plugins with two different configurations? Does somebody know a solution for this? Main purpose is running all unittest twice on two different databases using maven-surefire-plugin and the itblast-plugin. Thx in advance. run_tests_oracle_id run_tests_oracle org.apache.maven.plugins maven-surefire-plugin 2.8 false ${VMARGS__TEST_PROPERTY_FILE_ORACLE} ${VMARGS__MAVEN_SUREFIRE_PLUGIN_1} false c:/_composer/_config/libraries/picketlink-bindings-1.0.4.final.jar org.twdata.maven maven-itblast-plugin 0.5 itblast_oracle post-integration-test execute tomcat5x ${APPSERVER_DB_ORACLE__PORT__HTTP} ${APPSERVER_DB_ORACLE__PORT__RMI} ${junit.test.pattern} run_tests_sqlserver_id run_tests_sqlserver org.apache.maven.plugins maven-surefire-plugin 2.8 false ${VMARGS__TEST_PROPERTY_FILE_SQLSERVER} ${VMARGS__MAVEN_SUREFIRE_PLUGIN_2} false org.twdata.maven maven-itblast-plugin 0.5 itblast_sqlserver verify execute jetty6x ${APPSERVER_DB_SQLSRV__PORT__HTTP} ${APPSERVER_DB_SQLSRV__PORT__RMI} ${junit.test.pattern} -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288014.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven surefire plugin run twice with different argLine setttings
Oh I'm sorry. I tried to correct the problem and hopefully it is ok now? -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288110.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
ws.zones.apache.org down
Hi, Over the last couple of days my builds have been failing because the repository hosted at ws.zones.apache.org is down. Does anyone know whats going on with this server? Regards Ben
Re: The maven-assembly-plugin and a large complex project.
I don't think I can post the full thing, but I'll post some cut down version so you can make an idea. BTW, I got the idea from the documentation on sonatype site, look into maven reference and maven by example books, available for free. They include links to sample projects configured more or less this way. http://www.sonatype.com/books/mvnref-book/reference/public-book.html Em 07-04-2011 10:30, Adam Gibbons escreveu: Alex, that's perfect! Exactly the kind of thing I'm trying to do myself. Would you mind posting your reactor, war, jar and parent poms please? I'd really like to see a working example of this in action. Cheers, Adam On 7 April 2011 09:51, Alex Lopezalo...@flordeutopia.pt wrote: Here we have a similar setup, we manage to build everything into a WAR including dependent jars using reactor/assembly project: BTW, we use separate poms for parent (inheritance) and reactor (multi-module), which I think makes sense as all sub-modules have the parent as parent but not one sub-module even knows about the reactor one (which serves just to build everything). So the reactor project lists ALL other modules (besides parent, only used to inherit properties). Not a module depends or inherits from reactor module. The war module depends on some jars, which in turn depend on other jars etc. So when we issue mvn install or mvn deploy in the reactor project, it will first see the dependency graph going from the war to everything else, and first install/deploy the needed things (jars) so, when it reaches the war for packaging, all the necesary jars have already been installed/deployed, and are available as dependencies to the war, which gets packaged and installed/deployed as expected. So I thing the tricky part for us to see about reactor and parent and modules and all this stuff was separating concerns: our parent only used to inherit, the reactor only used to lists all other modules, and the build order is determined by a correctly specified dependency graph (the war depends on jars, etc). With multiple wars I believe it should behave the same way, if dependencies spring from the wars to the jars they depend on (and thus when building separate graphs are calculated each culminating in a war with other dependencies included inside as jars). Em 06-04-2011 15:46, Wendy Smoak escreveu: On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbonsadam.s.gibb...@gmail.com wrote: Also I refer you to: http://maven.apache.org/plugins/maven-assembly-plugin/which states that it can create distributions in the war format. It *can* but you generally only need it if the war plugin is not doing what you need. When building a war, the war plugin is the logical choice _until_ you run into some complication that the war plugin can't solve. - 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: Installing third party artifact
I asked a very similar question in SO a few weeks ago: http://stackoverflow.com/questions/4906147 Maybe you will find it useful (the discussion is still open there). — Yegor Bugayenko, PMP®, SCEA On Wed, Apr 6, 2011 at 7:17 PM, Wayne Fay wayne...@gmail.com wrote: I have pom that has dependency of python to be installed in order to run test phase. I have python in specified version as third party in my nexus thirdparty repository. How can I specify what to do with the dependency (for this example, install python on machine if not exists) Maven has no ability (that I know of) to install an external package like Python during a build cycle as a result of a particular dependency occuring in a given project's list of deps. You could perhaps construct something using the dependency plugin or the exec plugin to do something along these lines. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: The maven-assembly-plugin and a large complex project.
This is an example multi-module project with separate war, reactor and parent poms Em 07-04-2011 11:16, Alex Lopez escreveu: I don't think I can post the full thing, but I'll post some cut down version so you can make an idea. BTW, I got the idea from the documentation on sonatype site, look into maven reference and maven by example books, available for free. They include links to sample projects configured more or less this way. http://www.sonatype.com/books/mvnref-book/reference/public-book.html Em 07-04-2011 10:30, Adam Gibbons escreveu: Alex, that's perfect! Exactly the kind of thing I'm trying to do myself. Would you mind posting your reactor, war, jar and parent poms please? I'd really like to see a working example of this in action. Cheers, Adam On 7 April 2011 09:51, Alex Lopezalo...@flordeutopia.pt wrote: Here we have a similar setup, we manage to build everything into a WAR including dependent jars using reactor/assembly project: BTW, we use separate poms for parent (inheritance) and reactor (multi-module), which I think makes sense as all sub-modules have the parent as parent but not one sub-module even knows about the reactor one (which serves just to build everything). So the reactor project lists ALL other modules (besides parent, only used to inherit properties). Not a module depends or inherits from reactor module. The war module depends on some jars, which in turn depend on other jars etc. So when we issue mvn install or mvn deploy in the reactor project, it will first see the dependency graph going from the war to everything else, and first install/deploy the needed things (jars) so, when it reaches the war for packaging, all the necesary jars have already been installed/deployed, and are available as dependencies to the war, which gets packaged and installed/deployed as expected. So I thing the tricky part for us to see about reactor and parent and modules and all this stuff was separating concerns: our parent only used to inherit, the reactor only used to lists all other modules, and the build order is determined by a correctly specified dependency graph (the war depends on jars, etc). With multiple wars I believe it should behave the same way, if dependencies spring from the wars to the jars they depend on (and thus when building separate graphs are calculated each culminating in a war with other dependencies included inside as jars). Em 06-04-2011 15:46, Wendy Smoak escreveu: On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbonsadam.s.gibb...@gmail.com wrote: Also I refer you to: http://maven.apache.org/plugins/maven-assembly-plugin/which states that it can create distributions in the war format. It *can* but you generally only need it if the war plugin is not doing what you need. When building a war, the war plugin is the logical choice _until_ you run into some complication that the war plugin can't solve. - 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: The maven-assembly-plugin and a large complex project.
BTW the mvn install or mvn deploy is done in our case on the top directory, the reactor one, and it gets propagated to the others in appropriate order by the reactor module. Em 07-04-2011 11:16, Alex Lopez escreveu: I don't think I can post the full thing, but I'll post some cut down version so you can make an idea. BTW, I got the idea from the documentation on sonatype site, look into maven reference and maven by example books, available for free. They include links to sample projects configured more or less this way. http://www.sonatype.com/books/mvnref-book/reference/public-book.html Em 07-04-2011 10:30, Adam Gibbons escreveu: Alex, that's perfect! Exactly the kind of thing I'm trying to do myself. Would you mind posting your reactor, war, jar and parent poms please? I'd really like to see a working example of this in action. Cheers, Adam On 7 April 2011 09:51, Alex Lopezalo...@flordeutopia.pt wrote: Here we have a similar setup, we manage to build everything into a WAR including dependent jars using reactor/assembly project: BTW, we use separate poms for parent (inheritance) and reactor (multi-module), which I think makes sense as all sub-modules have the parent as parent but not one sub-module even knows about the reactor one (which serves just to build everything). So the reactor project lists ALL other modules (besides parent, only used to inherit properties). Not a module depends or inherits from reactor module. The war module depends on some jars, which in turn depend on other jars etc. So when we issue mvn install or mvn deploy in the reactor project, it will first see the dependency graph going from the war to everything else, and first install/deploy the needed things (jars) so, when it reaches the war for packaging, all the necesary jars have already been installed/deployed, and are available as dependencies to the war, which gets packaged and installed/deployed as expected. So I thing the tricky part for us to see about reactor and parent and modules and all this stuff was separating concerns: our parent only used to inherit, the reactor only used to lists all other modules, and the build order is determined by a correctly specified dependency graph (the war depends on jars, etc). With multiple wars I believe it should behave the same way, if dependencies spring from the wars to the jars they depend on (and thus when building separate graphs are calculated each culminating in a war with other dependencies included inside as jars). Em 06-04-2011 15:46, Wendy Smoak escreveu: On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbonsadam.s.gibb...@gmail.com wrote: Also I refer you to: http://maven.apache.org/plugins/maven-assembly-plugin/which states that it can create distributions in the war format. It *can* but you generally only need it if the war plugin is not doing what you need. When building a war, the war plugin is the logical choice _until_ you run into some complication that the war plugin can't solve. - 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
Inheritance of properties
Hello List. I'm aiming at introducing maven (mvn 3.0.3 to be precise) in our company. In preparation for the task I've set up a company wide POM (c-p-p) and a project specific POM (c-p-p-p) plus a sample project for the developers here to use as a template (sample-project) - all included below. The SCM used is Subversion and the structure of the repositories is historically grown, which requires me to define a scm-loc property which needs to be reset for every project. The problem I'm encountering: After mvn install for the company and project wide parent POMs I run mvn help:effective-pom from within the sample-project with unexpected results: ... groupIdcom.company/groupId artifactIdsample-project/artifactId version2012.0.0-SNAPSHOT/version nameA sample project/name descriptionA very simple example project./description urlhttps://doc.company.com/build/trunk/maven/sample-project/url scm connectionscm:svn:https://svn.company.com/repos/build/trunk/maven/sample-project/c-p-p-p/sample-project/connection developerConnectionscm:svn:https://svn.company.com/repos/build/trunk/maven/sample-project/c-p-p-p/sample-project/developerConnection urlscm:svn:https://svn.company.com/repos/build/trunk/maven/sample-project/c-p-p-p/sample-project/url /scm ... - The project URL that I explicitly (re-)defined in the sample-project's POM is expanded as I would expect. - All URLs in the SCM section of the effective POM have a trailing c-p-p-p/sample-project (as does the project URL if it is inherited and not explicitly set it in the sample-project's POM). I understand that maven does inheritance before interpolation, so as the scm-loc property is set in the sample-project's POM I would expect all expansions of the property to have the value defined in the POM. What am I missing? Where does the additional suffixing come from? Is this a bug? Is there a way to achieve my goal without having to make it explicit in every single derived POM? As side remarks: The effective POM fpr c-p-p-p looks ok - no unexpected tailing traces of the parent POM there; and mvn 2.2.1 behaves exactly the same way. Cheers, Wolf POMs used c-p-p/pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion !-- Artifact coordinates -- groupIdcom.company/groupId artifactIdc-p-p/artifactId version2012.0.0-SNAPSHOT/version packagingpom/packaging !-- Artifact description -- nameCompany Parent POM/name descriptionCentral POM for all of Company. Defines central locations, central repositories and central properties./description urlhttps://${doc-host}/${svn-loc}/url !-- Globally defined properties -- properties !-- Documentation host -- doc-hostdoc.company.com/doc-host !-- Subversion repository host -- svn-hostsvn.company.com/svn-host !-- readonly access to SVN -- svn-roscm:svn:https://${svn-host}/repos/svn-ro !-- read/write access to SVN -- svn-rwscm:svn:https://${svn-host}/repos/svn-rw !-- Current branch in SVN -- svn-branchtrunk/svn-branch !-- location of artifact in SVN -- svn-locbuild/${svn-branch}/maven/c-p-p/svn-loc !-- Default encoding used for source files -- project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties !-- Repositories (SVN integration) -- scm connection${svn-ro}/${svn-loc}/connection developerConnection${svn-rw}/${svn-loc}/developerConnection url${svn-ro}/${svn-loc}/url /scm /project c-p-p-p/pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion properties !-- location of artifact in SVN -- svn-locbuild/${svn-branch}/maven/svn-loc /properties !-- Import Company-wide Settings -- parent groupIdcom.company/groupId artifactIdc-p-p/artifactId version2012.0.0-SNAPSHOT/version /parent !-- This defines generic project settings -- groupIdcom.company/groupId artifactIdc-p-p-p/artifactId version2012.0.0-SNAPSHOT/version packagingpom/packaging nameCompany Project Parent POM/name descriptionCentral POM for Company Projects. Defines generic project properties./description /project sample-project/pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion !-- Import Company Project Wide Settings -- parent groupIdcom.company/groupId artifactIdc-p-p-p/artifactId version2012.0.0-SNAPSHOT/version /parent properties !-- location of artifact in SVN --
Re: Maven surefire plugin run twice with different argLine setttings
still bad... i'm going to guess that you defined the plugin twice, e.g. plugin artifactIdmaven-surefire-plugin/artifactId ... /plugin plugin artifactIdmaven-surefire-plugin/artifactId ... /plugin instead of adding an extra execution to the plugin plugin artifactIdmaven-surefire-plugin/artifactId executions execution idora/id configuration ... /configuration /execution execution idmssql/id configuration ... /configuration /execution /execution /plugin Now you should note that the above will run the tests three times! (there is a default execution of the plugin) In Maven 3.x you can disable the default execution with execution iddefault-test/id configuration skipTeststrue/skipTests /configuration /execution That won't work for Maven 2.x so if you need to support building with Maven 2.x then you either define one execution's configuration in the plugin configuration and reset the configuration back in the second configuration (i.e. you only have one execution defined in your pom) plugin artifactIdmaven-surefire-plugin/artifactId !-- by default use ora config -- configuration ... /configuration executions execution !-- add one execution for mssql -- idmssql/id configuration ... /configuration /execution /execution /plugin or you do something like plugin artifactIdmaven-surefire-plugin/artifactId configuration skipTeststrue/skipTests /configuration executions execution idora/id configuration skipTests${skipTests}/skipTests ... /configuration /execution execution idmssql/id configuration skipTests${skipTests}/skipTests ... /configuration /execution /execution /plugin which will disable surefire by default and re-enable it based on the skipTests property for the two executions. On 7 April 2011 10:55, Hugo de Oude hdo...@allshare.nl wrote: Oh I'm sorry. I tried to correct the problem and hopefully it is ok now? -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288110.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: Maven surefire plugin run twice with different argLine setttings
On 7 April 2011 12:08, Stephen Connolly stephen.alan.conno...@gmail.com wrote: still bad... i'm going to guess that you defined the plugin twice, e.g. plugin artifactIdmaven-surefire-plugin/artifactId ... /plugin plugin artifactIdmaven-surefire-plugin/artifactId ... /plugin Forgot to mention... I can conclude you are using Maven 2.x... Maven 3.x will tell you to take a long walk off a short pier if you attempt to duplicate the same plugin in the pom. Maven 2.x will just merge the two which is why the last one wins for you instead of adding an extra execution to the plugin plugin artifactIdmaven-surefire-plugin/artifactId executions execution idora/id configuration ... /configuration /execution execution idmssql/id configuration ... /configuration /execution /execution /plugin Now you should note that the above will run the tests three times! (there is a default execution of the plugin) In Maven 3.x you can disable the default execution with execution iddefault-test/id configuration skipTeststrue/skipTests /configuration /execution That won't work for Maven 2.x so if you need to support building with Maven 2.x then you either define one execution's configuration in the plugin configuration and reset the configuration back in the second configuration (i.e. you only have one execution defined in your pom) plugin artifactIdmaven-surefire-plugin/artifactId !-- by default use ora config -- configuration ... /configuration executions execution !-- add one execution for mssql -- idmssql/id configuration ... /configuration /execution /execution /plugin or you do something like plugin artifactIdmaven-surefire-plugin/artifactId configuration skipTeststrue/skipTests /configuration executions execution idora/id configuration skipTests${skipTests}/skipTests ... /configuration /execution execution idmssql/id configuration skipTests${skipTests}/skipTests ... /configuration /execution /execution /plugin which will disable surefire by default and re-enable it based on the skipTests property for the two executions. On 7 April 2011 10:55, Hugo de Oude hdo...@allshare.nl wrote: Oh I'm sorry. I tried to correct the problem and hopefully it is ok now? -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288110.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: Inheritance of properties
First of all, I think that you're addressing the (what I call) developer way by adding properties for many tings. Even if this would work, it makes the poms difficult to read and understand. I believe future tooling support (like m2eclipse) will solve some of this, but I still regard this as the developer's approach. For example, I would leave the generic scm section out of the corporate pom. Or more correctly, the corporate pom will have a scm section specifying (without the usa of properties) the path to the scm where the corporate pom is located. Then for each product, the parent pom would override this by declaring the correct scm path for it. Have a look at how the corporate pom at Apache, Codehaus, etc is made up. Best-practice that works. It will give you some hints of configuration that you corp parent do lack. /Anders On Thu, Apr 7, 2011 at 12:45, Wolf Geldmacher wolf.geldmac...@abacus.chwrote: Hello List. I'm aiming at introducing maven (mvn 3.0.3 to be precise) in our company. In preparation for the task I've set up a company wide POM (c-p-p) and a project specific POM (c-p-p-p) plus a sample project for the developers here to use as a template (sample-project) - all included below. The SCM used is Subversion and the structure of the repositories is historically grown, which requires me to define a scm-loc property which needs to be reset for every project. The problem I'm encountering: After mvn install for the company and project wide parent POMs I run mvn help:effective-pom from within the sample-project with unexpected results: ... groupIdcom.company/groupId artifactIdsample-project/artifactId version2012.0.0-SNAPSHOT/version nameA sample project/name descriptionA very simple example project./description urlhttps://doc.company.com/build/trunk/maven/sample-project/url scm connectionscm:svn: https://svn.company.com/repos/build/trunk/maven/sample-project/c-p-p-p/sample-project/connection developerConnectionscm:svn: https://svn.company.com/repos/build/trunk/maven/sample-project/c-p-p-p/sample-project /developerConnection urlscm:svn: https://svn.company.com/repos/build/trunk/maven/sample-project/c-p-p-p/sample-project /url /scm ... - The project URL that I explicitly (re-)defined in the sample-project's POM is expanded as I would expect. - All URLs in the SCM section of the effective POM have a trailing c-p-p-p/sample-project (as does the project URL if it is inherited and not explicitly set it in the sample-project's POM). I understand that maven does inheritance before interpolation, so as the scm-loc property is set in the sample-project's POM I would expect all expansions of the property to have the value defined in the POM. What am I missing? Where does the additional suffixing come from? Is this a bug? Is there a way to achieve my goal without having to make it explicit in every single derived POM? As side remarks: The effective POM fpr c-p-p-p looks ok - no unexpected tailing traces of the parent POM there; and mvn 2.2.1 behaves exactly the same way. Cheers, Wolf POMs used c-p-p/pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion !-- Artifact coordinates -- groupIdcom.company/groupId artifactIdc-p-p/artifactId version2012.0.0-SNAPSHOT/version packagingpom/packaging !-- Artifact description -- nameCompany Parent POM/name descriptionCentral POM for all of Company. Defines central locations, central repositories and central properties./description urlhttps://${doc-host}/${svn-loc}/url !-- Globally defined properties -- properties !-- Documentation host -- doc-hostdoc.company.com/doc-host !-- Subversion repository host -- svn-hostsvn.company.com/svn-host !-- readonly access to SVN -- svn-roscm:svn:https://${svn-host}/repos/svn-ro !-- read/write access to SVN -- svn-rwscm:svn:https://${svn-host}/repos/svn-rw !-- Current branch in SVN -- svn-branchtrunk/svn-branch !-- location of artifact in SVN -- svn-locbuild/${svn-branch}/maven/c-p-p/svn-loc !-- Default encoding used for source files -- project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties !-- Repositories (SVN integration) -- scm connection${svn-ro}/${svn-loc}/connection developerConnection${svn-rw}/${svn-loc}/developerConnection url${svn-ro}/${svn-loc}/url /scm /project c-p-p-p/pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion properties !-- location of artifact in SVN -- svn-locbuild/${svn-branch}/maven/svn-loc /properties
Re: The maven-assembly-plugin and a large complex project.
On Thu, Apr 7, 2011 at 5:30 AM, Adam Gibbons adam.s.gibb...@gmail.com wrote: Alex, that's perfect! Exactly the kind of thing I'm trying to do myself. Would you mind posting your reactor, war, jar and parent poms please? I'd really like to see a working example of this in action. There are lots of open source projects out there where you can see the whole thing. Have a look at the Apache Archiva (repository manager) build: http://svn.apache.org/repos/asf/archiva/trunk/ The hierarchy is much deeper here, but if you start at http://svn.apache.org/repos/asf/archiva/trunk/archiva-modules/archiva-base/ you will see the pom.xml in that directory has typepom/type and a list of modules that match the subdirectories. If you list *all* the subdirectories as modules Maven will figure out the build order based on how they depend on each other. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Inheritance of properties
Hi Wolf, Wolf Geldmacher wrote: Hello List. I'm aiming at introducing maven (mvn 3.0.3 to be precise) in our company. In preparation for the task I've set up a company wide POM (c-p-p) and a project specific POM (c-p-p-p) plus a sample project for the developers here to use as a template (sample-project) - all included below. The SCM used is Subversion and the structure of the repositories is historically grown, which requires me to define a scm-loc property which needs to be reset for every project. The problem I'm encountering: After mvn install for the company and project wide parent POMs I run mvn help:effective-pom from within the sample-project with unexpected results: ... groupIdcom.company/groupId artifactIdsample-project/artifactId version2012.0.0-SNAPSHOT/version nameA sample project/name descriptionA very simple example project./description urlhttps://doc.company.com/build/trunk/maven/sample-project/url scm connectionscm:svn:https://svn.company.com/repos/build/trunk/maven/sample- project/c-p-p-p/sample-project/connection developerConnectionscm:svn:https://svn.company.com/repos/build/trunk/maven/sample- project/c-p-p-p/sample-project/developerConnection urlscm:svn:https://svn.company.com/repos/build/trunk/maven/sample- project/c-p-p-p/sample-project/url /scm ... - The project URL that I explicitly (re-)defined in the sample-project's POM is expanded as I would expect. - All URLs in the SCM section of the effective POM have a trailing c-p-p-p/sample-project (as does the project URL if it is inherited and not explicitly set it in the sample-project's POM). I understand that maven does inheritance before interpolation, so as the scm-loc property is set in the sample-project's POM I would expect all expansions of the property to have the value defined in the POM. What am I missing? Where does the additional suffixing come from? The artifactId is automatically appended as suffix when URLs are inherited. Is this a bug? No. Is there a way to achieve my goal without having to make it explicit in every single derived POM? No. As side remarks: The effective POM fpr c-p-p-p looks ok - no unexpected tailing traces of the parent POM there; and mvn 2.2.1 behaves exactly the same way. BTW: The behavior *is* annoying. It's not only that it prevents interpolation, it also silently implies that the artifactId matches the folder structure in the SCM. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Include dependency jars in the resources
Hi, I am new to Maven so, please help me out with the solution. I have set up a Java project and the pom creates a jar out of it. It has 5 dependency jars which are in my repository and the project refers to it fine (M2_REPO) These external jars are being placed under src directory but are not packaged with jar. I want to include these external jars in my jar. (Do not want to place each jar in resource manually) How do you tell pom.xml to include dependency jars in resources of the jar? Regards, Divya Arun Fidelity India This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements made in this are not necessarily those of FBS India or any other Fidelity entity. All e-mails sent from or to FBS India may be subject to our monitoring and recording procedures. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven surefire plugin run twice with different argLine setttings
Thanks for your information. At the moment we cannot switch to Maven 3 yet. I understand the part to take up multiple executions within the same surefire plugin. But how will this work combined with the itblast-plugin. Normally the itblast-plugin sets the goal (execute) and to be able to run the itblast-plugin it uses the surefire plugin. Then itblast is instructed to run the tests against for instance a jetty6x container. And to use the itblast-plugin a surefire plugin is needed. But I don't know if adding more executions to the surefire plugin will work for me. Because actually the itblast-plugin should have two executions if I understand his correctly. -- View this message in context: http://maven.40175.n5.nabble.com/Maven-surefire-plugin-run-twice-with-different-argLine-setttings-tp4288014p4288333.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: Checkout and Build all dependencies
On 06/04/2011 8:04 PM, AnasMughal wrote: We have a compliance/audit requirement that we need to be able to exactly reproduce builds. (Current requirement does not allow the build machine access to our internal nexus repository.) All builds or just releases? What stops you from doing that now? If you use releases properly in Maven and in your SVN, you should be able to rebuild any release. Everyone that has a system in production that is maintained has this need. It is not just an idea imposed from outside. If you can not rebuild every module that you have released into production or out to a customer base, how do you know that you can fix any bugs? SVN has all the information required to find the source code and the Maven POMs have all the information required to rebuild any release from the sources with all of the correct third party software and correct internally generated artifacts. Building a snapshot takes more effort. How often do you need to demonstrate a complete rebuild? Is it worth automating? How many projects make up the complete application? Ours has over 70 and I am sure that I can rebuild all 70 for any release but I have never thought of automating the process. It would take a couple of hours to rebuild and I would have to set up a new Nexus if I did not want to delete the existing releases from Nexus. I do not backup my Nexus data so I have to be sure that I can rebuild any release artifact from the sources. I know that I can build something close to the snapshots that existed on any given day using the history in SVN to identify the right sources. It will be more work and some modules may be out of synch if the developer did not check in every source that was deployed as a SNAPSHOT. We do not require that in our workflow nor do I particularly care about rebuilding SNAPSHOTS as they are transient by definition and are never released into the wild. Ron We have a few projects with typical maven dependency hierarchy. Is there a way that I could setup a build script that would fetch all dependencies from SVN and then trigger a complete build. Of course, we start the build process by deleting everything from the local maven repository. Then, we build going down the dependency hierarchy. As we build a parent, we install it in the local maven repository on the build machine. This does seem to be something that CruiseControl and Hudson do. Should I consider just setting up CruiseControl or Hudson to perform the builds for us? Or, is there a better way to setup this checkout and build process. Any advice much appreciated. -- Anas Mughal -- View this message in context: http://maven.40175.n5.nabble.com/Checkout-and-Build-all-dependencies-tp4287477p4287477.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: Include dependency jars in the resources
I am new to Maven so, please help me out with the solution. I have set up a Java project and the pom creates a jar out of it. It has 5 dependency jars which are in my repository and the project refers to it fine (M2_REPO) This worries me. What do you mean by M2_REPO? You shouldn't have any references to the (local) repository in your project. These external jars are being placed under src directory but are not packaged with jar. How are these jars being placed in the src folder? Anything being produced/copied/unpacked/etc during the build process should be put in the target folder. I want to include these external jars in my jar. (Do not want to place each jar in resource manually) How do you tell pom.xml to include dependency jars in resources of the jar? Did you try googling? http://www.mail-archive.com/users@maven.apache.org/msg72607.html /Anders
Re: Include dependency jars in the resources
If I got what you meant, you could put the jars in the directory src/main/resources (which is Maven's standard directory for resources) and then Maven would include it in the root of the final generated jar. Regards, Rafael. On Thu, Apr 7, 2011 at 9:14 AM, Sathyanarayana, Divya divya.sathyanaray...@fmr.com wrote: Hi, I am new to Maven so, please help me out with the solution. I have set up a Java project and the pom creates a jar out of it. It has 5 dependency jars which are in my repository and the project refers to it fine (M2_REPO) These external jars are being placed under src directory but are not packaged with jar. I want to include these external jars in my jar. (Do not want to place each jar in resource manually) How do you tell pom.xml to include dependency jars in resources of the jar? Regards, Divya Arun Fidelity India This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements made in this are not necessarily those of FBS India or any other Fidelity entity. All e-mails sent from or to FBS India may be subject to our monitoring and recording procedures. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Include dependency jars in the resources
Oh, no! He should not! This is what Maven's dependency management should be used for. /Anders On Thu, Apr 7, 2011 at 14:54, Rafael Vanderlei rafaelvander...@gmail.comwrote: If I got what you meant, you could put the jars in the directory src/main/resources (which is Maven's standard directory for resources) and then Maven would include it in the root of the final generated jar. Regards, Rafael. On Thu, Apr 7, 2011 at 9:14 AM, Sathyanarayana, Divya divya.sathyanaray...@fmr.com wrote: Hi, I am new to Maven so, please help me out with the solution. I have set up a Java project and the pom creates a jar out of it. It has 5 dependency jars which are in my repository and the project refers to it fine (M2_REPO) These external jars are being placed under src directory but are not packaged with jar. I want to include these external jars in my jar. (Do not want to place each jar in resource manually) How do you tell pom.xml to include dependency jars in resources of the jar? Regards, Divya Arun Fidelity India This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements made in this are not necessarily those of FBS India or any other Fidelity entity. All e-mails sent from or to FBS India may be subject to our monitoring and recording procedures. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Include dependency jars in the resources
'Course he must use Maven´s dependency management to include dependency jars in classpath, but if for some reason of his he wants to include some jars inside the one jar he is actually building, I think the best option would be to make Maven think it´s a resource. I cant see how maven would include 5 jars inside another just by using it´s default dependency management. On Thu, Apr 7, 2011 at 9:56 AM, Anders Hammar and...@hammar.net wrote: Oh, no! He should not! This is what Maven's dependency management should be used for. /Anders On Thu, Apr 7, 2011 at 14:54, Rafael Vanderlei rafaelvander...@gmail.com wrote: If I got what you meant, you could put the jars in the directory src/main/resources (which is Maven's standard directory for resources) and then Maven would include it in the root of the final generated jar. Regards, Rafael. On Thu, Apr 7, 2011 at 9:14 AM, Sathyanarayana, Divya divya.sathyanaray...@fmr.com wrote: Hi, I am new to Maven so, please help me out with the solution. I have set up a Java project and the pom creates a jar out of it. It has 5 dependency jars which are in my repository and the project refers to it fine (M2_REPO) These external jars are being placed under src directory but are not packaged with jar. I want to include these external jars in my jar. (Do not want to place each jar in resource manually) How do you tell pom.xml to include dependency jars in resources of the jar? Regards, Divya Arun Fidelity India This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements made in this are not necessarily those of FBS India or any other Fidelity entity. All e-mails sent from or to FBS India may be subject to our monitoring and recording procedures. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Include dependency jars in the resources
You can (and i think you should) use the assembly-plugin, if you want to do that. Manuel On Thu, Apr 7, 2011 at 15:08, Rafael Vanderlei rafaelvander...@gmail.com wrote: 'Course he must use Maven´s dependency management to include dependency jars in classpath, but if for some reason of his he wants to include some jars inside the one jar he is actually building, I think the best option would be to make Maven think it´s a resource. I cant see how maven would include 5 jars inside another just by using it´s default dependency management. On Thu, Apr 7, 2011 at 9:56 AM, Anders Hammar and...@hammar.net wrote: Oh, no! He should not! This is what Maven's dependency management should be used for. /Anders On Thu, Apr 7, 2011 at 14:54, Rafael Vanderlei rafaelvander...@gmail.com wrote: If I got what you meant, you could put the jars in the directory src/main/resources (which is Maven's standard directory for resources) and then Maven would include it in the root of the final generated jar. Regards, Rafael. On Thu, Apr 7, 2011 at 9:14 AM, Sathyanarayana, Divya divya.sathyanaray...@fmr.com wrote: Hi, I am new to Maven so, please help me out with the solution. I have set up a Java project and the pom creates a jar out of it. It has 5 dependency jars which are in my repository and the project refers to it fine (M2_REPO) These external jars are being placed under src directory but are not packaged with jar. I want to include these external jars in my jar. (Do not want to place each jar in resource manually) How do you tell pom.xml to include dependency jars in resources of the jar? Regards, Divya Arun Fidelity India This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements made in this are not necessarily those of FBS India or any other Fidelity entity. All e-mails sent from or to FBS India may be subject to our monitoring and recording procedures. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How to generate clients for my project
Hi. I have a multi module project and I need to generate two clients (could be more) for my application. But the clients need to include classes that are in different modules, so I'm kind of not having much idea on how to do this. My project structure is like this - root --- module a (jar) --- module b (jar) --- module c (ejb) --- module d (ejb) --- module e (war) --- module f (war) As I said, the clients I need to generate must include a different subset of classes that are in module a, module b and module d. Also I need to deploy these clients to the company's repository (I'm using Nexus) so the consumers can declare it as a dependency. What do you recommend for this need? Thanks and regards, Rafael.
RE: Include dependency jars in the resources
Yes but I do not want to do that manually. Is there a way to tell pom to include it in src/main/resources? Regards, Divya Arun This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements made in this are not necessarily those of FBS India or any other Fidelity entity. All e-mails sent from or to FBS India may be subject to our monitoring and recording procedures. _ From: Rafael Vanderlei [mailto:rafaelvander...@gmail.com] Sent: Thursday, April 07, 2011 6:25 PM To: Maven Users List Cc: Sathyanarayana, Divya Subject: Re: Include dependency jars in the resources If I got what you meant, you could put the jars in the directory src/main/resources (which is Maven's standard directory for resources) and then Maven would include it in the root of the final generated jar. Regards, Rafael. On Thu, Apr 7, 2011 at 9:14 AM, Sathyanarayana, Divya divya.sathyanaray...@fmr.com wrote: Hi, I am new to Maven so, please help me out with the solution. I have set up a Java project and the pom creates a jar out of it. It has 5 dependency jars which are in my repository and the project refers to it fine (M2_REPO) These external jars are being placed under src directory but are not packaged with jar. I want to include these external jars in my jar. (Do not want to place each jar in resource manually) How do you tell pom.xml to include dependency jars in resources of the jar? Regards, Divya Arun Fidelity India This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements made in this are not necessarily those of FBS India or any other Fidelity entity. All e-mails sent from or to FBS India may be subject to our monitoring and recording procedures. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Installing third party artifact
Thank you, I will try to use some of the tequnices. Gadi -- View this message in context: http://maven.40175.n5.nabble.com/Installing-third-party-artifact-tp4286043p4288551.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to generate clients for my project
This looks like a classic web services configuration. The web services project produces a jar that all the clients need, it gets deployed as an artifact and the clients depend on that artifact. Is that what you are trying to do? Ron On 07/04/2011 9:27 AM, Rafael Vanderlei wrote: Hi. I have a multi module project and I need to generate two clients (could be more) for my application. But the clients need to include classes that are in different modules, so I'm kind of not having much idea on how to do this. My project structure is like this - root --- module a (jar) --- module b (jar) --- module c (ejb) --- module d (ejb) --- module e (war) --- module f (war) As I said, the clients I need to generate must include a different subset of classes that are in module a, module b and module d. Also I need to deploy these clients to the company's repository (I'm using Nexus) so the consumers can declare it as a dependency. What do you recommend for this need? Thanks and regards, Rafael. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to generate clients for my project
Hi, Ron. Thanks for response. How would I configure such a project using Maven? Keeping in mind I already have all the code in the modules I mentioned before and I just need a way to put everything together in a jar and then deploy to Nexus. Regards, Rafael. On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler rwhee...@artifact-software.com wrote: This looks like a classic web services configuration. The web services project produces a jar that all the clients need, it gets deployed as an artifact and the clients depend on that artifact. Is that what you are trying to do? Ron On 07/04/2011 9:27 AM, Rafael Vanderlei wrote: Hi. I have a multi module project and I need to generate two clients (could be more) for my application. But the clients need to include classes that are in different modules, so I'm kind of not having much idea on how to do this. My project structure is like this - root --- module a (jar) --- module b (jar) --- module c (ejb) --- module d (ejb) --- module e (war) --- module f (war) As I said, the clients I need to generate must include a different subset of classes that are in module a, module b and module d. Also I need to deploy these clients to the company's repository (I'm using Nexus) so the consumers can declare it as a dependency. What do you recommend for this need? Thanks and regards, Rafael. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Include dependency jars in the resources
what I think you are asking to do is: 1. add the jars you want to embed (you do know that the jar spec does not support opening jars within jars as if they are jars... you can process them youself, but they cannot be added to the classpath) as dependencies to the pom with some scope that is not transitive (provided is probably best) 2. use the maven dependency plugin's copy-dependencies goal to copy the artifacts (you will need to use the includeScope/includeArtifactIds/includeGroupIds to carefully pull out just the ones you want) and have it output them in ${project.build.directory}/generated-resources/dependency 3. use the buildhelper-maven-plugin @mojo's add-resource goal to add ${project.build.directory}/generated-resources/dependency as a resource directory and presto-chango you will have the jars you selected embedded within your jar. -Stephen P.S. I suspect you will find that you have hit the perils of getting what you asked is not always what you want On 7 April 2011 14:17, Sathyanarayana, Divya divya.sathyanaray...@fmr.com wrote: Yes but I do not want to do that manually. Is there a way to tell pom to include it in src/main/resources? Regards, Divya Arun This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements made in this are not necessarily those of FBS India or any other Fidelity entity. All e-mails sent from or to FBS India may be subject to our monitoring and recording procedures. _ From: Rafael Vanderlei [mailto:rafaelvander...@gmail.com] Sent: Thursday, April 07, 2011 6:25 PM To: Maven Users List Cc: Sathyanarayana, Divya Subject: Re: Include dependency jars in the resources If I got what you meant, you could put the jars in the directory src/main/resources (which is Maven's standard directory for resources) and then Maven would include it in the root of the final generated jar. Regards, Rafael. On Thu, Apr 7, 2011 at 9:14 AM, Sathyanarayana, Divya divya.sathyanaray...@fmr.com wrote: Hi, I am new to Maven so, please help me out with the solution. I have set up a Java project and the pom creates a jar out of it. It has 5 dependency jars which are in my repository and the project refers to it fine (M2_REPO) These external jars are being placed under src directory but are not packaged with jar. I want to include these external jars in my jar. (Do not want to place each jar in resource manually) How do you tell pom.xml to include dependency jars in resources of the jar? Regards, Divya Arun Fidelity India This e-mail, including any attachment(s) hereto, is intended only for the individual or entity to whom it is addressed. It may contain proprietary, confidential or privileged information or attorney work product belonging to Fidelity Business Services India Pvt. Ltd. (FBS India) or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify the sender via return e-mail and permanently delete the original mail, any print outs and any copies, including any attachments. Any dissemination, distribution, alteration or copying of this e-mail is strictly prohibited. The originator of this e-mail does not guarantee the security of this message and will not be responsible for any damages arising from any dissemination, distribution, alteration or copying of this message and/or any attachments to this message by a third party or as a result of any virus being passed on. Any comments or statements
Re: How to generate clients for my project
Is it web services? On 07/04/2011 9:46 AM, Rafael Vanderlei wrote: Hi, Ron. Thanks for response. How would I configure such a project using Maven? Keeping in mind I already have all the code in the modules I mentioned before and I just need a way to put everything together in a jar and then deploy to Nexus. Regards, Rafael. On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler rwhee...@artifact-software.com mailto:rwhee...@artifact-software.com wrote: This looks like a classic web services configuration. The web services project produces a jar that all the clients need, it gets deployed as an artifact and the clients depend on that artifact. Is that what you are trying to do? Ron On 07/04/2011 9:27 AM, Rafael Vanderlei wrote: Hi. I have a multi module project and I need to generate two clients (could be more) for my application. But the clients need to include classes that are in different modules, so I'm kind of not having much idea on how to do this. My project structure is like this - root --- module a (jar) --- module b (jar) --- module c (ejb) --- module d (ejb) --- module e (war) --- module f (war) As I said, the clients I need to generate must include a different subset of classes that are in module a, module b and module d. Also I need to deploy these clients to the company's repository (I'm using Nexus) so the consumers can declare it as a dependency. What do you recommend for this need? Thanks and regards, Rafael. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org mailto:users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org mailto:users-h...@maven.apache.org
Re: How to generate clients for my project
The more details that you provide about what you are trying to build, the more likely it is that you will find someone who has the right answer. It is 99.9% certain, that more than one person has built what you are trying to do. If you ask very specific questions, you will tend to get very accurate answers that are correct responses to your question but wrong for what you ultimately want to achieve. More context = better advice. If you also mention your IDE and the version of Maven that you are using, you might get better results. On 07/04/2011 9:46 AM, Rafael Vanderlei wrote: Hi, Ron. Thanks for response. How would I configure such a project using Maven? Keeping in mind I already have all the code in the modules I mentioned before and I just need a way to put everything together in a jar and then deploy to Nexus. Regards, Rafael. On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler rwhee...@artifact-software.com mailto:rwhee...@artifact-software.com wrote: This looks like a classic web services configuration. The web services project produces a jar that all the clients need, it gets deployed as an artifact and the clients depend on that artifact. Is that what you are trying to do? Ron On 07/04/2011 9:27 AM, Rafael Vanderlei wrote: Hi. I have a multi module project and I need to generate two clients (could be more) for my application. But the clients need to include classes that are in different modules, so I'm kind of not having much idea on how to do this. My project structure is like this - root --- module a (jar) --- module b (jar) --- module c (ejb) --- module d (ejb) --- module e (war) --- module f (war) As I said, the clients I need to generate must include a different subset of classes that are in module a, module b and module d. Also I need to deploy these clients to the company's repository (I'm using Nexus) so the consumers can declare it as a dependency. What do you recommend for this need? Thanks and regards, Rafael. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org mailto:users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org mailto:users-h...@maven.apache.org
Re: How to generate clients for my project
Oh, sorry, they´re not web services... my project provides ejbs to other projects, so they are clients for ejb services. I know maven-ejb-plugin has an opton to generate ejb client but I believe I can´t use it because I also need to include classes that are in other modules than ejb. And still there is the need of deploy it to Nexus, which I strongly believe cannot be solved by maven ejb plugin. I´m still failing on the search On Thu, Apr 7, 2011 at 11:10 AM, Ron Wheeler rwhee...@artifact-software.com wrote: Is it web services? On 07/04/2011 9:46 AM, Rafael Vanderlei wrote: Hi, Ron. Thanks for response. How would I configure such a project using Maven? Keeping in mind I already have all the code in the modules I mentioned before and I just need a way to put everything together in a jar and then deploy to Nexus. Regards, Rafael. On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler rwhee...@artifact-software.com wrote: This looks like a classic web services configuration. The web services project produces a jar that all the clients need, it gets deployed as an artifact and the clients depend on that artifact. Is that what you are trying to do? Ron On 07/04/2011 9:27 AM, Rafael Vanderlei wrote: Hi. I have a multi module project and I need to generate two clients (could be more) for my application. But the clients need to include classes that are in different modules, so I'm kind of not having much idea on how to do this. My project structure is like this - root --- module a (jar) --- module b (jar) --- module c (ejb) --- module d (ejb) --- module e (war) --- module f (war) As I said, the clients I need to generate must include a different subset of classes that are in module a, module b and module d. Also I need to deploy these clients to the company's repository (I'm using Nexus) so the consumers can declare it as a dependency. What do you recommend for this need? Thanks and regards, Rafael. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to generate clients for my project
It looks like you've already set you're mind on the end result, but I'd like to warn you about duplicating classes in several artifacts. Sooner or later this will get you into trouble. I suggest you move these classes to a separate module and declare a dependency to it from your server artifacts. i.e. keep the API separate from the impl logic. If you also have some client specific classes you would create a separate artifact for that, which would then have a dependency to the API artifact. This is just rough guidelines. As Ron says, give us more details and we can give you more specific solutions. /Anders On Thu, Apr 7, 2011 at 15:46, Rafael Vanderlei rafaelvander...@gmail.comwrote: Hi, Ron. Thanks for response. How would I configure such a project using Maven? Keeping in mind I already have all the code in the modules I mentioned before and I just need a way to put everything together in a jar and then deploy to Nexus. Regards, Rafael. On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler rwhee...@artifact-software.com wrote: This looks like a classic web services configuration. The web services project produces a jar that all the clients need, it gets deployed as an artifact and the clients depend on that artifact. Is that what you are trying to do? Ron On 07/04/2011 9:27 AM, Rafael Vanderlei wrote: Hi. I have a multi module project and I need to generate two clients (could be more) for my application. But the clients need to include classes that are in different modules, so I'm kind of not having much idea on how to do this. My project structure is like this - root --- module a (jar) --- module b (jar) --- module c (ejb) --- module d (ejb) --- module e (war) --- module f (war) As I said, the clients I need to generate must include a different subset of classes that are in module a, module b and module d. Also I need to deploy these clients to the company's repository (I'm using Nexus) so the consumers can declare it as a dependency. What do you recommend for this need? Thanks and regards, Rafael. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to generate clients for my project
include in the maven world is to declare a dependency. Don't duplicate classes! /Anders On Thu, Apr 7, 2011 at 16:24, Rafael Vanderlei rafaelvander...@gmail.comwrote: Oh, sorry, they´re not web services... my project provides ejbs to other projects, so they are clients for ejb services. I know maven-ejb-plugin has an opton to generate ejb client but I believe I can´t use it because I also need to include classes that are in other modules than ejb. And still there is the need of deploy it to Nexus, which I strongly believe cannot be solved by maven ejb plugin. I´m still failing on the search On Thu, Apr 7, 2011 at 11:10 AM, Ron Wheeler rwhee...@artifact-software.com wrote: Is it web services? On 07/04/2011 9:46 AM, Rafael Vanderlei wrote: Hi, Ron. Thanks for response. How would I configure such a project using Maven? Keeping in mind I already have all the code in the modules I mentioned before and I just need a way to put everything together in a jar and then deploy to Nexus. Regards, Rafael. On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler rwhee...@artifact-software.com wrote: This looks like a classic web services configuration. The web services project produces a jar that all the clients need, it gets deployed as an artifact and the clients depend on that artifact. Is that what you are trying to do? Ron On 07/04/2011 9:27 AM, Rafael Vanderlei wrote: Hi. I have a multi module project and I need to generate two clients (could be more) for my application. But the clients need to include classes that are in different modules, so I'm kind of not having much idea on how to do this. My project structure is like this - root --- module a (jar) --- module b (jar) --- module c (ejb) --- module d (ejb) --- module e (war) --- module f (war) As I said, the clients I need to generate must include a different subset of classes that are in module a, module b and module d. Also I need to deploy these clients to the company's repository (I'm using Nexus) so the consumers can declare it as a dependency. What do you recommend for this need? Thanks and regards, Rafael. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to generate clients for my project
I know the more information one provide the more accurate the answer he gets, but I thought I was clear when I put the type of the artifact (EJB) between parenthesis aside the modules on my project structure. Sorry for any mess. Regards, Rafael. On Thu, Apr 7, 2011 at 11:24 AM, Rafael Vanderlei rafaelvander...@gmail.com wrote: Oh, sorry, they´re not web services... my project provides ejbs to other projects, so they are clients for ejb services. I know maven-ejb-plugin has an opton to generate ejb client but I believe I can´t use it because I also need to include classes that are in other modules than ejb. And still there is the need of deploy it to Nexus, which I strongly believe cannot be solved by maven ejb plugin. I´m still failing on the search On Thu, Apr 7, 2011 at 11:10 AM, Ron Wheeler rwhee...@artifact-software.com wrote: Is it web services? On 07/04/2011 9:46 AM, Rafael Vanderlei wrote: Hi, Ron. Thanks for response. How would I configure such a project using Maven? Keeping in mind I already have all the code in the modules I mentioned before and I just need a way to put everything together in a jar and then deploy to Nexus. Regards, Rafael. On Thu, Apr 7, 2011 at 10:36 AM, Ron Wheeler rwhee...@artifact-software.com wrote: This looks like a classic web services configuration. The web services project produces a jar that all the clients need, it gets deployed as an artifact and the clients depend on that artifact. Is that what you are trying to do? Ron On 07/04/2011 9:27 AM, Rafael Vanderlei wrote: Hi. I have a multi module project and I need to generate two clients (could be more) for my application. But the clients need to include classes that are in different modules, so I'm kind of not having much idea on how to do this. My project structure is like this - root --- module a (jar) --- module b (jar) --- module c (ejb) --- module d (ejb) --- module e (war) --- module f (war) As I said, the clients I need to generate must include a different subset of classes that are in module a, module b and module d. Also I need to deploy these clients to the company's repository (I'm using Nexus) so the consumers can declare it as a dependency. What do you recommend for this need? Thanks and regards, Rafael. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Inheritance of properties
Hi Jörg, Thanks for the answer. Can you point me to a place where this behaviour is documented? It seems to hold for most, but not all URLs, i.e. scm, project URL and documentation site URL (except for the webAccessUrl of the maven-project-info-reports-plugin which remains untouched!) seem to be affected, repository URLs seem to be not affected. ... and it's not always the current artifactId either - frequently it's the parent-POMs artifactId followed by the current artifactId, but again this does not seem to be the case always. Thanks again, Wolf On Thu, 2011-04-07 at 14:35 +0200, Jörg Schaible wrote: Hi Wolf, Wolf Geldmacher wrote: Hello List. I'm aiming at introducing maven (mvn 3.0.3 to be precise) in our company. In preparation for the task I've set up a company wide POM (c-p-p) and a project specific POM (c-p-p-p) plus a sample project for the developers here to use as a template (sample-project) - all included below. The SCM used is Subversion and the structure of the repositories is historically grown, which requires me to define a scm-loc property which needs to be reset for every project. The problem I'm encountering: After mvn install for the company and project wide parent POMs I run mvn help:effective-pom from within the sample-project with unexpected results: ... groupIdcom.company/groupId artifactIdsample-project/artifactId version2012.0.0-SNAPSHOT/version nameA sample project/name descriptionA very simple example project./description urlhttps://doc.company.com/build/trunk/maven/sample-project/url scm connectionscm:svn:https://svn.company.com/repos/build/trunk/maven/sample- project/c-p-p-p/sample-project/connection developerConnectionscm:svn:https://svn.company.com/repos/build/trunk/maven/sample- project/c-p-p-p/sample-project/developerConnection urlscm:svn:https://svn.company.com/repos/build/trunk/maven/sample- project/c-p-p-p/sample-project/url /scm ... - The project URL that I explicitly (re-)defined in the sample-project's POM is expanded as I would expect. - All URLs in the SCM section of the effective POM have a trailing c-p-p-p/sample-project (as does the project URL if it is inherited and not explicitly set it in the sample-project's POM). I understand that maven does inheritance before interpolation, so as the scm-loc property is set in the sample-project's POM I would expect all expansions of the property to have the value defined in the POM. What am I missing? Where does the additional suffixing come from? The artifactId is automatically appended as suffix when URLs are inherited. Is this a bug? No. Is there a way to achieve my goal without having to make it explicit in every single derived POM? No. As side remarks: The effective POM fpr c-p-p-p looks ok - no unexpected tailing traces of the parent POM there; and mvn 2.2.1 behaves exactly the same way. BTW: The behavior *is* annoying. It's not only that it prevents interpolation, it also silently implies that the artifactId matches the folder structure in the SCM. - Jörg - 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: Inheritance of properties
Hi Anders, On Thu, 2011-04-07 at 14:26 +0200, Anders Hammar wrote: First of all, I think that you're addressing the (what I call) developer way by adding properties for many tings. Even if this would work, it makes the poms difficult to read and understand. What I'm trying to do is to make the *developers' POMs* as easy to read and understand as possible - a single property that defines the location of the scm, documentation, a.s.o. is all that would have to be defined. I don't care as much for the company and project parent POMs as most developers will never touch or even look at them, if things work out ok for them. I believe future tooling support (like m2eclipse) will solve some of this, but I still regard this as the developer's approach. Unfortunately I cannot wait for the tooling support to happen - and yes, I'm approaching this as a developer who wants to have maximal (configuration) re-use. I'm trying to swing with the Convention over Configuration approach, but there are some boundaries here that I just cannot ignore without loosing acceptance for Maven - one of them being that I cannot disrupt development for reorganizing the structure of the SCM: A lot of (somewhat brittle) scaffolding has been built around the SCM structure that I intend to get rid of, but I can only do it bottom-up, one project one library at a time, while the whole rest of the system still behaves and builds as before. For example, I would leave the generic scm section out of the corporate pom. Or more correctly, the corporate pom will have a scm section specifying (without the usa of properties) the path to the scm where the corporate pom is located. Then for each product, the parent pom would override this by declaring the correct scm path for it. ... and the correct site path, and the correct documentation URL, ... leading to larger POMs and configuration information spreading throughout all POMs? There must be a better way! Have a look at how the corporate pom at Apache, Codehaus, etc is made up. Best-practice that works. It will give you some hints of configuration that you corp parent do lack. I did have a look at the ASF POM and I cut out a lot of the stuff that is in my top-level POM for brevity on the list. Cheers, Wolf Cut for brevity. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Checkout and Build all dependencies
We have a compliance/audit requirement that we need to be able to exactly reproduce builds. (Current requirement does not allow the build machine access to our internal nexus repository.) I have had to deal with this sort of requirement in the past in ISO, FDA and code repository context. In my opinion you need to be able to build without anything else apart from the supplied codebase/artifacts. In the Maven world the best way to achieve this is to package up all the source code and your repository server setup (or at least the repository used by your build with all artifacts as well as Maven in the exact version you use. You will have to lock down all plugin and dependency versions and be sure to have them in the repo and then you will be able to do a complete offline build with the repo. If you dont do that you will have some major nightmares in terms of reproducibility of the build and the used artifacts. Do NOT follow down the path of just trying to check everything into svn. If you do that you properly you will end up with the repository server in svn. Might as well allow the repo server to be an artifact... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: ws.zones.apache.org down
I'm part of ws.apache.org and I've never ever heard of this. What were you getting from there? On Thu, Apr 7, 2011 at 6:14 AM, Ben Short b...@benshort.co.uk wrote: Hi, Over the last couple of days my builds have been failing because the repository hosted at ws.zones.apache.org is down. Does anyone know whats going on with this server? Regards Ben - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Inheritance of properties
Hi Wolf, Wolf Geldmacher wrote: Hi Jörg, Thanks for the answer. Can you point me to a place where this behaviour is documented? It seems to hold for most, but not all URLs, i.e. scm, project URL and documentation site URL (except for the webAccessUrl of the maven-project-info-reports-plugin which remains untouched!) seem to be affected, repository URLs seem to be not affected. ... and it's not always the current artifactId either - frequently it's the parent-POMs artifactId followed by the current artifactId, but again this does not seem to be the case always. I don't know where it is actually documented, but it has a looong history http://jira.codehaus.org/browse/MNG-3244 (and linked issues) - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How to verify that my memory settings are being picked up
Hi, I'm using Maven 3.0.3 on Mac 10.6.6. I have a small project and have this set in my ~/.bash_profile MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=2048m When running a mvn -e deploy, my project is dying with OutOfMemoryErrors (PermGen space). This maven output is generated. Does the Final Memory at all tie into what I set in my MAVEN_OPTS? [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 1:39.182s [INFO] Finished at: Thu Apr 07 12:46:36 CDT 2011 [INFO] Final Memory: 89M/123M Thanks, - Dave ps - The complete stack trace is below ... [ERROR] Failed to execute goal org.grails:grails-maven-plugin:1.3.4:maven-war (default) on project socialmediaproxy: Unable to start Grails: java.lang.reflect.InvocationTargetException: PermGen space - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.grails:grails-maven-plugin:1.3.4:maven-war (default) on project socialmediaproxy: Unable to start Grails at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to start Grails at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:285) at org.grails.maven.plugin.MvnWarMojo.execute(MvnWarMojo.java:49) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.codehaus.groovy.grails.cli.support.GrailsBuildHelper.execute(GrailsBuildHelper.java:130) at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:277) ... 22 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.grails.cli.support.GrailsBuildHelper.execute(GrailsBuildHelper.java:124) ... 23 more Caused by: java.lang.OutOfMemoryError: PermGen space [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Application context shutting down... -- View this message in context: http://maven.40175.n5.nabble.com/How-to-verify-that-my-memory-settings-are-being-picked-up-tp4289082p4289082.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to verify that my memory settings are being picked up
org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:285) at org.grails.maven.plugin.MvnWarMojo.execute(MvnWarMojo.java:49) ... org.codehaus.groovy.grails.cli.support.GrailsBuildHelper.execute(GrailsBuildHelper.java:130) at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:277) ... org.codehaus.groovy.grails.cli.support.GrailsBuildHelper.execute(GrailsBuildHelper.java:124) Did you happen to check the code in this GrailsBuildHelper to see if maybe an external process is being kicked off in a forked JVM or something? If not, you probably should, as that would help explain what's going on. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Unable to tag SCM
I have the following config for a project MYPRJ: scm connectionscm:svn:http://svnserver/server/tools/MYPRJ/connection developerConnectionscm:svn:http://svnserver/server/tools/MYPRJ /developerConnection urlscm:svn:http://svnserver/server/tools/MYPRJ/url /scm plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-release-plugin/artifactId version2.1/version configuration tagBasescm:svn:http://svnserver/server/tags/tagBase autoVersionSubmodulestrue/autoVersionSubmodules preparationGoalsclean install/preparationGoals /configuration /plugin distributionManagement snapshotRepository idsnapshots/id nameInternal Snapshots/name urlhttp://servername/content/repositories/snapshots/url /snapshotRepository repository idreleases/id nameInternal Releases/name urlhttp://servername/content/repositories/releases/url /repository /distributionManagement Run mvn release:prepare failed as follows. What is wrong w/ the settings or something is missing in the config? Thanks! ... INFO] [INFO] [INFO] [INFO] BUILD SUCCESSFUL ... [INFO] [INFO] [INFO] Checking in modified POMs... [INFO] Executing: /bin/sh -c cd /home/tester/dev/fromsvn/tools/MYPRJ svn --non-interactive commit --file /var/folders/Og/OgjoLKN0GBOnx7wyii2V2E+++TI/-Tmp-/maven-scm-475892236.commit --targets /var/folders/Og/OgjoLKN0GBOnx7wyii2V2E+++TI/-Tmp-/maven-scm-5301348150995180-targets [INFO] Working directory: /home/tester/dev/fromsvn/tools/MYPRJ [INFO] Tagging release with the label MYPRJ-1.0... [INFO] Executing: /bin/sh -c cd /home/tester/dev/fromsvn/tools/MYPRJ svn --non-interactive copy --file /var/folders/Og/OgjoLKN0GBOnx7wyii2V2E+++TI/-Tmp-/maven-scm-1772669516.commit --revision 485 http://svnserver/server/tools/MYPRJ scm:svn: http://svnserver/server/tags/MYPRJ-1.0 [INFO] Working directory: /home/tester/dev/fromsvn/tools/MYPRJ [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Unable to tag SCM Provider message: The svn tag command failed. Command output: svn: Local, non-commit operations do not take a log message or revision properties -- mJ
Re: Unable to tag SCM
replace tagBasescm:svn:http://svnserver/server/tags/tagBase with tagBasehttp://svnserver/server/tags/tagBase HTH, -- Olivier 2011/4/7 Michael Jiang it.mjji...@gmail.com: I have the following config for a project MYPRJ: scm connectionscm:svn:http://svnserver/server/tools/MYPRJ/connection developerConnectionscm:svn:http://svnserver/server/tools/MYPRJ /developerConnection urlscm:svn:http://svnserver/server/tools/MYPRJ/url /scm plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-release-plugin/artifactId version2.1/version configuration tagBasescm:svn:http://svnserver/server/tags/tagBase autoVersionSubmodulestrue/autoVersionSubmodules preparationGoalsclean install/preparationGoals /configuration /plugin distributionManagement snapshotRepository idsnapshots/id nameInternal Snapshots/name urlhttp://servername/content/repositories/snapshots/url /snapshotRepository repository idreleases/id nameInternal Releases/name urlhttp://servername/content/repositories/releases/url /repository /distributionManagement Run mvn release:prepare failed as follows. What is wrong w/ the settings or something is missing in the config? Thanks! ... INFO] [INFO] [INFO] [INFO] BUILD SUCCESSFUL ... [INFO] [INFO] [INFO] Checking in modified POMs... [INFO] Executing: /bin/sh -c cd /home/tester/dev/fromsvn/tools/MYPRJ svn --non-interactive commit --file /var/folders/Og/OgjoLKN0GBOnx7wyii2V2E+++TI/-Tmp-/maven-scm-475892236.commit --targets /var/folders/Og/OgjoLKN0GBOnx7wyii2V2E+++TI/-Tmp-/maven-scm-5301348150995180-targets [INFO] Working directory: /home/tester/dev/fromsvn/tools/MYPRJ [INFO] Tagging release with the label MYPRJ-1.0... [INFO] Executing: /bin/sh -c cd /home/tester/dev/fromsvn/tools/MYPRJ svn --non-interactive copy --file /var/folders/Og/OgjoLKN0GBOnx7wyii2V2E+++TI/-Tmp-/maven-scm-1772669516.commit --revision 485 http://svnserver/server/tools/MYPRJ scm:svn: http://svnserver/server/tags/MYPRJ-1.0 [INFO] Working directory: /home/tester/dev/fromsvn/tools/MYPRJ [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Unable to tag SCM Provider message: The svn tag command failed. Command output: svn: Local, non-commit operations do not take a log message or revision properties -- mJ -- Olivier Lamy http://twitter.com/olamy http://www.linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Unable to tag SCM
Uh, good catch. Thanks Olivier! On Thu, Apr 7, 2011 at 12:47 PM, Olivier Lamy ol...@apache.org wrote: replace tagBasescm:svn:http://svnserver/server/tags/tagBase with tagBasehttp://svnserver/server/tags/tagBase HTH, -- Olivier 2011/4/7 Michael Jiang it.mjji...@gmail.com: I have the following config for a project MYPRJ: scm connectionscm:svn:http://svnserver/server/tools/MYPRJ/connection developerConnectionscm:svn:http://svnserver/server/tools/MYPRJ /developerConnection urlscm:svn:http://svnserver/server/tools/MYPRJ/url /scm plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-release-plugin/artifactId version2.1/version configuration tagBasescm:svn:http://svnserver/server/tags/tagBase autoVersionSubmodulestrue/autoVersionSubmodules preparationGoalsclean install/preparationGoals /configuration /plugin distributionManagement snapshotRepository idsnapshots/id nameInternal Snapshots/name urlhttp://servername/content/repositories/snapshots/url /snapshotRepository repository idreleases/id nameInternal Releases/name urlhttp://servername/content/repositories/releases/url /repository /distributionManagement Run mvn release:prepare failed as follows. What is wrong w/ the settings or something is missing in the config? Thanks! ... INFO] [INFO] [INFO] [INFO] BUILD SUCCESSFUL ... [INFO] [INFO] [INFO] Checking in modified POMs... [INFO] Executing: /bin/sh -c cd /home/tester/dev/fromsvn/tools/MYPRJ svn --non-interactive commit --file /var/folders/Og/OgjoLKN0GBOnx7wyii2V2E+++TI/-Tmp-/maven-scm-475892236.commit --targets /var/folders/Og/OgjoLKN0GBOnx7wyii2V2E+++TI/-Tmp-/maven-scm-5301348150995180-targets [INFO] Working directory: /home/tester/dev/fromsvn/tools/MYPRJ [INFO] Tagging release with the label MYPRJ-1.0... [INFO] Executing: /bin/sh -c cd /home/tester/dev/fromsvn/tools/MYPRJ svn --non-interactive copy --file /var/folders/Og/OgjoLKN0GBOnx7wyii2V2E+++TI/-Tmp-/maven-scm-1772669516.commit --revision 485 http://svnserver/server/tools/MYPRJ scm:svn: http://svnserver/server/tags/MYPRJ-1.0 [INFO] Working directory: /home/tester/dev/fromsvn/tools/MYPRJ [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Unable to tag SCM Provider message: The svn tag command failed. Command output: svn: Local, non-commit operations do not take a log message or revision properties -- mJ -- Olivier Lamy http://twitter.com/olamy http://www.linkedin.com/in/olamy