[Jpackage-commits] rpms/free/drools2 drools2-2.5-jpp-depmap.xml, NONE, 1.1.2.1 drools2-AbstractSemanticCompiler.patch, NONE, 1.1.2.1 drools2-GroovySemanticFunctionsCompiler.patch, NONE, 1.1.2.1 drools2-GroovySemanticRuleCompiler.patch, NONE, 1.1.2.1 drools2-JavaSemanticFunctionsCompiler.patch, NONE, 1.1.2.1 drools2-JavaSemanticRuleCompiler.patch, NONE, 1.1.2.1 drools2-RuleSetCompiler.patch, NONE, 1.1.2.1 drools2-project-properties.patch, NONE, 1.1.2.1 drools2.spec, NONE, 1.1.2.1 pom-maven2jpp-depcat.xsl, NONE, 1.1.2.1 pom-maven2jpp-mapdeps.xsl, NONE, 1.1.2.1 pom-maven2jpp-newdepmap.xsl, NONE, 1.1.2.1

jpackage jpackage at ryu.zarb.org
Sun Feb 1 19:55:27 CET 2009


Update of /home/projects/jpackage/cvs/rpms/free/drools2
In directory ryu.zarb.org:/tmp/8NZKsCbtpD/rpms/free/drools2

Added Files:
      Tag: JPACKAGE-5_0
	drools2-2.5-jpp-depmap.xml 
	drools2-AbstractSemanticCompiler.patch 
	drools2-GroovySemanticFunctionsCompiler.patch 
	drools2-GroovySemanticRuleCompiler.patch 
	drools2-JavaSemanticFunctionsCompiler.patch 
	drools2-JavaSemanticRuleCompiler.patch 
	drools2-RuleSetCompiler.patch drools2-project-properties.patch 
	drools2.spec pom-maven2jpp-depcat.xsl 
	pom-maven2jpp-mapdeps.xsl pom-maven2jpp-newdepmap.xsl 
Log Message:
2.5-1.jpp5

--- NEW FILE: pom-maven2jpp-depcat.xsl ---
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="*[name() != 'dependencies']|*/text()">
     <xsl:apply-templates/>
 </xsl:template>
 <xsl:template match="//dependencies">
  <xsl:for-each select="./dependency">
   <xsl:element name="dependency">
    <xsl:element name="maven">
     <xsl:choose>
      <xsl:when test="./groupId">
       <xsl:copy-of select="./groupId"/>
       <xsl:copy-of select="./artifactId"/>
      </xsl:when>
      <xsl:when test="./id">
       <xsl:choose>
        <xsl:when test="substring-before(./id/text(),':') != ''">
         <xsl:element name="groupId">
          <xsl:value-of select="substring-before(./id/text(),':')"/>
         </xsl:element>
         <xsl:element name="artifactId">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:element>
        </xsl:when>
        <xsl:otherwise>
         <xsl:element name="groupId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
         <xsl:element name="artifactId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
ERROR
      </xsl:otherwise>
     </xsl:choose>
     <xsl:for-each select="./*">
      <xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
       <xsl:copy-of select="."/>
      </xsl:if>
     </xsl:for-each>
    </xsl:element>
    <xsl:element name="jpp">
     <xsl:element name="groupId">JPP</xsl:element>
     <xsl:choose>
      <xsl:when test="./artifactId">
       <xsl:copy-of select="./artifactId"/>
      </xsl:when>
      <xsl:when test="./id">
       <xsl:choose>
        <xsl:when test="substring-after(./id/text(),':') != ''">
         <xsl:element name="artifactId">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:element>
        </xsl:when>
        <xsl:otherwise>
         <xsl:element name="artifactId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
ERROR
      </xsl:otherwise>
     </xsl:choose>
     <xsl:element name="jar">
      <xsl:choose>
       <xsl:when test="./artifactId">
        <xsl:value-of select="./artifactId/text()"/>
       </xsl:when>
       <xsl:when test="./id">
        <xsl:choose>
         <xsl:when test="substring-after(./id/text(),':') != ''">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:when>
         <xsl:otherwise>
          <xsl:value-of select="./id/text()"/>
         </xsl:otherwise>
        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
