[rhq] modules/enterprise pom.xml

lkrejci lkrejci at fedoraproject.org
Tue Aug 21 08:58:57 UTC 2012


 modules/enterprise/remoting/cli/pom.xml                               |   27 ++++++++++
 modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml |    9 +++
 modules/enterprise/scripting/javascript/pom.xml                       |    2 
 modules/enterprise/scripting/pom.xml                                  |    5 +
 modules/enterprise/scripting/python/pom.xml                           |    2 
 modules/enterprise/server/ear/pom.xml                                 |   20 +++++++
 pom.xml                                                               |   19 +++++++
 7 files changed, 82 insertions(+), 2 deletions(-)

New commits:
commit 2f1ce1944b3307fa790225f91889fc642abfcc0e
Author: Lukas Krejci <lkrejci at redhat.com>
Date:   Tue Aug 21 10:57:28 2012 +0200

    [BZ 840662] - Python scripting is now bundled by default with RHQ.
    It can be excluded by explicitely switching off the "bundle-additional-script-languages" profile.
    E.g. mvn clean install -P '!bundle-additional-script-languages'

diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index 3924ff0..e0e4243 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -34,6 +34,13 @@
       </dependency>
       
       <dependency>
+         <groupId>${project.groupId}</groupId>
+         <artifactId>rhq-scripting-javascript</artifactId>
+         <version>${project.version}</version>
+         <scope>runtime</scope>
+      </dependency>
+            
+      <dependency>
           <groupId>${project.groupId}</groupId>
           <artifactId>rhq-core-domain</artifactId>
           <version>${project.version}</version>
@@ -131,6 +138,7 @@
                            <property name="persistence-api.version" value="${persistence-api.version}" />
                            <property name="rhq.client.build.exclude.cli.jar" value="${rhq.client.build.exclude.cli.jar}" />
                            <property name="rhq.client.build.include.client.jar" value="${rhq.client.build.include.client.jar}" />
+                           <property name="rhq.bundle-additional-script-languages" value="${rhq.bundle-additional-script-languages}"/>
                         </ant>
                      </target>
                   </configuration>
@@ -220,6 +228,25 @@
 
    <profiles>
 
+      <!-- NOTE: this profile HAS TO have the same activation policy as the profile with the same name in the root pom.xml of RHQ -->
+      <profile>
+         <id>bundle-additional-script-languages</id>
+         <activation>
+            <property>
+               <name>java.home</name>
+            </property>
+         </activation>
+
+         <dependencies>
+            <dependency>
+               <groupId>${project.groupId}</groupId>
+               <artifactId>rhq-scripting-python</artifactId>
+               <version>${project.version}</version>
+               <scope>runtime</scope>
+            </dependency>
+         </dependencies>
+      </profile>
+
       <!-- Unlike most of RHQ, this module requires JDK6, so replace the Java 5 bootclasspath that was added to the compiler args by the root POM with a bootclasspath based on the java.home sysprop (which should be Java 6 or later if the enforcer plugin did its job). -->
       <profile>
          <id>check-java-api</id>
diff --git a/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml b/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
index 808bd82..715bd9b 100644
--- a/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
+++ b/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
@@ -70,6 +70,15 @@
 
       <copy file="${settings.localRepository}/org/rhq/rhq-scripting-api/${project.version}/rhq-scripting-api-${project.version}.jar" tofile="${lib.home}/rhq-scripting-api-${project.version}.jar" verbose="true" />
       <copy file="${settings.localRepository}/org/rhq/rhq-scripting-javascript/${project.version}/rhq-scripting-javascript-${project.version}.jar" tofile="${lib.home}/rhq-scripting-javascript-${project.version}.jar" verbose="true" />
+   	
+      <echo>*** Including additional script languages: ${rhq.bundle-additional-script-languages}</echo>
+      <!-- Copy all the additional script language support jars if we are told to do so -->
+      <copy todir="${lib.home}" verbose="true">
+         <fileset dir="${settings.localRepository}/org/rhq">
+            <include if="${rhq.bundle-additional-script-languages}" name="**/rhq-scripting-python-${project.version}.jar"/>
+         </fileset>
+         <mapper type="flatten" />
+      </copy>
    </target>
 
    <target name="prepare-samples-dir">
