You are viewing a plain text version of this content. The canonical link for it is here.
Posted to imperius-commits@incubator.apache.org by jn...@apache.org on 2008/02/14 21:05:13 UTC

svn commit: r627870 - in /incubator/imperius/trunk: build.xml pom.xml

Author: jneeraj
Date: Thu Feb 14 13:05:12 2008
New Revision: 627870

URL: http://svn.apache.org/viewvc?rev=627870&view=rev
Log:
1. Added a new target for cimpsl called cimspl.runtime, changed the all target to javaspl.runtime.editor
and made javaspl.runtime the default target
2. In pom.xml added a new profile for cimspl

Modified:
    incubator/imperius/trunk/build.xml
    incubator/imperius/trunk/pom.xml

Modified: incubator/imperius/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/build.xml?rev=627870&r1=627869&r2=627870&view=diff
==============================================================================
--- incubator/imperius/trunk/build.xml (original)
+++ incubator/imperius/trunk/build.xml Thu Feb 14 13:05:12 2008
@@ -41,6 +41,9 @@
 	<property name="IMPERIUS_SPLCORE_DIR" value="${IMPERIUS_SVN_MODULES}/imperius-splcore"/>
 	<property name="IMPERIUS_JAVASPL_DIR" value="${IMPERIUS_SVN_MODULES}/imperius-javaspl"/>
 	<property name="JAVASPL_SAMPLES_DIR" value="${IMPERIUS_SVN_MODULES}/javaspl-samples"/>
+	<property name="IMPERIUS_CIMSPLCOMMON_DIR" value="${IMPERIUS_SVN_MODULES}/imperius-cimsplcommon"/>
+	<property name="IMPERIUS_CIMSPLCLIENTSIDE_DIR" value="${IMPERIUS_SVN_MODULES}/imperius-cimsplclientsideprovider"/>
+	
 		
 	<property name="IMPERIUS_LOGGING_FILE" value="log.txt"/>
 	<property name="JavaSPL" value="Java_SPL"/>
@@ -81,7 +84,7 @@
 	
 	
 	<!-- set the property to indicate that JAVA_HOME is set -->
-	<target name="cond_check_java">
+	<target name="cond.check.java">
 		<property environment="env"/>
 		<condition property="JAVA_HOME_SET">
             <isset property="env.JAVA_HOME"/>
@@ -89,13 +92,13 @@
 	</target>
 	<!-- fail if JAVA_HOME isn't set, 
 	 	otherwise we don't execute the body -->
-	<target name="check_environment_all" unless="JAVA_HOME_SET" depends="cond_check_java">
+	<target name="check.environment.all" unless="JAVA_HOME_SET" depends="cond.check.java">
 		<fail message="The environment variable JAVA_HOME is not set. Set this variable to the directory where the JDK is installed."/>
 	</target>
 
 
 	<!-- check out all of the sources we need -->
-	<target name="checkout" depends="check_environment_all">
+	<target name="checkout" depends="check.environment.all">
 		<!-- start logging things to a log file -->
 		<property name="LOG_FILE" value="${basedir}/log.txt"/>
 		<delete file="${LOG_FILE}"/>
@@ -123,6 +126,16 @@
 		<exec executable="svn" searchpath="true" dir="." failonerror="true">
 		    <arg line="co http://svn.apache.org/repos/asf/incubator/imperius/trunk/imperius-javasplextension "/>
 		</exec> 
+		<exec executable="svn" searchpath="true" dir="." failonerror="true">
+		    <arg line="co http://svn.apache.org/repos/asf/incubator/imperius/trunk/imperius-cimsplcommon"/>
+		</exec> 
+		<exec executable="svn" searchpath="true" dir="." failonerror="true">
+			<arg line="co http://svn.apache.org/repos/asf/incubator/imperius/trunk/imperius-cimsplcommon"/>
+		</exec>
+		<exec executable="svn" searchpath="true" dir="." failonerror="true">
+		    <arg line="co http://svn.apache.org/repos/asf/incubator/imperius/trunk/imperius-cimsplclientsideprovider"/>
+		</exec> 
+		
 		
      <!--   <exec executable="svn" searchpath="true" dir="." failonerror="true">
             <arg line="co ${IMPERIUS_SVN_SITE_REPOSITORY} ${IMPERIUS_SVN_SITE} -non-interactive"/>
