Re: integration-test, testNG, and a CI server
Hi, Currently offline so I can't give you precise links now, but search Google for maven lifecycle. What you encounter is normal and it's basically not possible to change it easily (I mean having the pre-integration-test not running before integration-test phase). Goals are things you can bind to phases. And some goals are actually bound by default to some phases of the different standard lifecycle. So I guess what you could do is running explicitly the goals you're interested in. But then you should be aware that explicitly running goals in the Maven world is actually not the typical case. Maven is about build standardization. People who want to build your project should not have to know the different necessary goals you need. If what you want is having a way to disable some parts of the build by default (or the contrary), then look at Maven profiles. Cheers Le 17 oct. 2012 15:40, mlandman99 mlandma...@gmail.com a écrit : Hi, I have a maven project (Project 1) which is intended for executing integration tests. Inside this project is an additional class that helps me automate the deployment of various jars to a nexus repo. Project 1 is dependent on those jars (SNAPSHOT). Project 2 is dependent on those jars (SNAPSHOT). Project 1 is also dependent on project 2. (SNAPSHOT). STEP 1: My CI server (TeamCity) runs a daily build config called Deploy Jars @ 4:00 AM on Project 1, with Maven phase: pre-integration-test. pre-integration-test runs a testNG suite that has the class for deploying those jars to the repo. Works fine. Only that class runs. STEP 2: Next, my CI server has a build trigger for project 2 (to compile and deploy) to occur anytime Deploy Jars is successfully built. This works -- project 2 is built (and project 2 updated its SNAPSHOT dependencies on those Jars that were sent to the repo in step 1). Project 2 is compiled and it's .jar deployed to the repo as well. STEP 3: Back to Project 1. Now that all the .jars have been uploaded to the repo (various jars, including the .jar for project 2, as described in step 2), A Maven build is run with phase integration-test. THE PROBLEM: Unfortunately when I do STEP 3, Maven ends up also RE-RUNNING pre-integration test prior to integration-test, which basically reruns the actions that already occurred in STEP 1. (i.e. all those jars are sent to the repo again). That probably makes sense, in that Maven is probably hardwired to run pre-integration-test any time I ask it to run integration-test. I'd like to find a way out of this -- any suggestions? Is there another maven phase I can take advantage of here, to accomplish my objective? Basically, I don't want step 3 (integration-test) to re-copy those jars to the repo, it's a waste of time, etc. Thanks in advance! Bonus question -- am I getting 'phase' and 'goal' mixed up? My POM file says that pre-integration-test and integration-test are phases. They both have a goal of test. But in my CI server, I have pre-integration-test and integration-test listed as GOALS the maven build configuration on the CI server, and that seems to be working (for the most part). In other words the build configuration for STEP 1 only lists pre-integration-test for a goal, and that works, but the POM file only lists pre-integration-test as a phase... -- View this message in context: http://maven.40175.n5.nabble.com/integration-test-testNG-and-a-CI-server-tp5726939.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
AW: integration-test, testNG, and a CI server
Hi, I guess what you want to do, is to have the daily build job build and deploy the latest jars without running the integration tests, am I correct? You then want to be able to run the integration tests without deploying first, am I correct? Well in that case I would suggest to tell the surefire plugin that is probably executing your integration tests to skipTests and have the jars deployed in the normal deploy phase of maven (Not using custom deploy code hidden in a Testcase). Then if you want to run the integration tests but don't want to deploy, you simply execute the mvn package without diabling the tests. So maven would execute the entire build (including integration tests) but stop at the package phase and not install or deploy anything. Chris Von: Baptiste Mathus [bmat...@gmail.com] Gesendet: Donnerstag, 18. Oktober 2012 08:50 An: Maven Users List Betreff: Re: integration-test, testNG, and a CI server Hi, Currently offline so I can't give you precise links now, but search Google for maven lifecycle. What you encounter is normal and it's basically not possible to change it easily (I mean having the pre-integration-test not running before integration-test phase). Goals are things you can bind to phases. And some goals are actually bound by default to some phases of the different standard lifecycle. So I guess what you could do is running explicitly the goals you're interested in. But then you should be aware that explicitly running goals in the Maven world is actually not the typical case. Maven is about build standardization. People who want to build your project should not have to know the different necessary goals you need. If what you want is having a way to disable some parts of the build by default (or the contrary), then look at Maven profiles. Cheers Le 17 oct. 2012 15:40, mlandman99 mlandma...@gmail.com a écrit : Hi, I have a maven project (Project 1) which is intended for executing integration tests. Inside this project is an additional class that helps me automate the deployment of various jars to a nexus repo. Project 1 is dependent on those jars (SNAPSHOT). Project 2 is dependent on those jars (SNAPSHOT). Project 1 is also dependent on project 2. (SNAPSHOT). STEP 1: My CI server (TeamCity) runs a daily build config called Deploy Jars @ 4:00 AM on Project 1, with Maven phase: pre-integration-test. pre-integration-test runs a testNG suite that has the class for deploying those jars to the repo. Works fine. Only that class runs. STEP 2: Next, my CI server has a build trigger for project 2 (to compile and deploy) to occur anytime Deploy Jars is successfully built. This works -- project 2 is built (and project 2 updated its SNAPSHOT dependencies on those Jars that were sent to the repo in step 1). Project 2 is compiled and it's .jar deployed to the repo as well. STEP 3: Back to Project 1. Now that all the .jars have been uploaded to the repo (various jars, including the .jar for project 2, as described in step 2), A Maven build is run with phase integration-test. THE PROBLEM: Unfortunately when I do STEP 3, Maven ends up also RE-RUNNING pre-integration test prior to integration-test, which basically reruns the actions that already occurred in STEP 1. (i.e. all those jars are sent to the repo again). That probably makes sense, in that Maven is probably hardwired to run pre-integration-test any time I ask it to run integration-test. I'd like to find a way out of this -- any suggestions? Is there another maven phase I can take advantage of here, to accomplish my objective? Basically, I don't want step 3 (integration-test) to re-copy those jars to the repo, it's a waste of time, etc. Thanks in advance! Bonus question -- am I getting 'phase' and 'goal' mixed up? My POM file says that pre-integration-test and integration-test are phases. They both have a goal of test. But in my CI server, I have pre-integration-test and integration-test listed as GOALS the maven build configuration on the CI server, and that seems to be working (for the most part). In other words the build configuration for STEP 1 only lists pre-integration-test for a goal, and that works, but the POM file only lists pre-integration-test as a phase... -- View this message in context: http://maven.40175.n5.nabble.com/integration-test-testNG-and-a-CI-server-tp5726939.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
Dependent jars not packaged in a servicemix service engine
Hi, I have created a servicemix Service Engine with maven and my pom has dependency(client-stubs-runtime) to a jar which I need during runtime. Here's my project pom /project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion parent artifactIdDA-test/artifactId groupIdtest.DA.implementation/groupId versionDYNAMIC-SNAPSHOT/version /parent groupIdtest.DA.implementation.DAServiceEngine/groupId artifactIdda-se/artifactId packagingjbi-component/packaging version1.0/version nameService Engine for DA/name properties xbean-version3.4.3/xbean-version servicemix-version3.2.3/servicemix-version /properties dependencies dependency groupIdcom.test.interface/groupId artifactIdclient-stubs-runtime/artifactId version2.0.8.312/version classifierclient/classifier /dependency /dependencies build resources resource directorysrc/main/resources/directory /resource /resources plugins plugin groupIdorg.apache.servicemix.tooling/groupId artifactIdjbi-maven-plugin/artifactId extensionstrue/extensions version4.5/version /plugin plugin groupIdorg.apache.xbean/groupId artifactIdmaven-xbean-plugin/artifactId version${xbean-version}/version executions execution configuration namespace http://com.test.DA/1.0 /namespace /configuration goals goalmapping/goal /goals /execution /executions /plugin /plugins /build /project / Here is the pom file of my dependency: /?xml version=1.0 encoding=UTF-8? 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 parent groupIdcom.test.interface/groupId artifactIdopen_modules/artifactId version2.0.8.312/version /parent artifactIdclient-stubs-runtime/artifactId packagingejb/packaging nameDummy stubs/name build plugins plugin artifactIdmaven-ejb-plugin/artifactId configuration ejbVersion3.0/ejbVersion generateClienttrue/generateClient /configuration /plugin plugin artifactIdmaven-compiler-plugin/artifactId configuration verbosetrue/verbose compilerVersion1.5/compilerVersion source1.5/source target1.5/target /configuration /plugin /plugins /build dependencies dependency groupIdorg.apache.openejb/groupId artifactIdjavaee-api/artifactId version5.0-2/version scopeprovided/scope /dependency dependency groupIdcom.test.interface/groupId artifactIdclient-dummy/artifactId version${project.version}/version /dependency /dependencies profiles profile idejbdeploy/id build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution idcreate
how get parameter from another module?
Hello, I am going thru all modules in my reactor and do some work. But i need to know, if one of the project has some property or not. eg: moduleonemodule moduletwomodule modulethremodule in module two i call my own plugin which has this part of code: for (MavenProject p : reactorProjects) { //need to know how do this: if(p.getPropertiesFromPomXML().getWantedParameter() == true){ do some job } } - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven Central broken? (was: Broken link for avalon)
Thanks for the description. This is probably our EdgeCast setup and we've seen a couple glitches with artifacts that are not requested that often not being propagated out the edges. I've raised an issue and we're looking into it. On Oct 18, 2012, at 1:58 AM, Martin Hoeller mar...@xss.co.at wrote: On 17 Okt 2012, Lyons, Roy wrote: Yet another reason to use a caching repository manager... You never know when a repository out of your control can be on the fritz... We are using nexus, but the artifacts in question are just not yet in the cache. - martin Thanks, Jason -- Jason van Zyl Founder CTO, Sonatype Founder, Apache Maven http://twitter.com/jvanzyl -
Re: Maven trying to download '-sources.src' artifacts?
Turns out it was a problem with one of the indirect dependencies of my project. See http://stackoverflow.com/questions/12938815/maven-trying-to-download-sources-src-artifacts for the details. -- View this message in context: http://maven.40175.n5.nabble.com/Maven-trying-to-download-sources-src-artifacts-tp5726964p5727004.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