incubator-imperius-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jnee...@apache.org
Subject svn commit: r613347 - in /incubator/imperius/trunk: ./ imperius-javaspl/ imperius-javaspl/META-INF/ imperius-javasplextension/ imperius-javasplextension/META-INF/ imperius-splcore/ imperius-splcore/META-INF/ imperius-splcore/src/main/java/org/apache/im...
Date Sat, 19 Jan 2008 02:58:23 GMT
Author: jneeraj
Date: Fri Jan 18 18:58:21 2008
New Revision: 613347

URL: http://svn.apache.org/viewvc?rev=613347&view=rev
Log:
Applied IMPERIUS-2 fix by Erik

1. Added manifest files for splcore and javaspl to make them valid OSGi bundles
2. Fixed classloader issues for ANTLR and customexpressions
3. Updated the spleditorcore and javasplextension plugins to not embed the splcore and javaspl
jar files
instead the packages are imported via the OSGi mechanism by specifying in the MANIFEST.MF
4. Build now produces a zip file with a plugins folder with the 4 plugins jar which now simply
has to be
unzipped into the eclipse folder
5. Added profiles to build all and javaruntime. Javaruntime is built by default

Added:
    incubator/imperius/trunk/imperius-javaspl/META-INF/
    incubator/imperius/trunk/imperius-javaspl/META-INF/MANIFEST.MF
    incubator/imperius/trunk/imperius-splcore/META-INF/
    incubator/imperius/trunk/imperius-splcore/META-INF/MANIFEST.MF
Removed:
    incubator/imperius/trunk/javaspl_runtime_pom.xml
Modified:
    incubator/imperius/trunk/build.xml
    incubator/imperius/trunk/imperius-javaspl/pom.xml
    incubator/imperius/trunk/imperius-javasplextension/META-INF/MANIFEST.MF
    incubator/imperius/trunk/imperius-javasplextension/build.properties
    incubator/imperius/trunk/imperius-javasplextension/pom.xml
    incubator/imperius/trunk/imperius-splcore/pom.xml
    incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/factory/ACPLParserMap.java
    incubator/imperius/trunk/imperius-spleditorcore/META-INF/MANIFEST.MF
    incubator/imperius/trunk/imperius-spleditorcore/pom.xml
    incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java
    incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/utils/SPLPolicyUtil.java
    incubator/imperius/trunk/pom.xml

Modified: incubator/imperius/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/build.xml?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/build.xml (original)
+++ incubator/imperius/trunk/build.xml Fri Jan 18 18:58:21 2008
@@ -122,7 +122,7 @@
 		</exec>
 		<exec executable="svn" searchpath="true" dir="." failonerror="true">
 		    <arg line="co http://svn.apache.org/repos/asf/incubator/imperius/trunk/imperius-javasplextension
"/>
-		</exec>
+		</exec> 
 		
      <!--   <exec executable="svn" searchpath="true" dir="." failonerror="true">
             <arg line="co ${IMPERIUS_SVN_SITE_REPOSITORY} ${IMPERIUS_SVN_SITE} -non-interactive"/>
@@ -146,7 +146,7 @@
 		<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="${JAVA_RUNTIME_POM_XML_URL}" dest="${JAVA_RUNTIME_POM_XML_FILE}"/>
+		<get src="${JAVA_RUNTIME_POM_XML_URL}" dest="${JAVA_RUNTIME_POM_XML_FILE}"/> 
 	</target>
 
 	<!-- Add a build tag to the version in the main pom.xml. If there was no build
@@ -301,163 +301,54 @@
  	
    </target>
    
-   <!-- Package the spleditor core plugin -->
-   
-   <target name="package.spleditorcoreplugin">
-	<delete dir="${TMP}"/>
-
-       <mkdir dir="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}"/>
-        <!-- copy pre req jars-->
-   	
-   	   
-       <copy todir="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}" failonerror="true" overwrite="true">
-             <fileset dir="${IMPERIUS_SPLCORE_DIR}/target">
-                   <include name="*.jar"/>
-             </fileset>
-       		<fileset dir="${env.ANTLR_HOME}">
-    			<include name="antlr.jar"/>
-    		</fileset>
-
-       </copy>	
- 	<!-- rename file -->
- 	 <move file="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}/imperius-splcore-1.0.0-SNAPSHOT.jar"
tofile="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}/imperius-splcore-${VERSION}.jar"/>
- 	
-
-	<!-- copy imperius-spleditorcore jar -->
- 	 <copy todir="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}" failonerror="true" overwrite="true">
-         <fileset dir="${SPL_EDITOR_CORE_DIR}/target">
-               <include name="*.jar"/>
-         </fileset>
-   	   </copy>
- 	<!-- rename file -->
- 	 <move file="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}/imperius-spleditorcore-1.0.0-SNAPSHOT.jar"
tofile="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}/policyeditor.jar"/>
-	 
-	<!-- hack to copy over the .properties files skipped by maven -->	 
-	<mkdir dir="${TMP}/tp"/> 
-	<unzip src="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}/policyeditor.jar" dest="${TMP}/tp"/>
  