ERROR
       </xsl:otherwise>
      </xsl:choose>
      <xsl:choose>
       <xsl:when test="./type">
        <xsl:choose>
         <xsl:when test="./type/text() = 'plugin'">.jar</xsl:when>
         <xsl:otherwise>.<xsl:value-of select="./type/text()"/></xsl:otherwise>
        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>.jar</xsl:otherwise>
      </xsl:choose>
     </xsl:element>
     <xsl:for-each select="./*">
      <xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
       <xsl:copy-of select="."/>
      </xsl:if>
     </xsl:for-each>
    </xsl:element>
   </xsl:element>
  </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>

--- NEW FILE: drools2-GroovySemanticRuleCompiler.patch ---
--- drools-groovy/src/main/org/drools/semantics/groovy/GroovySemanticRuleCompiler.java.sav	2008-09-28 13:10:18.000000000 +0200
+++ drools-groovy/src/main/org/drools/semantics/groovy/GroovySemanticRuleCompiler.java	2008-09-28 13:11:10.000000000 +0200
@@ -14,7 +14,7 @@
         if ( GroovySemanticRuleCompiler.INSTANCE == null )
         {
             GroovySemanticRuleCompiler.INSTANCE = new GroovySemanticRuleCompiler( "groovy",
-                                                                                  JavaCompilerFactory.getInstance().createCompiler( JavaCompilerFactory.GROOVY ) );
+                                                                                  JavaCompilerFactory.getInstance().createCompiler( "groovy" ) );
         }
         return GroovySemanticRuleCompiler.INSTANCE;
     }

--- NEW FILE: drools2-JavaSemanticFunctionsCompiler.patch ---
--- drools-java/src/main/org/drools/semantics/java/JavaSemanticFunctionsCompiler.java.sav	2008-09-28 12:55:10.000000000 +0200
+++ drools-java/src/main/org/drools/semantics/java/JavaSemanticFunctionsCompiler.java	2008-09-28 12:55:41.000000000 +0200
@@ -25,7 +25,7 @@
         if ( JavaSemanticFunctionsCompiler.INSTANCE == null )
         {
             JavaSemanticFunctionsCompiler.INSTANCE = new JavaSemanticFunctionsCompiler( "java",
-                                                                                        JavaCompilerFactory.getInstance().createCompiler( JavaCompilerFactory.ECLIPSE ) );
+                                                                                        JavaCompilerFactory.getInstance().createCompiler( "eclipse" ) );
         }
         return JavaSemanticFunctionsCompiler.INSTANCE;
     }

