Author: dgolovin
Date: 2012-04-27 17:18:39 -0400 (Fri, 27 Apr 2012)
New Revision: 40586
Modified:
trunk/build/parent/pom.xml
Log:
fixed profile activation issues for plug-ins with requirements. Now it included in plugins
section and just check for requirements.properties to build. Not very efficient but:
- it adds a little for every build because it exits right away if there is no
requirements.properties file
- it is good when build works by default without needed to remember adding -Pdefault into
maven command
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2012-04-27 21:05:05 UTC (rev 40585)
+++ trunk/build/parent/pom.xml 2012-04-27 21:18:39 UTC (rev 40586)
@@ -71,17 +71,15 @@
<!-- Default coverage filter, to be overriden when necessary -->
<coverage.filter>org.jboss.tools.*</coverage.filter>
+ <requirements.root>${basedir}/../../../requirements</requirements.root>
+ <requirement.build.root>${requirements.root}/target</requirement.build.root>
+
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>${maven.antrun.plugin.version}</version>
- </plugin>
-
- <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tychoVersion}</version>
@@ -271,6 +269,66 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <dependencies>
+ <dependency>
+ <groupId>ant-contrib</groupId>
+ <artifactId>ant-contrib</artifactId>
+ <version>1.0b3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-optional</artifactId>
+ <version>1.5.3-1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>${maven.antrun.plugin.version}</version>
+ <executions>
+ <execution>
+ <id>download-plugin-requirements</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
+ <if>
+ <and>
+ <available file="${requirements.root}" type="dir" />
+ <available file="requirements.properties" type="file"
/>
+ </and>
+ <then>
+ <property file="requirements.properties" />
+ <echo>Requirements build</echo>
+ <ant dir="${requirements.root}" inheritAll="true">
+ <property name="requirements" value="${requirements}"
/>
+ <property name="settings.offline"
value="${settings.offline}" />
+ <property name="skipDownload" value="${skipDownload}"
/>
+ </ant>
+ </then>
+ <else>
+ <echo>No requrements.properties file</echo>
+ </else>
+ </if>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
<pluginManagement>
@@ -787,76 +845,6 @@
</build>
</profile>
<profile>
- <id>requirements</id>
- <activation>
- <file>
- <exists>${basedir}/requirements.properties</exists>
- </file>
- </activation>
- <properties>
- <requirements.root>${basedir}/../../../requirements</requirements.root>
- <requirement.build.root>${requirements.root}/target</requirement.build.root>
- </properties>
- <build>
- <plugins>
- <plugin>
- <dependencies>
- <dependency>
- <groupId>ant-contrib</groupId>
- <artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
- <exclusions>
- <exclusion>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant-optional</artifactId>
- <version>1.5.3-1</version>
- <exclusions>
- <exclusion>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>${maven.antrun.plugin.version}</version>
- <executions>
- <execution>
- <id>download-plugin-requirements</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
- <if>
- <available file="${requirements.root}" type="dir"
/>
- <then>
- <property file="requirements.properties" />
- <echo>Requirements build</echo>
- <ant dir="${requirements.root}" inheritAll="true">
- <property name="requirements" value="${requirements}"
/>
- <property name="settings.offline"
value="${settings.offline}" />
- <property name="skipDownload" value="${skipDownload}"
/>
- </ant>
- </then>
- </if>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
Show replies by date