diff --git a/modules/enterprise/scripting/javascript/pom.xml b/modules/enterprise/scripting/javascript/pom.xml
index 38ead44..adbe85a 100644
--- a/modules/enterprise/scripting/javascript/pom.xml
+++ b/modules/enterprise/scripting/javascript/pom.xml
@@ -22,6 +22,8 @@
          <groupId>org.mozilla</groupId>
          <artifactId>rhino</artifactId>
          <version>1.7R4</version>
+         <!-- we actually repackage Rhino inside our jar -->
+         <scope>provided</scope> 
       </dependency>
    </dependencies>
 
diff --git a/modules/enterprise/scripting/pom.xml b/modules/enterprise/scripting/pom.xml
index c786cdc..f439f11 100644
--- a/modules/enterprise/scripting/pom.xml
+++ b/modules/enterprise/scripting/pom.xml
@@ -17,11 +17,12 @@
    </modules>
    
    <profiles>
+      <!-- NOTE: this profile HAS TO have the same activation policy as the profile with the same name in the root pom.xml of RHQ -->
       <profile>
-         <id>experimental</id>
+         <id>bundle-additional-script-languages</id>
          <activation>
             <property>
-               <name>experimental-script-languages</name>
+               <name>java.home</name>
             </property>
          </activation>
          
diff --git a/modules/enterprise/scripting/python/pom.xml b/modules/enterprise/scripting/python/pom.xml
index 39d3895..4b34699 100644
--- a/modules/enterprise/scripting/python/pom.xml
+++ b/modules/enterprise/scripting/python/pom.xml
@@ -21,6 +21,8 @@
           <groupId>org.python</groupId>
           <artifactId>jython-standalone</artifactId>
           <version>2.5.2</version>
+         <!-- we actually repackage jython inside our jar -->
+         <scope>provided</scope>           
        </dependency>       
     </dependencies>
     
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index 10b613e..0bed079 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -447,6 +447,26 @@
 
    <profiles>
 
+        <!-- NOTE: this profile HAS TO have the same activation policy as the profile with the same name in the root pom.xml of RHQ -->
+        <profile>
+           <id>bundle-additional-script-languages</id>
+           <activation>
+              <property>
+                 <!-- we want this always active but activeByDefault doesn't work -->
+                 <!-- see http://maven.apache.org/guides/introduction/introduction-to-profiles.html -->
+                 <name>java.home</name> 
+              </property>
+           </activation>
+           
+           <dependencies>
+              <dependency>
+                 <groupId>org.rhq</groupId>
+                 <artifactId>rhq-scripting-python</artifactId>
+                 <version>${project.version}</version>
+              </dependency>                     
+           </dependencies>
+        </profile>
+        
         <profile>
             <id>bundle-plugins</id>
             <activation>
diff --git a/pom.xml b/pom.xml
index 36b9c62..f6bd80d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1171,6 +1171,25 @@
 
   <profiles>
 
+    <!-- NOTE: This profile is extended upon in several other submodules.
+         If you need to change its activation policy, make sure to do that in
+         *ALL* the modules that define this profile. -->
+    <profile>
+        <id>bundle-additional-script-languages</id>
+        <activation>
+           <property>
+              <!-- we want this always active but activeByDefault doesn't work -->
+              <!-- see http://maven.apache.org/guides/introduction/introduction-to-profiles.html -->
+              <name>java.home</name> 
+           </property>
+        </activation>
+        
+        <!-- Can be used to pass a flag down to deployment composing ANT scripts and somesuch -->
+        <properties>
+           <rhq.bundle-additional-script-languages>true</rhq.bundle-additional-script-languages>
+        </properties>            
+    </profile>
+    
     <profile>
         <id>ojdbc-driver</id>
         <activation>




More information about the rhq-commits mailing list