--- NEW FILE: drools2-RuleSetCompiler.patch ---
--- drools-smf/src/main/org/drools/smf/RuleSetCompiler.java.sav	2008-09-28 12:22:35.000000000 +0200
+++ drools-smf/src/main/org/drools/smf/RuleSetCompiler.java	2008-09-28 12:23:15.000000000 +0200
@@ -90,7 +90,7 @@
         Jarer jarer = new Jarer( output );
         for ( int i = 0; i < files.length; i++ )
         {
-            jarer.addCharArray( this.src.getContent( files[i] ),
+            jarer.addByteArray( this.src.getBytes( files[i] ),
                                 files[i] );
         }
         jarer.close();

--- NEW FILE: drools2-2.5-jpp-depmap.xml ---
<?xml version="1.0" encoding="utf-8"?>
<depset>
   <dependency>
      <maven>
         <groupId>antlr</groupId>
         <artifactId>antlr</artifactId>
         <version>2.7.5</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>antlr</artifactId>
         <jar>antlr.jar</jar>
         <version>2.7.5</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>asm</groupId>
         <artifactId>asm</artifactId>
         <version>1.5.3</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>asm</artifactId>
         <jar>asm/asm.jar</jar>
         <version>1.5.3</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>cglib</groupId>
         <artifactId>cglib</artifactId>
         <version>2.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>cglib</artifactId>
         <jar>cglib.jar</jar>
         <version>2.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>commons-logging</groupId>
         <artifactId>commons-logging</artifactId>
         <version>1.0.4</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-logging</artifactId>
         <jar>commons-logging.jar</jar>
         <version>1.0.4</version>
      </jpp>
   </dependency>
<!--
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-base</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-base</artifactId>
         <jar>drools-base.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-core</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-core</artifactId>
         <jar>drools-core.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-decisiontables</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-decisiontables</artifactId>
         <jar>drools-decisiontables.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-groovy</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-groovy</artifactId>
         <jar>drools-groovy.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-io</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-io</artifactId>
         <jar>drools-io.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-java</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-java</artifactId>
         <jar>drools-java.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-jsr94</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-jsr94</artifactId>
         <jar>drools-jsr94.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-python</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-python</artifactId>
         <jar>drools-python.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-smf</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-smf</artifactId>
         <jar>drools-smf.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-smftest</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-smftest</artifactId>
         <jar>drools-smftest.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-spring</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-spring</artifactId>
         <jar>drools-spring.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>drools</groupId>
         <artifactId>drools-spring-jdk5</artifactId>
         <version>${pom.currentVersion}</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>drools-spring-jdk5</artifactId>
         <jar>drools-spring-jdk5.jar</jar>
         <version>${pom.currentVersion}</version>
      </jpp>
   </dependency>
-->
   <dependency>
      <maven>
         <groupId>easymock</groupId>
         <artifactId>easymock</artifactId>
         <version>1.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>easymock</artifactId>
         <jar>easymock-java5.jar</jar>
         <version>1.2</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>easymock</groupId>
         <artifactId>easymockclassextension</artifactId>
         <version>1.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>easymockclassextension</artifactId>
         <jar>easymock-classextension.jar</jar>
         <version>1.2</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>easymock</groupId>
         <artifactId>easymockcontainer</artifactId>
         <version>1.0.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>easymockcontainer</artifactId>
         <jar>easymockcontainer.jar</jar>
         <version>1.0.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>easymock</groupId>
         <artifactId>easymockcontainer-jdk5</artifactId>
         <version>1.3</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>easymockcontainer-jdk5</artifactId>
         <jar>easymockcontainer-jdk5.jar</jar>
         <version>1.3</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>jgoodies</groupId>
         <artifactId>forms</artifactId>
         <version>1.0.4</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>forms</artifactId>
         <jar>forms.jar</jar>
         <version>1.0.4</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>foxtrot</groupId>
         <artifactId>foxtrot</artifactId>
         <version>2.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>foxtrot</artifactId>
         <jar>foxtrot.jar</jar>
         <version>2.0</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>groovy</groupId>
         <artifactId>groovy-all</artifactId>
         <version>1.0-jsr-04</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>groovy-all</artifactId>
         <jar>groovy-jsr-all.jar</jar>
         <version>1.0-jsr-04</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>janino</groupId>
         <artifactId>janino</artifactId>
         <version>2.3.15</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>janino</artifactId>
         <jar>janino.jar</jar>
         <version>2.3.15</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>commons-jci</groupId>
         <artifactId>jci</artifactId>
         <version>SNAPSHOT20051110</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>jci</artifactId>
         <jar>commons-jci-core.jar</jar>
         <version>1.0</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>eclipse</groupId>
         <artifactId>jdtcore</artifactId>
         <version>3.1.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>jdtcore</artifactId>
         <jar>ecj.jar</jar>
         <version>3.3.1.1</version>
      </jpp>
   </dependency>
<!--
   <dependency>
      <maven>
         <groupId>jsr94</groupId>
         <artifactId>jsr94</artifactId>
         <version>1.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>jsr94</artifactId>
         <jar>jsr94.jar</jar>
         <version>1.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>jsr94</groupId>
         <artifactId>jsr94-sigtest</artifactId>
         <version>1.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>jsr94-sigtest</artifactId>
         <jar>jsr94-sigtest.jar</jar>
         <version>1.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>jsr94</groupId>
         <artifactId>jsr94-tck</artifactId>
         <version>1.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>jsr94-tck</artifactId>
         <jar>jsr94-tck.jar</jar>
         <version>1.1</version>
      </jpp>
   </dependency>
-->
   <dependency>
      <maven>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>junit</artifactId>
         <jar>junit.jar</jar>
         <version>3.8.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>jython</groupId>
         <artifactId>jython</artifactId>
         <version>20020827-no-oro</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>jython</artifactId>
         <jar>jython.jar</jar>
         <version>2.2</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>poi</groupId>
         <artifactId>poi</artifactId>
         <version>2.5.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>poi</artifactId>
         <jar>poi.jar</jar>
         <version>2.5.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>simple-jndi</groupId>
         <artifactId>simple-jndi</artifactId>
         <version>0.9.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>simple-jndi</artifactId>
         <jar>simple-jndi.jar</jar>
         <version>0.9.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>springframework</groupId>
         <artifactId>spring-beans</artifactId>
         <version>1.2.2</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>spring-beans</artifactId>
         <jar>spring/beans.jar</jar>
         <version>1.2.9</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>springframework</groupId>
         <artifactId>spring-context</artifactId>
         <version>1.2.2</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>spring-context</artifactId>
         <jar>spring/context.jar</jar>
         <version>1.2.9</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>springframework</groupId>
         <artifactId>spring-core</artifactId>
         <version>1.2.2</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>spring-core</artifactId>
         <jar>spring/core.jar</jar>
         <version>1.2.9</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>xerces</groupId>
         <artifactId>xercesImpl</artifactId>
         <version>2.7.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>xercesImpl</artifactId>
         <jar>xerces-j2.jar</jar>
         <version>2.9.0</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>xml-apis</groupId>
         <artifactId>xml-apis</artifactId>
         <version>2.0.2</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>xml-apis</artifactId>
         <jar>xml-commons-jaxp-1.3-apis.jar</jar>
         <version>1.3.03</version>
      </jpp>
   </dependency>
</depset>

--- NEW FILE: drools2-project-properties.patch ---
--- project.properties.sav0	2005-11-26 06:33:44.000000000 +0100
+++ project.properties	2008-09-28 14:08:55.000000000 +0200
@@ -23,7 +23,7 @@
 maven.jar.jsr94-sigtest=${basedir}/../lib/sigtest-1.1.jar
 maven.jar.easymockcontainer-jdk5=${basedir}/../lib/easymockcontainer-jdk5-1.3.jar
 maven.jar.easymockcontainer=${basedir}/../lib/easymockcontainer-1.0.1.jar
-maven.jar.jci=${basedir}/../lib/commons-jci-SNAPSHOT20051110.jar
+#maven.jar.jci=${basedir}/../lib/commons-jci-SNAPSHOT20051110.jar
 
 maven.jar.drools-base=${basedir}/../target/drools-base-${pom.currentVersion}.jar
 maven.jar.drools-core=${basedir}/../target/drools-core-${pom.currentVersion}.jar
@@ -69,8 +69,8 @@
     -group "Drools-Groovy Packages" "org.drools.semantics.groovy*" \
     -group "Drools-Java Packages" "org.drools.semantics.java*" \
     -group "Drools-JSR94 Packages" "org.drools.jsr94*" \
-    -group "Drools-Decision Tables" "org.drools.decisiontable*"
-    -group "Drools-Spring" "org.drools.spring*"
+    -group "Drools-Decision Tables" "org.drools.decisiontable*" \
+    -group "Drools-Spring" "org.drools.spring*" \
     -group "Drools-Examples Packages" "org.drools.examples*" \
 
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

--- NEW FILE: pom-maven2jpp-newdepmap.xsl ---
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:saxon="http://icl.com/saxon"
	extension-element-prefixes="saxon">
 <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="/" >
  <xsl:element name="depset">
   <saxon:group select="//dependency" group-by="./maven/artifactId">
    <xsl:sort select="./maven/artifactId"/>
    <xsl:element name="dependency">
     <xsl:element name="maven">
      <xsl:copy-of select="./maven/*[name() != 'properties']"/>
     </xsl:element>
     <xsl:element name="jpp">
      <xsl:copy-of select="./jpp/*[name() != 'properties']"/>
     </xsl:element>
    </xsl:element>
    <saxon:item/>
   </saxon:group>
  </xsl:element>
 </xsl:template>
</xsl:stylesheet>

--- NEW FILE: drools2-GroovySemanticFunctionsCompiler.patch ---
--- drools-groovy/src/main/org/drools/semantics/groovy/GroovySemanticFunctionsCompiler.java.sav	2008-09-28 13:10:02.000000000 +0200
+++ drools-groovy/src/main/org/drools/semantics/groovy/GroovySemanticFunctionsCompiler.java	2008-09-28 13:10:56.000000000 +0200
@@ -14,7 +14,7 @@
         if ( GroovySemanticFunctionsCompiler.INSTANCE == null ) 
         {
             GroovySemanticFunctionsCompiler.INSTANCE = new GroovySemanticFunctionsCompiler( "groovy", 
-                                                                                            JavaCompilerFactory.getInstance().createCompiler( JavaCompilerFactory.GROOVY ) );
+                                                                                            JavaCompilerFactory.getInstance().createCompiler( "groovy" ) );
         }
         return GroovySemanticFunctionsCompiler.INSTANCE;
     }