@@ -142,13 +155,13 @@
 		<!-- get the license -->
 		<get src="${APACHE_LICENSE_URL}" dest="${APACHE_LICENSE_FILE}"/>
 		<get src="${APACHE_NOTICE_URL}" dest="${APACHE_NOTICE_FILE}"/>
-		<get src="${POM_XML_URL}" dest="${POM_XML_FILE}"/>
+		<get src="${POM_XML_URL}" dest="${POM_XML_FILE}"/> 
 	 
 	</target>
 
 	<!-- Add a build tag to the version in the main pom.xml. If there was no build
          tag specified then skip this step (but still do the dependencies) -->
-	<target name="update_version" depends="checkout" if="BUILD_TAG">
+	<target name="update.version" depends="checkout" if="BUILD_TAG">
 		<replaceregexp
              match="([0-9]+.[0-9]+.[0-9]+)-[^&lt;]*"
              replace="\1-${BUILD_TAG}"
@@ -160,32 +173,31 @@
 	</target>
 
 	<!-- initialize properties -->
-	<target name="init" depends="update_version">
+	<target name="init" depends="update.version">
 		<!-- the executable for maven, mvn.bat on windows, mvn otherwise -->
 		<property name="VERSION" value="${project.version}"/>
 
 
 	</target>
 
-	<target name="directory_structure" depends="init">
+	<target name="directory.structure" depends="init">
 		<!-- make sure the directories are wiped before we continue -->
 		<delete dir="${TEMP_DIR}"/>
 		<delete dir="${IMPERIUS_DIST}"/>
 
 		<!-- remake the directories -->
 		<mkdir dir="${IMPERIUS_DIST}"/>
-
-		<!--<mkdir dir="${IMPERIUS_JAVADOC_DIR}"/>-->
-
 		<mkdir dir="${IMPERIUS_SPLCORE_DIR}"/>
 		<mkdir dir="${IMPERIUS_JAVASPL_DIR}"/>
 		<mkdir dir="${JAVASPL_SAMPLES_DIR}"/>
-	<!--	<mkdir dir="${SPL_EDITOR_CORE_DIR}"/>
-		<mkdir dir="${JAVASPL_EDITOR_EXTN_DIR}"/> -->
+		
+		<mkdir dir="${IMPERIUS_CIMSPLCOMMON_DIR}"/>
+		<mkdir dir="${IMPERIUS_CIMSPLCLIENTSIDE_DIR}"/>
+		
 		<mkdir dir="${TEMP_SRC_DIST_DIR}"/>
 	</target>
 
-	<target name="src_dist_all" depends="directory_structure">
+	<target name="src.dist.all" depends="directory.structure">
 
 		<!-- copy the source from the svn checkout folder to our temporary 
         source distribution folder -->
@@ -272,10 +284,6 @@
 	<copy todir="${TMP}/imperius-${JavaSPL}${VERSION}/docs/javadoc" failonerror="true" overwrite="true">
  	    <fileset dir="${IMPERIUS_JAVADOC_DIR}"/>
  	 </copy>
-	 <!-- copy site 
-	 <copy todir="${TMP}/imperius-${JavaSPL}${VERSION}/docs" failonerror="true" overwrite="true">
- 	    <fileset dir="${IMPERIUS_SITE_DIR}"/>
- 	 </copy> -->
  	
  	<!-- copy build log file -->
  	<copy file="${IMPERIUS_LOGGING_FILE}" todir="${TMP}/imperius-${JavaSPL}${VERSION}"/>
@@ -348,18 +356,18 @@
     <delete dir="${TMP}/${installpackagedir}" />
        	
    </target>