-	<copy todir="${TMP}/tp" failonerror="true" overwrite="false">
-	<fileset dir="${SPL_EDITOR_CORE_DIR}/src">
-		<include name="**/*.properties"/>
-		<include name="**/*.txt"/>
-	</fileset>
-	</copy>
-	  <jar destfile="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}/policyeditor.jar" basedir="${TMP}/tp"/>
-	  <delete dir="${TMP/tp}"/>
-	 <!-- hack ends --> 
-	
-	 <!-- copy non src files -->
-	<copy todir="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}"   failonerror="true" overwrite="false">
-		<fileset dir="${SPL_EDITOR_CORE_DIR}">
-			<include name="META-INF/"/>
-			<include name="plugin.properties"/>
-			<include name="plugin.xml"/>
-			<include name="icons/"/>
-			<include name="schema/"/>
-			
-		</fileset>
-	</copy>
-	
-	<jar destfile="${IMPERIUS_DIST}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}.jar"  basedir="${TMP}/${SPL_EDITOR_CORE_PLUGIN}_${VERSION}"
filesetmanifest="merge"/>
-	<delete dir="${TMP}"/>
-   </target>
-   
-   <!-- Package javaspl extension plugin -->
-   <target name="package.javasplextensionplugin">
-   <delete dir="${TMP}"/>
-
-       <mkdir dir="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}"/>
-        <!-- copy pre req jars-->
-       <copy todir="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}" failonerror="true"
overwrite="true">
-             <fileset dir="${IMPERIUS_SPLCORE_DIR}/target">
-                   <include name="*.jar"/>
-             </fileset>
-       </copy>	
- 	<!-- rename file -->
- 	 <move file="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}/imperius-splcore-1.0.0-SNAPSHOT.jar"
tofile="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}/imperius-splcore-${VERSION}.jar"/>
- 	
-	<copy todir="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}" failonerror="true" overwrite="true">
-             <fileset dir="${IMPERIUS_JAVASPL_DIR}/target">
-                   <include name="*.jar"/>
-             </fileset>
-       </copy>	
- 	<!-- rename file -->
- 	 <move file="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}/imperius-javaspl-1.0.0-SNAPSHOT.jar"
tofile="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}/imperius-javaspl-${VERSION}.jar"/>
- 	
-	
-	<!-- copy imperius-javasplextension jar -->
- 	 <copy todir="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}" failonerror="true" overwrite="true">
-         <fileset dir="${JAVASPL_EDITOR_EXTN_DIR}/target">
-               <include name="*.jar"/>
-         </fileset>
-   	   </copy>
- 	<!-- rename file -->
- 	 <move file="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}/imperius-javasplextension-1.0.0-SNAPSHOT.jar"
tofile="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}/javaspl.jar"/>
-         
-	 <!-- copy non src files -->
-	<copy todir="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}"   failonerror="true" overwrite="false">
-		<fileset dir="${JAVASPL_EDITOR_EXTN_DIR}">
-			<include name="META-INF/"/>
-			<include name="plugin.properties"/>
-			<include name="plugin.xml"/>
-		</fileset>
-	</copy>
-	
-	<jar destfile="${IMPERIUS_DIST}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}.jar"  basedir="${TMP}/${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}"
filesetmanifest="merge"/>
-	<delete dir="${TMP}"/>
-   
-   </target>
-	
-	<!-- set the property to indicate that ANTLR_HOME is set -->
-	<target name="cond_check_antlr">
-		<property environment="env"/>
-		<condition property="ANTLR_HOME_SET">
-            <isset property="env.ANTLR_HOME"/>
- 		</condition>
-	</target>
-	<!-- fail if JAVA_HOME isn't set, 
-	 	otherwise we don't execute the body -->
-	<target name="check_environment_antlr" unless="ANTLR_HOME_SET" depends="cond_check_antlr">
-		<fail message="The environment variable ANTLR_HOME is not set. Set this variable to
the directory where ANTLR is installed."/>
-	</target>
-   <!-- Packaging the site -->
-   <target name="package.javaeditorsite" depends="check_environment_antlr">
-	 <echo message="Building UpdateSite"/>
-	 <antcall target="package.spleditorcoreplugin"/>
-	 <antcall target="package.javasplextensionplugin"/>
-	<delete dir="${TMP}"/>	
-	<property name="SPLUpdateSite" value="spl.updatesite"/>
-	<property name="javaspl.feature.jar.name" value="org.apache.imperius.javaspl.feature_${VERSION}"/>
-	
-	<mkdir dir="${TMP}/${SPLUpdateSite}/features"/>
-	<mkdir dir="${TMP}/${SPLUpdateSite}/plugins"/>
-	<mkdir dir="${TMP}/${SPLUpdateSite}/web"/>
-		
-	<jar destfile="${TMP}/${SPLUpdateSite}/features/${javaspl.feature.jar.name}.jar">
-	       <fileset dir="${JAVASPL_EDITOR_EXTN_DIR}">
-	    		<include name="feature.xml"/>
-	    	</fileset>
-	</jar>
-		
-	
-	<copy todir="${TMP}/${SPLUpdateSite}/plugins" failonerror="true" overwrite="true">
-		<fileset dir="${IMPERIUS_DIST}">
-			<include name="${SPL_EDITOR_CORE_PLUGIN}_${VERSION}.jar"/>
-		</fileset>
-		<fileset dir="${IMPERIUS_DIST}">
-			<include name="${JAVASPL_EDITOR_EXTN_PLUGIN}_${VERSION}.jar"/>
-		</fileset>
-	</copy>
-		
-	<copy todir="${TMP}/${SPLUpdateSite}"  overwrite="true">
-		<fileset dir="${SPL_EDITOR_CORE_DIR}">
-			<include name="site.xml"/>
-		</fileset>
-	</copy>
-		
-	<zip destfile="${IMPERIUS_DIST}/${SPLUpdateSite}.zip"  basedir="${TMP}/${SPLUpdateSite}"/>
-	
+   <!-- Packaging the plugins -->
+  <target name="package.spleditor">
+    <echo message="Building Plugins dir"/>
+	
+    <delete dir="${TMP}"/>	
+	
+    <property name="spleditor" value="SPLEditor"/>
+    <property name="installpackagedir" value ="${TMP}/eclipse/plugins"/>
+    <mkdir dir="${installpackagedir}"/>
+	
+
+	<!-- Copy all pre-req jars -->	
+    <copy todir="${installpackagedir}" failonerror="true" overwrite="true">
+	<!-- Copy splcore jar -->
+      <fileset dir="${IMPERIUS_SPLCORE_DIR}/target">
+         <include name="*.jar"/>
+      </fileset>
+  <!-- Copy javaspl jar -->  
+      <fileset dir="${IMPERIUS_JAVASPL_DIR}/target">
+         <include name="*.jar"/>
+      </fileset>
+  <!-- Copy javasplextn jar-->   
+      <fileset dir="${JAVASPL_EDITOR_EXTN_DIR}/target">
+         <include name="*.jar"/>
+      </fileset>
+  <!-- Copy spleditor core jar-->   
+      <fileset dir="${SPL_EDITOR_CORE_DIR}/target">
+        <include name="*.jar"/>
+      </fileset>
+  	
+    </copy>
+    
+    <!-- Get rid of SNAPSHOT suffix-->
+    
+    <move file="${installpackagedir}/imperius-splcore-1.0.0-SNAPSHOT.jar" tofile="${installpackagedir}/imperius-splcore-${VERSION}.jar"/>
+    
+    <move file="${installpackagedir}/imperius-javaspl-1.0.0-SNAPSHOT.jar" tofile="${installpackagedir}/imperius-javaspl-${VERSION}.jar"/>
+    
+    <move file="${installpackagedir}/imperius-spleditorcore-1.0.0-SNAPSHOT.jar" tofile="${installpackagedir}/imperius-spleditorcore-${VERSION}.jar"/>
+    
+    <move file="${installpackagedir}/imperius-javasplextension-1.0.0-SNAPSHOT.jar" tofile="${installpackagedir}/imperius-javasplextension-${VERSION}.jar"/>
+    
+    <!-- Zip up the contents-->
 		
