[jbosstools-dev] Creation of pom.xml property for skipTestOrITest for parent pom.xml

Nick Boldt nboldt at redhat.com
Thu Apr 16 09:33:07 EDT 2015


It's simply the code snippet below, but then you use 
<skip>${skipTestOrITest}</skip> in your poms, instead of 
<skip>${skipITest}</skip>.

Simple, no?

Related: gentlemen, start your "I don't like the variable name / case of 
the variable" engines. :D


On 04/16/2015 01:35 AM, Max Rydahl Andersen wrote:
> Got a PR to look at ?
>
> /max
> http://about.me/maxandersen
>
>
>> On 16 Apr 2015, at 02:45, Rob Stryker <rstryker at redhat.com> wrote:
>>
>> My jboss/wf runtimes are being downloaded via my integration tests, even
>> when -DskipTests is selected, because my integration test pom.xml has
>> <skip>${skipITests}</skip> in it.  Until now, there was no easily
>> recognized way to make a new property that could 'or' skipTests with
>> skipITests.
>>
>> So I've added this to my pom in one of my topic branches, and it seems
>> to work exactly how we'd want it to. It basically functions via a regex,
>> puts ${skipTests}${skipITests}, and performs a regex replacement to make
>> the value either "true" or blank. This property can later be used in my
>> <skip> section.
>>
>> If anyone thinks this property should be available for parent pom, I'd
>> suggest you take it and make it available to all other modules who might
>> have integration tests with heavy dependencies.
>>
>> Otherwise, I'll just keep it in my local pom for my itests.
>>
>>              <plugin>
>>                  <groupId>org.codehaus.mojo</groupId>
>> <artifactId>build-helper-maven-plugin</artifactId>
>>                  <version>1.7</version>
>>                  <executions>
>>                      <execution>
>>                          <id>regex-property</id>
>>                          <goals>
>>                              <goal>regex-property</goal>
>>                          </goals>
>>                          <configuration>
>>                              <name>skipTestOrITest</name>
>> <value>${skipTests}${skipITests}</value>
>> <regex>((..skipTests.)?(true)?((..skipITests.)|(null)|(true)|(false))?)</regex>
>> <replacement>$3</replacement>
>> <failIfNoMatch>false</failIfNoMatch>
>>                          </configuration>
>>                      </execution>
>>                      </executions>
>>                    </plugin>
>>
>> _______________________________________________
>> jbosstools-dev mailing list
>> jbosstools-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jbosstools-dev
>
> _______________________________________________
> jbosstools-dev mailing list
> jbosstools-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbosstools-dev
>

-- 
Nick Boldt :: JBoss by Red Hat
Productization Lead :: JBoss Tools & Dev Studio
http://nick.divbyzero.com


More information about the jbosstools-dev mailing list