--- NEW FILE: drools2-AbstractSemanticCompiler.patch ---
--- drools-java/src/main/org/drools/semantics/java/AbstractSemanticCompiler.java.sav2	2006-03-01 08:09:46.000000000 +0100
+++ drools-java/src/main/org/drools/semantics/java/AbstractSemanticCompiler.java	2008-09-28 12:48:40.000000000 +0200
@@ -38,8 +38,9 @@
                              final char[] text) throws IOException {
         if ( src instanceof MemoryResourceReader ) {
             MemoryResourceReader memorySrc = (MemoryResourceReader) src;
-            memorySrc.addFile( name,
-                               text );
+            byte[] btext = (new String(text)).getBytes();
+            memorySrc.add( name,
+                           btext );
         }
     }
 

--- NEW FILE: drools2-JavaSemanticRuleCompiler.patch ---
--- drools-java/src/main/org/drools/semantics/java/JavaSemanticRuleCompiler.java.sav	2008-09-28 13:00:09.000000000 +0200
+++ drools-java/src/main/org/drools/semantics/java/JavaSemanticRuleCompiler.java	2008-09-28 13:00:22.000000000 +0200
@@ -35,7 +35,7 @@
         if ( JavaSemanticRuleCompiler.INSTANCE == null )
         {
             JavaSemanticRuleCompiler.INSTANCE = new JavaSemanticRuleCompiler( "java",
-                                                                              JavaCompilerFactory.getInstance().createCompiler( JavaCompilerFactory.ECLIPSE ) );
+                                                                              JavaCompilerFactory.getInstance().createCompiler( "eclipse" ) );
         }
         return JavaSemanticRuleCompiler.INSTANCE;
     }