-	<delete dir="${TMP}/${SPLUpdateSite}" />
+    <zip destfile="${IMPERIUS_DIST}/${spleditor}.zip"  basedir="${TMP}/eclipse"/>
+			
+		<!-- Clean up -->	
+    <delete dir="${TMP}/${installpackagedir}" />
        	
    </target>
 	 <!-- package runtime only -->  
@@ -472,7 +363,7 @@
 	 </target>
 	<!-- package editor and runtime -->
 	<target name="package_all" depends="build_all">
-		 <antcall target="package.javaeditorsite"/>		 
+		 <antcall target="package.spleditor"/>		 
 		<antcall target="package.javasplprovider" />
 		
 		<!-- get maven to clean up the generated files -->
@@ -489,9 +380,9 @@
 			<env key="MAVEN_TERMINATE_CMD" value="on" />
 		</exec>
 
-		<!-- call maven directly -->
+		<!-- call maven directly -f javaspl_runtime_pom.xml-->
 		<exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}"
failonerror="true">
-			<arg line="-ff -e -f javaspl_runtime_pom.xml"/>
+			<arg line="-ff -e"/>
 			<env key="MAVEN_TERMINATE_CMD" value="on" />
 		</exec>
 
@@ -529,7 +420,7 @@
 
 		<!-- call maven directly -->
 		<exec executable="${MAVEN_EXECUTABLE}" searchpath="true" dir="${IMPERIUS_SVN_MODULES}"
