Hi, Use -P. Not -D.
Cheers Le 2 mars 2011 18:40, "John Lussmyer" <[email protected]> a écrit : > I've inherited a huge complex Maven build process that needs some updates. > One thing we have is some custom test code in one place that is invoked via "mvn clean install -DinContainterITest" > Now I'd like to invoke that (and several others in other pom's) from a pom that is in a different branch of the same pom tree. > > The pom with the test code has: > > <profiles> > <profile> > <id>inContainerITest</id> > <activation> > <property> > <name>inContainerITest</name> > </property> > </activation> > <build> > <testResources> > <testResource> > <directory>src/test/resources</directory> > <filtering>true</filtering> > </testResource> > </testResources> > <plugins> > <plugin> > <artifactId>maven-surefire-plugin</artifactId> > <executions> > <execution> > <id>surefire-RestTest</id> > <phase>integration-test</phase> > <goals> > <goal>test</goal> > </goals> > <configuration> > <excludes> > <exclude>none</exclude> > </excludes> > <includes> > <include>**/*Test.java</include> > </includes> > </configuration> > </execution> > </executions> > </plugin> > </plugins> > </build> > </profile> > </profiles> > > I have a dependency on this one in my other pom like this: > > <dependencies> > <dependency> > <groupId>com.xxx.yyyy.zzzz</groupId> > <artifactId>stupidlylongartifactname</artifactId> > <version>${project.version}</version> > <scope>test</scope> > </dependency> > </dependencies> > > But I don't know how to set it up so that using the "-DinContainerITest" on the pom will actually invoke the tests. > > Suggestions? > > This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, > you may review at http://www.amdocs.com/email_disclaimer.asp