--- NEW FILE: drools2.spec ---
# Copyright (c) 2000-2009, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define section   free
%define oname     drools
%define namedversion     2.5-final

Name:           drools2
Version:        2.5
Release:        1%{dist}
Epoch:          0
Summary:        Drools Rules Engine (Legacy)

Group:          Development/Libraries/Java
License:        BSD
URL:            http://legacy.drools.codehaus.org/
Source0:        http://dist.codehaus.org/drools/distributions/drools-2.5-final-src.tar.gz

Source1:        pom-maven2jpp-depcat.xsl
Source2:        pom-maven2jpp-newdepmap.xsl
Source3:        pom-maven2jpp-mapdeps.xsl
Source4:        drools2-2.5-jpp-depmap.xml

Patch0:         %{name}-project-properties.patch
Patch1:         %{name}-RuleSetCompiler.patch
Patch2:         %{name}-AbstractSemanticCompiler.patch
Patch3:         %{name}-JavaSemanticFunctionsCompiler.patch
Patch4:         %{name}-JavaSemanticRuleCompiler.patch
Patch5:         %{name}-GroovySemanticFunctionsCompiler.patch
Patch6:         %{name}-GroovySemanticRuleCompiler.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  maven >= 0:1.1
BuildRequires:  maven-plugins-base
BuildRequires:  maven-plugin-changelog
BuildRequires:  maven-plugin-checkstyle
BuildRequires:  checkstyle = 0:4.3
BuildRequires:  checkstyle-optional = 0:4.3
BuildRequires:  maven-plugin-developer-activity
BuildRequires:  maven-plugin-file-activity
BuildRequires:  maven-plugin-html2xdoc
BuildRequires:  maven-plugin-jdepend
BuildRequires:  maven-plugin-jxr
BuildRequires:  maven-plugin-license
BuildRequires:  maven-plugin-multiproject
BuildRequires:  maven-plugin-pmd
BuildRequires:  maven-plugin-test
BuildRequires:  maven-plugin-war
BuildRequires:  maven-plugin-xdoc
BuildRequires:  saxon
BuildRequires:  saxon-scripts
#
BuildRequires:  easymock-java5
BuildRequires:  easymock-classextension