failonerror="true">
-			<arg line="-ff -e"/>
+			<arg line="-ff -e -Dbuild=all"/>
 			<env key="MAVEN_TERMINATE_CMD" value="on" />
 		</exec>
 
@@ -549,7 +440,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"/>

Added: incubator/imperius/trunk/imperius-javaspl/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-javaspl/META-INF/MANIFEST.MF?rev=613347&view=auto
==============================================================================
--- incubator/imperius/trunk/imperius-javaspl/META-INF/MANIFEST.MF (added)
+++ incubator/imperius/trunk/imperius-javaspl/META-INF/MANIFEST.MF Fri Jan 18 18:58:21 2008
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: imperius.javaspl
+Bundle-SymbolicName: org.apache.imperius.javaspl
+Bundle-Version: 1.0.0
+Export-Package: org.apache.imperius.javaspl
+Require-Bundle: org.apache.imperius.splcore;bundle-version="1.0.0"
+Bundle-ClassPath: .

Modified: incubator/imperius/trunk/imperius-javaspl/pom.xml
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-javaspl/pom.xml?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-javaspl/pom.xml (original)
+++ incubator/imperius/trunk/imperius-javaspl/pom.xml Fri Jan 18 18:58:21 2008
@@ -26,7 +26,7 @@
   <packaging>jar</packaging>
   <version>1.0.0-SNAPSHOT</version>
   <name>imperius-javaspl</name>
-   <dependencies>
+  <dependencies>
 	  <dependency>
 		<groupId>imperius</groupId>
 		<artifactId>imperius-splcore</artifactId>
@@ -34,6 +34,18 @@
 	    </dependency>
 	   
   </dependencies>
-  
+  <build>
+   <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>  
+  </build>
 
 </project>

Modified: incubator/imperius/trunk/imperius-javasplextension/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-javasplextension/META-INF/MANIFEST.MF?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-javasplextension/META-INF/MANIFEST.MF (original)
+++ incubator/imperius/trunk/imperius-javasplextension/META-INF/MANIFEST.MF Fri Jan 18 18:58:21
2008
@@ -3,63 +3,16 @@
 Bundle-Name: Java SPL Extension Plug-in
 Bundle-SymbolicName: org.apache.imperius.javaspl.extension;singleton:=true
 Bundle-Version: 1.0.0
-Bundle-Activator: org.apache.imperius.javaspl.extension.Activator
 Bundle-Vendor: IBM
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.debug.ui,
- org.eclipse.emf.edit.ui,
- org.apache.imperius.spl.editor.tool
+ org.apache.imperius.spl.editor.tool,
+ org.apache.imperius.javaspl;bundle-version="1.0.0",
+ org.apache.imperius.splcore;bundle-version="1.0.0",
+ org.eclipse.ui;bundle-version="3.3.0",
+ org.eclipse.core.resources;bundle-version="3.3.0"
 Eclipse-LazyStart: true
