Skip to content

Commit

Permalink
- removed persistence configuration from installer and created assemb…
Browse files Browse the repository at this point in the history
…lies for console and ht for AS5

(cherry picked from commit 682702f)
  • Loading branch information
mswiderski committed Oct 15, 2012
1 parent 086f398 commit 9ae52c2
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 121 deletions.
2 changes: 1 addition & 1 deletion jbpm-distribution/src/main/assembly/gwt-console.xml
Expand Up @@ -10,7 +10,7 @@
<source>../jbpm-gwt/jbpm-gwt-console-server/target/jbpm-gwt-console-server-${project.version}-EE6.war</source>
</file>
<file>
<source>../jbpm-gwt/jbpm-gwt-console-server/target/jbpm-gwt-console-server-${project.version}.war</source>
<source>../jbpm-gwt/jbpm-gwt-console-server/target/jbpm-gwt-console-server-${project.version}-AS5.war</source>
</file>
<file>
<source>../jbpm-gwt/jbpm-gwt-console/target/jbpm-gwt-console-${project.version}.war</source>
Expand Down
2 changes: 1 addition & 1 deletion jbpm-distribution/src/main/assembly/human-task-war.xml
Expand Up @@ -10,7 +10,7 @@
<source>../jbpm-human-task/jbpm-human-task-war/target/jbpm-human-task-war-${project.version}-EE6.war</source>
</file>
<file>
<source>../jbpm-human-task/jbpm-human-task-war/target/jbpm-human-task-war-${project.version}.war</source>
<source>../jbpm-human-task/jbpm-human-task-war/target/jbpm-human-task-war-${project.version}-AS5.war</source>
</file>
</files>
</assembly>
12 changes: 12 additions & 0 deletions jbpm-gwt/jbpm-gwt-console-server/pom.xml
Expand Up @@ -140,6 +140,18 @@
</archive>
</configuration>
</execution>
<execution>
<id>as5</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/gwt-console-server-as5.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">

<!-- Note: This works on jboss-as-5.1 -->
<id>AS5</id>
<formats>
<format>war</format>
</formats>

<includeBaseDirectory>false</includeBaseDirectory>

<fileSets>
<fileSet>
<directory>${project.build.directory}/upacked-war</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>WEB-INF/classes/META-INF/persistence.xml</exclude>

<!-- possible signature info -->
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.RSA</exclude>

<!-- jars -->
<exclude>WEB-INF/lib/netty-*.jar</exclude>
<exclude>WEB-INF/lib/hornetq-*.jar</exclude>

<!-- hibernate 3 transitive deps -->
<exclude>WEB-INF/lib/hibernate*.jar</exclude>

<!-- others -->
<exclude>WEB-INF/lib/xml-apis-*.jar</exclude>
<exclude>WEB-INF/lib/ejb3-persistence-1.0.2.GA.jar</exclude>
<exclude>WEB-INF/lib/javassist-3.4.GA.jar</exclude>
<exclude>WEB-INF/lib/javassist-3.14.0-GA.jar</exclude>

</excludes>
</fileSet>
</fileSets>
<files>
<file>
<source>src/main/assembly/resources/gwt-console-server-persistence-JPA1.xml</source>
<destName>WEB-INF/classes/META-INF/persistence.xml</destName>
</file>
<file>
<source>src/main/assembly/resources/ProcessInstanceInfo.hbm.xml-JPA1.xml</source>
<destName>WEB-INF/classes/META-INF/ProcessInstanceInfo.hbm.xml</destName>
</file>
</files>

</assembly>
File renamed without changes.
12 changes: 12 additions & 0 deletions jbpm-human-task/jbpm-human-task-war/pom.xml
Expand Up @@ -153,6 +153,18 @@
</archive>
</configuration>
</execution>
<execution>
<id>as5</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/human-task-war-as5.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">

<!-- Note: This works on jboss-as-5.1 -->
<id>AS5</id>
<formats>
<format>war</format>
</formats>

<includeBaseDirectory>false</includeBaseDirectory>

<fileSets>
<fileSet>
<directory>${project.build.directory}/upacked-war</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>WEB-INF/classes/META-INF/persistence.xml</exclude>
<exclude>WEB-INF/lib/netty-*.jar</exclude>
<exclude>WEB-INF/lib/hornetq-*.jar</exclude>

<!-- possible signature info -->
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.RSA</exclude>

<!-- hibernate 3 transitive deps -->
<exclude>WEB-INF/lib/hibernate*.jar</exclude>