-	 <!-- package runtime only -->  
-	 <target name="package_javaspl_runtime" depends="build_javaspl_runtime">
-	 	 <antcall target="package.javasplprovider" />
+	 <!-- package java runtime only -->  
+   <target name="package.javaspl.runtime" depends="build.javaspl.runtime">
+	  <antcall target="package.javasplprovider" />
 		
 		<!-- get maven to clean up the generated files -->
-		<exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}" failonerror="true">
-			<arg line="clean"/>
-			<env key="MAVEN_TERMINATE_CMD" value="on" />
-		</exec>
+	  <exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}" failonerror="true">
+	  	<arg line="clean"/>
+	  	<env key="MAVEN_TERMINATE_CMD" value="on" />
+	  </exec>
 	 </target>
 	<!-- package editor and runtime -->
-	<target name="package_all" depends="build_all">
+	<target name="package.javaspl.runtime.editor" depends="build.javaspl.runtime.editor">
 		 <antcall target="package.spleditor"/>		 
 		<antcall target="package.javasplprovider" />
 		
@@ -370,7 +378,7 @@
 		</exec>
 	</target>
 	<!-- build javaspl runtime -->
-	<target name="build_javaspl_runtime" depends="directory_structure">
+	<target name="build.javaspl.runtime" depends="directory.structure">
 		<!-- get maven to clean up any existing generated files -->
 		<exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}" failonerror="true">
 			<arg line="clean"/>
@@ -399,7 +407,7 @@
             	<include name="**/manager/PolicyRepository.java"/>
             	<include name="**/manager/PolicyEvaluator.java"/>
             	<include name="**/manager/Java_SPLPolicyRuleProvider.java"/>
-		<exclude name="**/*.xml"/>
+				<exclude name="**/*.xml"/>
             	<exclude name="**/*.class"/>
             	<exclude name="**/*.bat"/>
             	<exclude name="**/*.sh"/>
@@ -407,17 +415,163 @@
         </javadoc>
 
 	</target>