-Export-Package: org.apache.imperius.javaspl;uses:="org.apache.imperius.spl.external",
- org.apache.imperius.javaspl.client;
-  uses:="org.apache.imperius.spl.editor.tool.utils,
-   org.apache.imperius.spl.editor.tool.internal.client,
-   org.eclipse.core.resources,
-   org.apache.imperius.spl.external",
- org.apache.imperius.javaspl.extension;
-  uses:="org.osgi.framework,
-   org.eclipse.ui.plugin,
-   org.eclipse.core.resources,
-   org.eclipse.swt.widgets,
-   org.eclipse.ui",
- org.apache.imperius.spl.datastore;uses:="org.apache.imperius.spl.parser.statements.impl",
- org.apache.imperius.spl.datastore.impl;uses:="antlr.collections,org.apache.imperius.spl.datastore,org.apache.imperius.spl.parser.statements.impl",
- org.apache.imperius.spl.evaluator;uses:="org.apache.imperius.spl.parser.statements.impl",
- org.apache.imperius.spl.evaluator.impl;uses:="org.apache.imperius.spl.evaluator,org.apache.imperius.spl.parser.statements.impl",
- org.apache.imperius.spl.external;uses:="org.apache.imperius.spl.manager,org.apache.imperius.spl.parser.util",
- org.apache.imperius.spl.manager;uses:="org.apache.imperius.spl.external,org.apache.imperius.spl.parser.statements.impl",
- org.apache.imperius.spl.manager.impl;uses:="org.apache.imperius.spl.manager,org.apache.imperius.spl.external,org.apache.imperius.spl.parser.statements.impl",
- org.apache.imperius.spl.parser.compiler;
-  uses:="org.apache.imperius.spl.parser.statements,
-   org.apache.imperius.spl.external,
-   antlr.collections.impl,
-   org.apache.imperius.spl.parser.statements.impl,
-   org.apache.imperius.spl.parser.compiler.symboltable,
-   antlr.collections,
-   org.apache.imperius.spl.parser.util,
-   antlr.debug.misc,
-   antlr",
- org.apache.imperius.spl.parser.compiler.symboltable;uses:="org.apache.imperius.spl.parser.util,org.apache.imperius.spl.external,org.apache.imperius.spl.parser.statements.impl",
- org.apache.imperius.spl.parser.exceptions,
- org.apache.imperius.spl.parser.expression.primary;
-  uses:="org.apache.imperius.spl.parser.compiler.symboltable,
-   org.apache.imperius.spl.parser.expressions,
-   org.apache.imperius.spl.parser.util,
-   org.apache.imperius.spl.external",
- org.apache.imperius.spl.parser.expressions;uses:="org.apache.imperius.spl.parser.compiler.symboltable,org.apache.imperius.spl.parser.util,org.apache.imperius.spl.external",
- org.apache.imperius.spl.parser.expressions.impl;uses:="org.apache.imperius.spl.parser.expressions,org.apache.imperius.spl.parser.util,org.apache.imperius.spl.external",
- org.apache.imperius.spl.parser.factory;uses:="org.apache.imperius.spl.parser.compiler.symboltable,org.apache.imperius.spl.external,org.apache.imperius.spl.parser.statements",
- org.apache.imperius.spl.parser.statements;uses:="org.apache.imperius.spl.external",
- org.apache.imperius.spl.parser.statements.actions.impl;uses:="org.apache.imperius.spl.parser.compiler.symboltable,org.apache.imperius.spl.parser.statements,org.apache.imperius.spl.external",
- org.apache.imperius.spl.parser.statements.impl;
-  uses:="org.apache.imperius.spl.parser.compiler.symboltable,
-   org.apache.imperius.spl.parser.util,
-   org.apache.imperius.spl.parser.statements,
-   org.apache.imperius.spl.external",
- org.apache.imperius.spl.parser.util;uses:="org.apache.imperius.spl.parser.expressions.impl,org.apache.imperius.spl.external",
- org.apache.imperius.util
-Bundle-ClassPath: imperius-splcore-1.0.0.jar,
- imperius-javaspl-1.0.0.jar,
- javaspl.jar
+Bundle-ClassPath: .
+Export-Package: org.apache.imperius.javaspl.client
+Bundle-Activator: org.apache.imperius.javaspl.extension.Activator
 

Modified: incubator/imperius/trunk/imperius-javasplextension/build.properties
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-javasplextension/build.properties?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-javasplextension/build.properties (original)
+++ incubator/imperius/trunk/imperius-javasplextension/build.properties Fri Jan 18 18:58:21
2008
@@ -1,5 +1,8 @@
 output.. = bin/
 bin.includes = plugin.xml,\
                plugin.properties,\
-               imperius-javaspl-1.0.0.jar,\
-               imperius-splcore-1.0.0.jar
+               javaspl.jar,\
+               META-INF/
+jars.compile.order = javaspl.jar
+source.javaspl.jar = src/
+output.javaspl.jar = bin/

Modified: incubator/imperius/trunk/imperius-javasplextension/pom.xml
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-javasplextension/pom.xml?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-javasplextension/pom.xml (original)
+++ incubator/imperius/trunk/imperius-javasplextension/pom.xml Fri Jan 18 18:58:21 2008
@@ -251,5 +251,33 @@
 	</dependencies>
 	<build>
 		<sourceDirectory>src</sourceDirectory>
+        <resources>
+            <resource>
+                <filtering>true</filtering>
+                <directory>${basedir}/src</directory>
+                <includes>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>${basedir}</directory>
+                <includes>
+                    <include>plugin.properties</include>
+                    <include>plugin.xml</include>
+                    <include>META-INF/MANIFEST.MF</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+         <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <configuration>
+            <archive>
+              <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+            </archive>
+          </configuration>
+        </plugin>
+      </plugins> 
 	</build>
 </project>

Added: incubator/imperius/trunk/imperius-splcore/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/META-INF/MANIFEST.MF?rev=613347&view=auto
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/META-INF/MANIFEST.MF (added)
+++ incubator/imperius/trunk/imperius-splcore/META-INF/MANIFEST.MF Fri Jan 18 18:58:21 2008
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: imperius.splcore
+Bundle-SymbolicName: org.apache.imperius.splcore
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Export-Package: org.apache.imperius.spl.datastore,
+ org.apache.imperius.spl.evaluator,
+ org.apache.imperius.spl.external,
+ org.apache.imperius.spl.manager,
+ org.apache.imperius.spl.manager.impl,
+ org.apache.imperius.spl.parser.compiler,
+ org.apache.imperius.spl.parser.compiler.symboltable,
+ org.apache.imperius.spl.parser.exceptions,
+ org.apache.imperius.spl.parser.expressions,
+ org.apache.imperius.spl.parser.factory,
+ org.apache.imperius.spl.parser.statements.impl,
+ org.apache.imperius.spl.parser.util,
+ org.apache.imperius.util
+Import-Package: antlr,
+ antlr.actions.java,
+ antlr.build,
+ antlr.collections,
+ antlr.collections.impl,
+ antlr.debug,
+ antlr.debug.misc,
+ antlr.preprocessor
+ 
\ No newline at end of file

