Author: rfeng
Date: Fri Feb 13 05:29:32 2009
New Revision: 743992

URL: http://svn.apache.org/viewvc?rev=743992&view=rev
Log:
Add profiles to control if tools.jar should be listed as a system dependency. 
tools.jar doesn't exist on Mac OS.

Modified:
    tuscany/java/sca/itest/distribution/bin-distro-unzip/pom.xml

Modified: tuscany/java/sca/itest/distribution/bin-distro-unzip/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/itest/distribution/bin-distro-unzip/pom.xml?rev=743992&r1=743991&r2=743992&view=diff
==============================================================================
--- tuscany/java/sca/itest/distribution/bin-distro-unzip/pom.xml (original)
+++ tuscany/java/sca/itest/distribution/bin-distro-unzip/pom.xml Fri Feb 13 
05:29:32 2009
@@ -34,47 +34,101 @@
             <artifactId>tuscany-distribution-all</artifactId>
             <type>pom</type>
             <version>2.0-SNAPSHOT</version>
-        </dependency>        
+        </dependency>
     </dependencies>
-    
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <version>1.3</version>
-
-                <dependencies>
-                    <dependency>
-                        <groupId>ant</groupId>
-                        <artifactId>ant-trax</artifactId>
-                        <version>1.6.5</version>
-                    </dependency>
-                    <!-- this JDk dependency is a workaround for Maven bug - 
http://jira.codehaus.org/browse/MNG-1323  -->
-                    <dependency>
-                        <groupId>sun.jdk</groupId>
-                        <artifactId>tools</artifactId>
-                        <version>1.6</version>
-                        <scope>system</scope>
-                        <systemPath>${java.home}/../lib/tools.jar</systemPath>
-                    </dependency>
-                </dependencies>
-
-                <executions>
-                    <execution>
-                        <id>run-samples</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <tasks> 
-                                <ant antfile="./build.xml"/>
-                            </tasks>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
+
+    <!-- HACK: use profile to control if we need to add tools.jar  -->
+    <!-- Mac OS doesn't have tools.jar -->
+    <profiles>
+        <profile>
+            <id>not-sun-jdk</id>
+            <activation>
+                <file>
+                    <missing>${java.home}/../lib/tools.jar</missing>
+                </file>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.3</version>
+
+                        <dependencies>
+                            <dependency>
+                                <groupId>ant</groupId>
+                                <artifactId>ant-trax</artifactId>
+                                <version>1.6.5</version>
+                            </dependency>
+                        </dependencies>
+
+                        <executions>
+                            <execution>
+                                <id>run-samples</id>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <ant antfile="./build.xml" />
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>sun-jdk</id>
+            <activation>
+                <file>
+                    <exists>${java.home}/../lib/tools.jar</exists>
+                </file>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.3</version>
+
+                        <dependencies>
+                            <dependency>
+                                <groupId>ant</groupId>
+                                <artifactId>ant-trax</artifactId>
+                                <version>1.6.5</version>
+                            </dependency>
+                            <!-- this JDk dependency is a workaround for Maven 
bug - http://jira.codehaus.org/browse/MNG-1323  -->
+                            <dependency>
+                                <groupId>sun.jdk</groupId>
+                                <artifactId>tools</artifactId>
+                                <version>1.6</version>
+                                <scope>system</scope>
+                                
<systemPath>${java.home}/../lib/tools.jar</systemPath>
+                            </dependency>
+                        </dependencies>
+
+                        <executions>
+                            <execution>
+                                <id>run-samples</id>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <ant antfile="./build.xml" />
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>


Reply via email to