just to note :)

"inContainterITest" != "inContainerITest"

the property name in the command line does not match the property in
the pom.xml, that's why the profile is not activated ;)

Have a nice day!


Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   [email protected]



On Thu, Mar 3, 2011 at 10:06 AM, Baptiste MATHUS <[email protected]> wrote:
> Well, you could also touch a file or mkdir a directory before and use it as
> an activation property.
> Or even commit something somewhere that would trigger the profile
> activation.
> Or install a VM that would have the right OS that would activate the
> profile.
>
> Or just use the option designed to activate profiles, -P.
>
> ;-).
>
> Sorry, couldn't resist, and we're not wednesday.
>
> Cheers
> PS: just kidding, no offense ;).
>
> 2011/3/3 Thomas Sundberg <[email protected]>
>
>> Hi!
>>
>> You could give your activation property a value and use
>>
>> -DinContainerITest=myValue
>>
>> <activation>
>>   <property>
>>     <name>inContainerITest</name>
>>     <value>myValue</value>
>>   </property>
>> </activation>
>>
>> /Thomas
>>
>>
>> On Thu, Mar 3, 2011 at 17:17, Baptiste MATHUS <[email protected]> wrote:
>>
>>> 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
>>>
>>
>>
>>
>> --
>> Thomas Sundberg
>> M. Sc. in Computer Science
>>
>> Mobile: +46 70 767 33 15
>> Blog: http://thomassundberg.wordpress.com/
>> Twitter: @thomassundberg
>>
>> Better software through faster feedback
>>
>
>
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to