Modified: incubator/imperius/trunk/imperius-splcore/pom.xml
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/pom.xml?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/pom.xml (original)
+++ incubator/imperius/trunk/imperius-splcore/pom.xml Fri Jan 18 18:58:21 2008
@@ -42,7 +42,7 @@
   </dependencies>
   
    <build>
-    <plugins>
+     <plugins>
        <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>antlr-maven-plugin</artifactId>
@@ -64,7 +64,18 @@
           </execution>
         </executions>
       </plugin>
-     
+      
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+          </archive>
+             
+        </configuration>
+      </plugin>
+
     </plugins>
   </build>
  

Modified: incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/factory/ACPLParserMap.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/factory/ACPLParserMap.java?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/factory/ACPLParserMap.java
(original)
+++ incubator/imperius/trunk/imperius-splcore/src/main/java/org/apache/imperius/spl/parser/factory/ACPLParserMap.java
Fri Jan 18 18:58:21 2008
@@ -544,13 +544,28 @@
 		        throw new ClassNotFoundException();
 		        
 		    }
-		    if (knownClass == null)
+		    try
 		    {
-		        result = Class.forName(typeLocalName.trim());
+			    if (knownClass == null)
+			    {
+			        result = Class.forName(typeLocalName.trim());
+			    }
+			    else
+			    {
+			        result = Class.forName(knownClass.trim());
+			    }
 		    }
-		    else
+		    catch(ClassNotFoundException ex)
 		    {
-		        result = Class.forName(knownClass.trim());
+			    if (knownClass == null)
+			    {
+			        result = Class.forName(typeLocalName.trim(),false,Thread.currentThread().getContextClassLoader());
+			    }
+			    else
+			    {
+			        result = Class.forName(knownClass.trim(),false,Thread.currentThread().getContextClassLoader());
+			    } 
+			    
 		    }
 		    
 		}

Modified: incubator/imperius/trunk/imperius-spleditorcore/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-spleditorcore/META-INF/MANIFEST.MF?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-spleditorcore/META-INF/MANIFEST.MF (original)
+++ incubator/imperius/trunk/imperius-spleditorcore/META-INF/MANIFEST.MF Fri Jan 18 18:58:21
2008
@@ -5,52 +5,21 @@
 Bundle-Version: 1.0.0
 Bundle-Activator: org.apache.imperius.spl.editor.tool.PluginActivator
 Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.platform,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.debug.core,
- org.eclipse.jdt.debug,
+Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.jdt.core,
- org.eclipse.jdt.ui,
- org.eclipse.ui,
  org.eclipse.ui.ide,
- org.eclipse.ui.views,
  org.eclipse.ui.workbench.texteditor,
  org.eclipse.ui.editors,
  org.eclipse.jface.text,
- org.eclipse.debug.ui,
- org.eclipse.emf.ecore,
- org.eclipse.emf.common,
  org.eclipse.ui.forms,
- org.eclipse.emf.edit,
- org.eclipse.emf.edit.ui,
- org.eclipse.swt,
- org.eclipse.team.core,
- com.ibm.icu,
- org.eclipse.jdt.launching
+ org.eclipse.jdt.launching,
+ org.apache.imperius.splcore;bundle-version="1.0.0",
+ org.eclipse.ui,
+ org.eclipse.ui.views,
+ org.eclipse.core.resources
 Eclipse-LazyStart: true
 Bundle-Localization: plugin
 Export-Package: 
- antlr;
-  uses:="antlr.debug,
-   antlr.collections,
-   antlr.collections.impl,
-   antlr.ASdebug",
- antlr.ASdebug;uses:="antlr",
- antlr.actions.cpp;uses:="antlr.collections.impl,antlr",
- antlr.actions.csharp;uses:="antlr.collections.impl,antlr",
- antlr.actions.java;uses:="antlr.collections.impl,antlr",
- antlr.actions.python;uses:="antlr.collections.impl,antlr",
- antlr.build,
- antlr.collections;uses:="antlr",
- antlr.collections.impl;uses:="antlr.collections,antlr",
- antlr.debug;uses:="antlr.collections.impl,antlr",
- antlr.debug.misc;
-  uses:="javax.swing.event,
-   javax.swing.tree,
-   antlr.collections,
-   javax.swing",
- antlr.preprocessor;uses:="antlr.collections.impl,antlr",
  org.apache.imperius.spl.editor.tool;
   uses:="org.osgi.framework,
    org.eclipse.ui.plugin,
@@ -62,18 +31,18 @@
    antlr.collections,
    org.eclipse.core.resources,
    org.eclipse.core.runtime",