<!-- other -->
<exclude>WEB-INF/lib/xml-apis-*.jar</exclude>
<exclude>WEB-INF/lib/ejb3-persistence-1.0.2.GA.jar</exclude>
<exclude>WEB-INF/lib/javassist-3.4.GA.jar</exclude>
<exclude>WEB-INF/lib/javassist-3.14.0-GA.jar</exclude>

</excludes>
</fileSet>
</fileSets>
<files>
<file>
<source>src/main/assembly/resources/ht-persistence-JPA1.xml</source>
<destName>WEB-INF/classes/META-INF/persistence.xml</destName>
</file>
</files>

</assembly>
92 changes: 12 additions & 80 deletions jbpm-installer/build.xml
Expand Up @@ -393,9 +393,14 @@
<chmod perm="a+x" file="${jboss.home}/bin/standalone.sh" />
<chmod perm="a+x" file="${jboss.home}/bin/jboss-cli.sh" />
</target>

<target name="install.transport.lib" unless="jboss.version.is.7">
<get src="https://repository.jboss.org/nexus/content/groups/public/org/hornetq/hornetq-core/2.2.10.Final/hornetq-core-2.2.10.Final.jar" dest="${jboss.server.lib.dir}" />
<get src="https://repository.jboss.org/nexus/content/groups/public/org/jboss/netty/netty/3.2.0.Final/netty-3.2.0.Final.jar" dest="${jboss.server.lib.dir}" />
</target>

<!-- Install guvnor -->
<target name="install.guvnor.into.jboss" depends="download.drools.guvnor,check.jboss.version">
<target name="install.guvnor.into.jboss" depends="download.drools.guvnor,check.jboss.version" if="jboss.version.is.7">
<mkdir dir="${install.home}/target"/>
<unzip src="${install.home}/lib/guvnor-distribution-wars-${drools.guvnor.version}.war" dest="${install.home}/target" />
<copy file="${install.home}/conf/guvnor.preferences.properties"
Expand Down Expand Up @@ -466,57 +471,20 @@
tofile="${jboss.server.conf.dir}/roles.properties"
overwrite="true" />
</target>
<target name="install.jBPM-gwt-console.into.jboss5" depends="check.jboss.version" unless="jboss.version.is.7">
<target name="install.jBPM-gwt-console.into.jboss5" depends="check.jboss.version,install.transport.lib" unless="jboss.version.is.7">
<!-- download reporting -->
<antcall target="download.birt.as5" />
<!-- gwt-console -->
<mkdir dir="${install.home}/target"/>
<unzip src="${install.home}/lib/jbpm-${jBPM.version}-gwt-console.zip" dest="${install.home}/target" />
<mkdir dir="${install.home}/target/jbpm-gwt-console-server-war"/>
<unzip src="${install.home}/target/jbpm-gwt-console-server-${jBPM.version}.war"
<unzip src="${install.home}/target/jbpm-gwt-console-server-${jBPM.version}-AS5.war"
dest="${install.home}/target/jbpm-gwt-console-server-war"/>
<copy file="${install.home}/db/persistence-as5.xml"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes/META-INF/persistence.xml"
overwrite="true" />
<copy file="${install.home}/db/ProcessInstanceInfo.hbm.xml"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes/META-INF/ProcessInstanceInfo.hbm.xml"
overwrite="true" />
<!-- Fix for conflicting javassist jar -->
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/xml-apis-1.3.04.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/hibernate-annotations-3.4.0.GA.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/hibernate-commons-annotations-3.1.0.GA.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/hibernate-core-3.3.2.GA.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/hibernate-entitymanager-3.4.0.GA.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/hibernate-tools-3.2.3.GA.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/ejb3-persistence-1.0.2.GA.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/javassist-3.4.GA.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/javassist-3.14.0-GA.jar"/>
<delete>
<fileset dir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/" includes="hornetq*.jar,netty*.jar" />
</delete>
<!-- Other configuration like work item handlers -->
<copy todir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes" overwrite="true">
<fileset dir="${install.home}/conf"/>
</copy>
<!-- remove beans.xml from drools-compiler and human-task-core as it causes deployment failure on AS5 -->
<move tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/drools-compiler.jar">
<fileset dir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib">
<include name="drools-compiler-*.jar"/>
</fileset>
</move>
<zip destfile="${install.home}/target/drools-compiler.jar">
<zipfileset src="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/drools-compiler.jar" excludes="META-INF/beans.xml"/>
</zip>
<zip destfile="${install.home}/target/jbpm-human-task-core.jar">
<zipfileset src="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/jbpm-human-task-core-${jBPM.version}.jar" excludes="META-INF/beans.xml"/>
</zip>
<copy file="${install.home}/target/jbpm-human-task-core.jar"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/jbpm-human-task-core-${jBPM.version}.jar"
overwrite="true" />
<copy file="${install.home}/target/drools-compiler.jar"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/drools-compiler.jar"
overwrite="true" />
<!-- end of removing beans.xml -->