+	
+	<!-- PACKAGE CIMSPL CLIENT SIDE PROVIDER -->
+	
+	<!-- package java spl provider -->
+	 <target name="package.cimsplclientsideprovider"  description="creates JavaSPLProvider.zip">
+	       <echo message="Creating CIMSPLClientSideProvider.zip"/>
+	       <delete dir="${TMP}"/>
+
+	       <mkdir dir="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib"/>
+	       <mkdir dir="${TMP}/imperius-cimsplclientsideprovider${VERSION}/docs/javadoc"/>
+	       <mkdir dir="${TMP}/imperius-cimsplclientsideprovider${VERSION}/samples/mofs"/>
+
+	 	 <!-- copy pre req jars-->
+	       <copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib" failonerror="true" overwrite="true">
+	             <fileset dir="${IMPERIUS_SPLCORE_DIR}/target">
+	                   <include name="*.jar"/>
+	             </fileset>
+	       </copy>	
+	 	<!-- rename file -->
+	 	 <move file="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib/imperius-splcore-1.0.0-SNAPSHOT.jar" tofile="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib/imperius-splcore-${VERSION}.jar"/>
+	 	
+	 	 <!-- copy pre req jars-->
+	 		 <copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib" failonerror="true" overwrite="true">
+	 		        <fileset dir="${IMPERIUS_CIMSPLCOMMON_DIR}/target">
+	 		                   <include name="*.jar"/>
+	 		        </fileset>
+	 		 </copy>	
+	 	 <!-- rename file -->
+	 		 <move file="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib/imperius-cimsplcommon-1.0.0-SNAPSHOT.jar" tofile="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib/imperius-cimsplcommon-${VERSION}.jar"/>
+	 		 
+	 	<!-- copy customexpressions.properties -->
+	 		 <copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}" failonerror="true" overwrite="true">
+	 		         <fileset dir="${IMPERIUS_CIMSPLCOMMON_DIR}/resources">
+	 		 		       <include name="*.properties"/>
+	 		 		 </fileset>
+	 		 </copy>	
+	 		
+	 	
+	 	<!-- copy cimsplclientsideprovider jars-->
+	       <copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib" failonerror="true" overwrite="true">
+	             <fileset dir="${IMPERIUS_CIMSPLCLIENTSIDE_DIR}/target">
+	                   <include name="*.jar"/>
+	             </fileset>
+	       </copy>	
+	    <!-- rename file -->
+	 	 <move file="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib/imperius-cimsplclientsideprovider-1.0.0-SNAPSHOT.jar" tofile="${TMP}/imperius-cimsplclientsideprovider${VERSION}/lib/imperius-cimsplclientsideprovider-${VERSION}.jar"/>
+	 		 	
+		 
+		  <!-- copy sample policies-->
+		  <copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}/samples">
+		    <fileset dir="${IMPERIUS_CIMSPLCLIENTSIDE_DIR}/resources/policies"/>	
+		  </copy>
+	 	
+	 	 <!-- copy sample mof-->
+	 	  <copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}/samples/mofs">
+	 		<fileset dir="${IMPERIUS_CIMSPLCLIENTSIDE_DIR}/resources/mofs"/>	
+	 	  </copy>
+		  <!-- copy bat/sh scripts and readmes-->
+		  <copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}">
+			<fileset dir="${IMPERIUS_CIMSPLCLIENTSIDE_DIR}/resources/">
+				<include name="*.txt"/>
+				<include name="*.bat"/>
+				<include name="*.sh"/>
+			</fileset>		  
+		  </copy>
+		  
+	 	<!-- copy javadocs -->
+	       
+		<copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}/docs/javadoc" failonerror="true" overwrite="true">
+	 	    <fileset dir="${IMPERIUS_JAVADOC_DIR}"/>
+	 	 </copy>
+	 	
+	 	<!-- copy build log file -->
+	 	<copy file="${IMPERIUS_LOGGING_FILE}" todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}"/>
+		
+		<!-- copy in the notice -->
+		<copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}" file="${APACHE_NOTICE_FILE}"/>
+
+		<!-- copy in the license -->
+		<copy todir="${TMP}/imperius-cimsplclientsideprovider${VERSION}" file="${APACHE_LICENSE_FILE}"/>
+	 	
+	 	<!-- zip the contents -->
+
+	     <zip destfile="${IMPERIUS_DIST}/imperius-cimsplclientsideprovider${VERSION}-bin.zip"  basedir="${TMP}"/>
+	 	 
+	 	<!-- tar gz the contents -->
+	 	 <tar destfile="${IMPERIUS_DIST}/imperius-cimsplclientsideprovider${VERSION}-bin.tar.gz" basedir="${TMP}"  compression="gzip"/>
+	    
+	 	<!-- delete tmp dir -->
+	 	<delete dir="${TMP}"/>
+	 	
+	   </target>
+	   
+	
+	
+	 <!-- PACKAGE CIMSPL RUNTIME -->  
+	<target name="package.cimspl.runtime" depends="build.cimspl.runtime">
+	  <antcall target="package.cimsplclientsideprovider" />
+			
+	  <!-- get maven to clean up the generated files -->
+	  <exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}" failonerror="true">
+	  	<arg line="clean"/>
+	  	<env key="MAVEN_TERMINATE_CMD" value="on" />
+	  </exec>
+	</target>
+	
+	<!-- BUILD THE CIMSPL PROVIDERS-->
+	<target name="build.cimspl.runtime">
+		<!-- get maven to clean up any existing generated files -->
+		<exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}" failonerror="true">
+			<arg line="clean -Dbuild=cimspl-runtime"/>
+			<env key="MAVEN_TERMINATE_CMD" value="on" />
+		</exec>
+
+		<!-- call maven directly -->
+		<exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}" failonerror="true">
+			<arg line="-ff -e -Dbuild=cimspl-runtime"/>
+			<env key="MAVEN_TERMINATE_CMD" value="on" />
+		</exec>
+
+		<!-- copy in the notice -->
+		<copy todir="${TEMP_BIN_DIST_DIR}" file="${APACHE_NOTICE_FILE}"/>
+
+		<!-- copy in the license -->
+		<copy todir="${TEMP_BIN_DIST_DIR}" file="${APACHE_LICENSE_FILE}"/>
+
+		<!-- create the javadoc -->
+		<javadoc destdir="${IMPERIUS_JAVADOC_DIR}" useexternalfile="yes" failonerror="true">
+            <fileset dir="${TEMP_SRC_DIST_DIR}">
+           	<include name="**/external/**"/>
+            	<include name="**/manager/PolicyManager.java"/>
+            	<include name="**/manager/PolicyDataStore.java"/>
+            	<include name="**/manager/PolicyParser.java"/>
+            	<include name="**/manager/PolicyRepository.java"/>
+            	<include name="**/manager/PolicyEvaluator.java"/>
+            	<include name="**/CIM_SPLPolicyRuleClientProvider.java"/>
+				<exclude name="**/*.xml"/>
+            	<exclude name="**/*.class"/>
+            	<exclude name="**/*.bat"/>
+            	<exclude name="**/*.sh"/>
+            </fileset>	
+        </javadoc>
+		
+		
+	</target>
+	
 	<!-- build everything -->