- org.apache.imperius.spl.editor.tool.internal.client;uses:="org.apache.imperius.spl.editor.tool.utils,org.eclipse.core.resources",
+ org.apache.imperius.spl.editor.tool.internal.client;uses:="org.apache.imperius.spl.editor.tool.utils,org.eclipse.core.resources,org.apache.imperius.spl.external",
  org.apache.imperius.spl.editor.tool.internal.messages;uses:="org.eclipse.osgi.util",
  org.apache.imperius.spl.editor.tool.internal.nature;uses:="org.eclipse.core.resources,org.eclipse.core.runtime",
  org.apache.imperius.spl.editor.tool.ui;
   uses:="org.eclipse.jface.util,
-   org.eclipse.jface.text.presentation,
    org.eclipse.swt.graphics,
+   org.eclipse.jface.text.presentation,
    org.eclipse.jface.text,
    org.eclipse.core.resources,
+   org.eclipse.jface.text.reconciler,
    org.eclipse.ui.editors.text,
    org.eclipse.ui,
-   org.eclipse.jface.text.reconciler,
    org.eclipse.jface.text.source,
    org.eclipse.jface.text.rules,
    org.apache.imperius.spl.editor.tool.ui.internal.preferences,
@@ -112,14 +81,14 @@
    org.eclipse.jface.text.presentation,
    org.eclipse.jface.wizard,
    org.eclipse.core.resources,
-   org.eclipse.swt.widgets,
    org.eclipse.core.runtime,
+   org.eclipse.swt.widgets,
    org.eclipse.ui.editors.text,
    org.eclipse.ui,
    org.eclipse.jface.text.source",
  org.apache.imperius.spl.editor.tool.utils;
-  uses:="org.eclipse.jdt.core,
-   org.apache.imperius.spl.editor.tool.ui,
+  uses:="org.apache.imperius.spl.editor.tool.ui,
+   org.eclipse.jdt.core,
    org.xml.sax,
    org.eclipse.swt.graphics,
    org.eclipse.jface.text,
@@ -128,6 +97,6 @@
    org.eclipse.jface.window,
    org.eclipse.swt.widgets,
    org.eclipse.core.runtime"
-Bundle-ClassPath: antlr.jar,
- policyeditor.jar,
- imperius-splcore-1.0.0.jar
+Bundle-ClassPath: .
+Import-Package: antlr,
+ antlr.collections

Modified: incubator/imperius/trunk/imperius-spleditorcore/pom.xml
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-spleditorcore/pom.xml?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-spleditorcore/pom.xml (original)
+++ incubator/imperius/trunk/imperius-spleditorcore/pom.xml Fri Jan 18 18:58:21 2008
@@ -247,15 +247,37 @@
 	</dependencies>
 	<build>
 		<sourceDirectory>src</sourceDirectory>
-		<plugins>
-		      <plugin>
-			<groupId>org.apache.maven.plugins</groupId>
-			<artifactId>maven-jar-plugin</artifactId>
-			<configuration>
-				<includes>*.class,*.properties</includes>
-			</configuration>
-		      </plugin>
-		 </plugins>     
+        <resources>
+            <resource>
+                <filtering>true</filtering>
+                <directory>${basedir}/src</directory>
+                <includes>
+                    <include>**/*.properties</include>
+                    <include>**/templates.txt</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>${basedir}</directory>
+                <includes>
+                    <include>plugin.properties</include>
+                    <include>plugin.xml</include>
+                    <include>META-INF/MANIFEST.MF</include>
+                    <include>icons/</include>
+                    <include>schema/</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+          <plugin>
+           <groupId>org.apache.maven.plugins</groupId>
+           <artifactId>maven-jar-plugin</artifactId>
+            <configuration>
+              <archive>
+                <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+              </archive>
+            </configuration>
+          </plugin>
+        </plugins> 			
 			
 	</build>
 </project>

Modified: incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java
(original)
+++ incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/internal/builder/PolicyFileParser.java
Fri Jan 18 18:58:21 2008
@@ -28,6 +28,7 @@
 import java.io.Reader;
 import java.util.HashMap;
 import java.util.Map;
+import java.net.URLClassLoader;
 
 import org.apache.imperius.spl.editor.tool.PluginActivator;
 import org.apache.imperius.spl.editor.tool.internal.client.IPolicyClient;
@@ -37,11 +38,14 @@
 import org.apache.imperius.spl.editor.tool.ui.internal.contentoutline.IOutlineViewObserver;
 import org.apache.imperius.spl.editor.tool.utils.PolicyPluginLogUtil;
 import org.apache.imperius.spl.editor.tool.utils.SPLPolicyUtil;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
 
+import antlr.ASTFactory;
 import antlr.RecognitionException;
 import antlr.collections.AST;
 
@@ -109,7 +113,21 @@
 				lexer.setFilename(fileName);
 				// Create a parser that reads from the scanner
 				SPLParser parser = new SPLParser(lexer);