#
BuildRequires:  antlr
BuildRequires:  asm
BuildRequires:  cglib
BuildRequires:  jakarta-commons-jci
BuildRequires:  jakarta-commons-logging
BuildRequires:  ecj
BuildRequires:  groovy-jsr
BuildRequires:  janino
BuildRequires:  jython
BuildRequires:  jakarta-poi
BuildRequires:  spring-beans
BuildRequires:  spring-context
BuildRequires:  spring-core
BuildRequires:  xerces-j2
BuildRequires:  xml-commons-jaxp-1.3-apis

Requires:  java >= 0:1.5.0
Requires:  antlr
Requires:  asm
Requires:  cglib
Requires:  jakarta-commons-jci
Requires:  jakarta-commons-logging
Requires:  ecj
Requires:  groovy-jsr
Requires:  janino
Requires:  jython
Requires:  jakarta-poi
Requires:  spring-beans
Requires:  spring-context
Requires:  spring-core
Requires:  xerces-j2
Requires:  xml-commons-jaxp-1.3-apis

Requires(post):   jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5

%description
Drools is a Rules Engine implementation based on Charles 
Forgy's Rete algorithm tailored for the Java language. 
Adapting Rete to an object-oriented interface allows for 
more natural expression of business rules with regards to 
business objects. Drools is written in Java, but able to run
on Java and .Net.
Drools is designed to allow pluggeable language 
implementations. Currently rules can be written in Java, 
Python and Groovy. More importantly, Drools provides for 
Declarative Programming and is flexible enough to match the
semantics of your problem domain with Domain Specific 
Languages (DSL) via XML using a Schema defined for your 
problem domain. DSLs consist of XML elements and attributes
that represent the problem domain.

Drools is now a JBoss JEMS product.

%package        javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation

%description    javadoc
%{summary}.

%prep
%setup -q -n %{oname}-%{version}-final
chmod -R go=u-w *
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done
mv lib/easymockcontainer-1.0.1.jar.no lib/easymockcontainer-1.0.1.jar
mv lib/easymockcontainer-jdk5-1.3.jar.no lib/easymockcontainer-jdk5-1.3.jar

export DEPCAT=$(pwd)/drools2-2.5-depcat.new.xml
echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT
echo '<depset>' >> $DEPCAT
for p in $(find . -name project.xml); do
    pushd $(dirname $p)
    /usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT
    popd
done
echo >> $DEPCAT
echo '</depset>' >> $DEPCAT
/usr/bin/saxon $DEPCAT %{SOURCE2} > drools2-2.5-depmap.new.xml

for p in $(find . -name pom.xml); do
	sed -i -e 's/beta-1/final/' $p
done
%patch0 -b .sav0
%patch1 -b .sav1
%patch2 -b .sav2
%patch3 -b .sav3
%patch4 -b .sav4
%patch5 -b .sav5
%patch6 -b .sav6

%build
for p in $(find . -name project.xml); do
    pushd $(dirname $p)
    cp project.xml project.xml.orig
    /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4}
    popd
done

export MAVEN_HOME_LOCAL=$(pwd)/.maven

maven -e \
        -Dmaven.repo.remote=file:/usr/share/maven/repository \
        -Dmaven.home.local=$MAVEN_HOME_LOCAL \
        -Dmaven.multiproject.excludes="drools-core-3.0/**,drools*examples/**,drools-jsr94/**" \
        drools:default drools:javadoc-standard

%install
rm -rf $RPM_BUILD_ROOT
install -dm 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms

install -m 644 target/%{oname}-all-jdk5-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-all-%{version}.jar
install -m 644 target/%{oname}-base-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/base-%{version}.jar
install -m 644 target/%{oname}-core-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/core-%{version}.jar
#install -m 644 target/%{oname}-core-3.0-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/core-3.0-%{version}.jar
install -m 644 target/%{oname}-decisiontables-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/decisiontables-%{version}.jar
install -m 644 target/%{oname}-groovy-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/groovy-%{version}.jar
install -m 644 target/%{oname}-io-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/io-%{version}.jar
install -m 644 target/%{oname}-java-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/java-%{version}.jar
#install -m 644 target/%{oname}-jsr94-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/jsr94-%{version}.jar
install -m 644 target/%{oname}-python-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/python-%{version}.jar
install -m 644 target/%{oname}-smf-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/smf-%{version}.jar
install -m 644 target/%{oname}-smftest-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/smftest-%{version}.jar
install -m 644 target/%{oname}-spring-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/spring-%{version}.jar
install -m 644 target/%{oname}-spring-jdk5-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/spring-jdk5-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-drools.pom
%add_to_maven_depmap org.drools drools %{namedversion} JPP/%{name} drools
install -m 644 drools-base/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-base.pom
%add_to_maven_depmap org.drools drools-base %{namedversion} JPP/%{name} base
install -m 644 drools-core/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-core.pom
%add_to_maven_depmap org.drools drools-core %{namedversion} JPP/%{name} core
install -m 644 drools-groovy/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-groovy.pom
%add_to_maven_depmap org.drools drools-groovy %{namedversion} JPP/%{name} groovy
install -m 644 drools-io/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-io.pom
%add_to_maven_depmap org.drools drools-io %{namedversion} JPP/%{name} io
install -m 644 drools-java/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-java.pom
%add_to_maven_depmap org.drools drools-java %{namedversion} JPP/%{name} java
install -m 644 drools-python/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-python.pom
%add_to_maven_depmap org.drools drools-python %{namedversion} JPP/%{name} python
install -m 644 drools-smf/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-smf.pom
%add_to_maven_depmap org.drools drools-smf %{namedversion} JPP/%{name} smf
install -m 644 drools-smftest/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-smftest.pom
%add_to_maven_depmap org.drools drools-smftest %{namedversion} JPP/%{name} smftest

# javadoc
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/*.jar
%{_javadir}/*.jar
%doc {LICENSE,README}.txt
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*

%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}

%changelog
* Wed Jan 21 2009 Ralph Apel <r.apel at r-apel.de> - 0:2.5-1.jpp5
- First release


--- NEW FILE: pom-maven2jpp-mapdeps.xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:param name="map" /> 
 <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="/project" >
  <xsl:element name="project">
   <xsl:copy-of select="child::*[not(self::dependencies)]"/>
   <xsl:if test="not(./dependencies)">
    <xsl:element name="dependencies">
     <xsl:for-each select="document($map)//add/dependency">
       <xsl:copy-of select="."/>
     </xsl:for-each>
    </xsl:element>
   </xsl:if>
   <xsl:apply-templates select="dependencies"/>
  </xsl:element>
 </xsl:template>
 <xsl:template match="dependencies" >
  <xsl:element name="dependencies">
   <xsl:for-each select="dependency">
    <xsl:if test="./artifactId">
     <xsl:call-template name="replace">
      <xsl:with-param name="artifact" select="./artifactId/text()"/>
     </xsl:call-template>
    </xsl:if>
    <xsl:if test="./id">
     <xsl:choose>
      <xsl:when test="substring-after(./id/text(),':') != ''">
       <xsl:call-template name="replace">
        <xsl:with-param name="artifact" select="substring-after(./id/text(),':')"/>
       </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
       <xsl:call-template name="replace">
        <xsl:with-param name="artifact" select="./id/text()"/>
       </xsl:call-template>
      </xsl:otherwise>
     </xsl:choose>
    </xsl:if>
   </xsl:for-each>
   <xsl:for-each select="document($map)//add/dependency">
    <xsl:copy-of select="."/>
   </xsl:for-each>
  </xsl:element>
 </xsl:template>
 <xsl:template name="replace">
  <xsl:param name="artifact"/>
  <xsl:variable name="this" select="."/>
   <xsl:choose>
    <xsl:when test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
     <xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
      <xsl:if test="../jpp">
       <xsl:element name="dependency">
        <xsl:copy-of select="../jpp/*"/>
        <xsl:copy-of select="$this/properties"/>
       </xsl:element>
      </xsl:if>
     </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
     <xsl:element name="dependency">
      <xsl:copy-of select="./*"/>
     </xsl:element>
    </xsl:otherwise>
   </xsl:choose>
  <xsl:if test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
   <xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
    <xsl:for-each select="../add/dependency">
     <xsl:element name="dependency">
      <xsl:copy-of select="./*"/>
      <xsl:copy-of select="$this/properties"/>
     </xsl:element>
    </xsl:for-each>
   </xsl:for-each>
  </xsl:if>
 </xsl:template>
</xsl:stylesheet>




More information about the JPackage-commits mailing list