<!-- install reporting -->
<antcall target="install.reporting.into.jboss5" />
<!-- install dependencies -->
Expand Down Expand Up @@ -547,7 +515,7 @@
</target>

<!-- Install form builder -->
<target name="install.form.builder.into.jboss" depends="download.form.builder">
<target name="install.form.builder.into.jboss" depends="download.form.builder" if="jboss.version.is.7">
<mkdir dir="${install.home}/target"/>
<mkdir dir="${install.home}/target/jbpm-form-builder-war"/>
<unzip src="${install.home}/lib/jbpm-${jBPM.version}-form-builder.war" dest="${install.home}/target/jbpm-form-builder-war" />
Expand Down Expand Up @@ -590,50 +558,14 @@
</target>

<!-- Install jbpm human task war -->
<target name="install.ht.war.into.jboss5" depends="download.jBPM-ht.war" unless="jboss.version.is.7">
<target name="install.ht.war.into.jboss5" depends="download.jBPM-ht.war,install.transport.lib" unless="jboss.version.is.7">
<mkdir dir="${install.home}/target"/>
<mkdir dir="${install.home}/target/jbpm-human-task-war"/>
<unzip src="${install.home}/lib/jbpm-${jBPM.version}-human-task-war.zip" dest="${install.home}/target" />
<unzip src="${install.home}/target/jbpm-human-task-war-${jBPM.version}.war" dest="${install.home}/target/jbpm-human-task-war" />
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/xml-apis-1.3.04.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/hibernate-annotations-3.4.0.GA.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/hibernate-commons-annotations-3.1.0.GA.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/hibernate-core-3.3.2.GA.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/hibernate-entitymanager-3.4.0.GA.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/hibernate-tools-3.2.3.GA.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/ejb3-persistence-1.0.2.GA.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/javassist-3.4.GA.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/javassist-3.14.0-GA.jar"/>

<move todir="${jboss.server.lib.dir}">
<fileset dir="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/" includes="hornetq*.jar,netty*.jar" />
</move>
<unzip src="${install.home}/target/jbpm-human-task-war-${jBPM.version}-AS5.war" dest="${install.home}/target/jbpm-human-task-war" />
<copy file="${install.home}/task-service/resources/war/web.xml"
tofile="${install.home}/target/jbpm-human-task-war/WEB-INF/web.xml"
overwrite="true" />
<copy file="${install.home}/task-service/resources/war/persistence.xml"
tofile="${install.home}/target/jbpm-human-task-war/WEB-INF/classes/META-INF/persistence.xml"
overwrite="true" />
<!-- remove beans.xml from drools-compiler and human-task-core as it causes deployment failure on AS5 -->
<move tofile="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/drools-compiler.jar">
<fileset dir="${install.home}/target/jbpm-human-task-war/WEB-INF/lib">
<include name="drools-compiler-*.jar"/>
</fileset>
</move>
<zip destfile="${install.home}/target/drools-compiler.jar">
<zipfileset src="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/drools-compiler.jar" excludes="META-INF/beans.xml"/>
</zip>
<zip destfile="${install.home}/target/jbpm-human-task-core.jar">
<zipfileset src="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/jbpm-human-task-core-${jBPM.version}.jar" excludes="META-INF/beans.xml"/>
</zip>
<copy file="${install.home}/target/jbpm-human-task-core.jar"
tofile="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/jbpm-human-task-core-${jBPM.version}.jar"
overwrite="true" />
<copy file="${install.home}/target/drools-compiler.jar"
tofile="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/drools-compiler.jar"
overwrite="true" />
<!-- end of removing beans.xml -->

<zip basedir="${install.home}/target/jbpm-human-task-war"
destfile="${install.home}/target/jbpm-${jBPM.version}-human-task-war.war" />
Expand Down
39 changes: 0 additions & 39 deletions jbpm-installer/db/persistence.xml

This file was deleted.

0 comments on commit 9ae52c2

Please sign in to comment.