-				parser.setASTNodeClass(AST_NODE_CLASS);
+				ClassLoader cl = null;
+				try
+				{
+					cl = Thread.currentThread().getContextClassLoader();
+					Thread.currentThread().setContextClassLoader(PolicyFileParser.class.getClassLoader());
+					parser.setASTNodeClass(AST_NODE_CLASS);
+				}
+				finally
+				{
+					if( cl != null )
+					{
+						Thread.currentThread().setContextClassLoader(cl);
+					}
+				}
+				
 				parser.setFilename(fileName);
 				// start parsing at the compilationUnit rule
 				parser.splpolicy();
@@ -146,7 +164,20 @@
 			return;
 		SPLTreeParser tparse = new SPLTreeParser();
 		
-		tparse.setASTNodeClass(AST_NODE_CLASS);
+		ClassLoader cl = null;
+		try
+		{
+			cl = Thread.currentThread().getContextClassLoader();
+			Thread.currentThread().setContextClassLoader(PolicyFileParser.class.getClassLoader());
+			tparse.setASTNodeClass(AST_NODE_CLASS);
+		}
+		finally
+		{
+			if( cl != null )
+			{
+				Thread.currentThread().setContextClassLoader(cl);
+			}
+		}
 		IPolicyClientFactory factory = new PolicyClientFactoryImpl();
 		IPolicyClient policyClient = null;
 		try {
@@ -163,7 +194,20 @@
 				}
 				SPLSymbolTable st=new SPLSymbolTable();
 			//	SPLPolicyUtil.loadCustomClasses(resourceFile.getProject());
-				tparse.splpolicy(t,dc,st);
+				//tparse.splpolicy(t,dc,st);
+				try
+				{
+					cl = Thread.currentThread().getContextClassLoader();
+					Thread.currentThread().setContextClassLoader(new URLClassLoader(SPLPolicyUtil.createURLs(resourceFile.getProject()),PolicyFileParser.class.getClassLoader()));
+					tparse.splpolicy(t,dc,st);
+				}
+				finally
+				{
+					if( cl != null )
+					{
+						Thread.currentThread().setContextClassLoader(cl);
+					}
+				}
 			}
 		} catch (RecognitionException e) {
 			System.err.println(e.getMessage());

Modified: incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/utils/SPLPolicyUtil.java
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/utils/SPLPolicyUtil.java?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/utils/SPLPolicyUtil.java
(original)
+++ incubator/imperius/trunk/imperius-spleditorcore/src/org/apache/imperius/spl/editor/tool/utils/SPLPolicyUtil.java
Fri Jan 18 18:58:21 2008
@@ -114,7 +114,7 @@
 			String destPath, String jarFileName) throws Exception {
 		try {
 			IJavaProject javaProj = getJavaProject(currentProject);
-			if (javaProj.isOpen()) {
+			//if (javaProj.isOpen()) {
 				destPath = destPath + File.separator + jarFileName;
 
 				// create classpath entry for the jar
@@ -133,7 +133,7 @@
 				// entries.add(classpathEntry1);
 				javaProj.setRawClasspath((IClasspathEntry[]) entries
 						.toArray(new IClasspathEntry[entries.size()]), null);
-			}
+			//}
 		} catch (Exception ex) {
 			System.out
 					.println("SPLPolicyUtil.class : Error while adding jar file to the classpath");

Modified: incubator/imperius/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/imperius/trunk/pom.xml?rev=613347&r1=613346&r2=613347&view=diff
==============================================================================
--- incubator/imperius/trunk/pom.xml (original)
+++ incubator/imperius/trunk/pom.xml Fri Jan 18 18:58:21 2008
@@ -34,13 +34,13 @@
 	<properties>
 		<imperius-version>1.0.0-SNAPSHOT</imperius-version>
 	</properties>
-	<modules>
+	<!--<modules>
 		<module>imperius-splcore</module>
 		<module>imperius-javaspl</module>
 		<module>javaspl-samples</module>
 		<module>imperius-spleditorcore</module>
 		<module>imperius-javasplextension</module>
-	</modules>
+	</modules> -->
 	
 	<build>
 		<defaultGoal>install</defaultGoal>
@@ -58,5 +58,38 @@
 			</resource>
 		</resources>
 	</build>
+	
+	<profiles>
+        <profile>
+            <id>default</id>
+
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+
+            <modules>
+               <module>imperius-splcore</module>
+               <module>imperius-javaspl</module>
+               <module>javaspl-samples</module>
+             </modules>
+        </profile>
+        <profile>
+          <id>all </id>
+          <activation>
+            <property>
+              <name>build</name>
+              <value>all</value>
+            </property>
+          </activation>
+          <modules>
+            <module>imperius-splcore</module>
+            <module>imperius-javaspl</module>
+            <module>javaspl-samples</module>
+            <module>imperius-spleditorcore</module>
+            <module>imperius-javasplextension</module>
+        </modules>
+    
+        </profile>
+  </profiles>      
 	
 </project>



Mime
View raw message