-	<target name="build_all" depends="directory_structure">
+	<target name="build.javaspl.runtime.editor" depends="directory.structure">
 		<!-- get maven to clean up any existing generated files -->
 		<exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}" failonerror="true">
-			<arg line="clean -Dbuild=all"/>
+			<arg line="clean -Dbuild=java-editor-runtime"/>
 			<env key="MAVEN_TERMINATE_CMD" value="on" />
 		</exec>
 
 		<!-- call maven directly -->
 		<exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}" failonerror="true">
-			<arg line="-ff -e -Dbuild=all"/>
+			<arg line="-ff -e -Dbuild=java-editor-runtime"/>
 			<env key="MAVEN_TERMINATE_CMD" value="on" />
 		</exec>
 
@@ -450,11 +604,15 @@
 		
 	</target>
 	
-	<target name="javaspl.runtime" depends="src_dist_all,build_javaspl_runtime,package_javaspl_runtime,cleanup">
+	<target name="javaspl.runtime" depends="src.dist.all,build.javaspl.runtime,package.javaspl.runtime,cleanup">
+		<record name="${LOG_FILE}" append="yes" action="stop"/>
+	</target>
+	
+	<target name="cimspl.runtime" depends="src.dist.all,build.cimspl.runtime,package.cimspl.runtime,cleanup">
 		<record name="${LOG_FILE}" append="yes" action="stop"/>
 	</target>
 
-	<target name="all" depends="src_dist_all,build_all,package_all,cleanup">
+	<target name="javaspl.runtime.editor" depends="src.dist.all,build.javaspl.runtime.editor,package.javaspl.runtime.editor,cleanup">
 			<record name="${LOG_FILE}" append="yes" action="stop"/>
 	</target>
 </project>

Modified: incubator/imperius/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/pom.xml?rev=627870&r1=627869&r2=627870&view=diff
==============================================================================
--- incubator/imperius/trunk/pom.xml (original)
+++ incubator/imperius/trunk/pom.xml Thu Feb 14 13:05:12 2008
@@ -74,11 +74,11 @@
              </modules>
         </profile>
         <profile>
-          <id>all </id>
+          <id>java-editor-runtime </id>
           <activation>
             <property>
               <name>build</name>
-              <value>all</value>
+              <value>java-editor-runtime</value>
             </property>
           </activation>
           <modules>
@@ -87,6 +87,21 @@
             <module>javaspl-samples</module>
             <module>imperius-spleditorcore</module>
             <module>imperius-javasplextension</module>
+        </modules>
+    
+        </profile>
+        <profile>
+          <id>cimspl-runtime </id>
+          <activation>
+            <property>
+              <name>build</name>
+              <value>cimspl-runtime</value>
+            </property>
+          </activation>
+          <modules>
+            <module>imperius-splcore</module>
+            <module>imperius-cimsplcommon</module>
+            <module>imperius-cimsplclientsideprovider</module>
         </modules>
     
         </profile>