Skip to content

Commit

Permalink
Put some framework and libs bundles in felix.auto.deploy.dir
Browse files Browse the repository at this point in the history
in order to solve startup issues. It doesn't make sense to use file
install for these bundles because they can not be reloaded dynamically
without breaking things.

see #104
  • Loading branch information
bertfrees committed Feb 19, 2018
1 parent 059ca39 commit 9be5866
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 37 deletions.
80 changes: 52 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,12 @@
</configuration>
</execution>
<execution>
<id>copy-libs-bundles</id>
<id>copy-framework-libs-bundles</id>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/bundles/libs</outputDirectory>
<outputDirectory>${project.build.directory}/bundles/felix</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>javax.xml.crypto</groupId>
Expand Down Expand Up @@ -421,6 +421,17 @@
<groupId>com.mysql.jdbc</groupId>
<artifactId>com.springsource.com.mysql.jdbc</artifactId>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-modules-libs-bundles</id>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/bundles/libs</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
Expand Down Expand Up @@ -541,7 +552,7 @@
</configuration>
</execution>
<execution>
<id>copy-volatile-pipeline-bundles</id>
<id>copy-volatile-bundles</id>
<goals>
<goal>copy</goal>
</goals>
Expand All @@ -556,32 +567,49 @@
</configuration>
</execution>
<execution>
<id>copy-pipeline-bundles</id>
<id>copy-logging-bundles</id>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/bundles/pipeline</outputDirectory>
<outputDirectory>${project.build.directory}/bundles/felix</outputDirectory>
<!--
logging-appender and dependencies. These are framework bundles that can not be
reloaded dynamically without breaking things. These bundles also have dependencies
in copy-framework-libs-bundles which therefore need to be installed in
bundles/felix as well.
-->
<artifactItems>
<artifactItem>
<groupId>org.daisy.pipeline</groupId>
<artifactId>calabash-adapter</artifactId>
<artifactId>common-utils</artifactId>
</artifactItem>
<artifactItem>
<groupId>org.daisy.pipeline</groupId>
<artifactId>common-utils</artifactId>
<artifactId>framework-core</artifactId>
</artifactItem>
<artifactItem>
<groupId>org.daisy.pipeline</groupId>
<artifactId>framework-core</artifactId>
<artifactId>logging-appender</artifactId>
</artifactItem>
<artifactItem>
<groupId>org.daisy.pipeline</groupId>
<artifactId>logging-activator</artifactId>
<artifactId>xproc-api</artifactId>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-framework-pipeline-bundles</id>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/bundles/pipeline</outputDirectory>
<artifactItems>
<artifactItem>
<groupId>org.daisy.pipeline</groupId>
<artifactId>logging-appender</artifactId>
<artifactId>calabash-adapter</artifactId>
</artifactItem>
<artifactItem>
<groupId>org.daisy.pipeline</groupId>
Expand Down Expand Up @@ -611,15 +639,11 @@
<groupId>org.daisy.pipeline</groupId>
<artifactId>xpath-registry</artifactId>
</artifactItem>
<artifactItem>
<groupId>org.daisy.pipeline</groupId>
<artifactId>xproc-api</artifactId>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-frontend</id>
<id>copy-webservice-bundles</id>
<goals>
<goal>copy</goal>
</goals>
Expand All @@ -634,7 +658,7 @@
</configuration>
</execution>
<execution>
<id>copy-gui</id>
<id>copy-gui-bundles</id>
<goals>
<goal>copy</goal>
</goals>
Expand Down Expand Up @@ -686,7 +710,7 @@
</configuration>
</execution>
<execution>
<id>copy-pipeline-modules</id>
<id>copy-modules-pipeline-bundles</id>
<goals>
<goal>copy</goal>
</goals>
Expand Down Expand Up @@ -1107,7 +1131,7 @@
</configuration>
</execution>
<execution>
<id>copy-pipeline-modules-linux</id>
<id>copy-modules-linux-bundles</id>
<goals>
<goal>copy</goal>
</goals>
Expand All @@ -1128,7 +1152,7 @@
</configuration>
</execution>
<execution>
<id>copy-pipeline-modules-mac</id>
<id>copy-modules-mac-bundles</id>
<goals>
<goal>copy</goal>
</goals>
Expand All @@ -1149,7 +1173,7 @@
</configuration>
</execution>
<execution>
<id>copy-pipeline-modules-win</id>
<id>copy-modules-win-bundles</id>
<goals>
<goal>copy</goal>
</goals>
Expand Down Expand Up @@ -1907,7 +1931,7 @@
<java classname="net.sf.saxon.Transform">
<arg value="target/tmp/effective-pom.xml" />
<arg value="src/main/xslt/pom-to-fileinstall-config.xsl" />
<arg value="id=copy-pipeline-bundles" />
<arg value="id=copy-framework-pipeline-bundles" />
<arg value="startLevel=30" />
<arg value="dest=${project.baseUri}/target/generated-resources/etc" />
<arg value="prefix=pipeline" />
Expand All @@ -1916,7 +1940,7 @@
<java classname="net.sf.saxon.Transform">
<arg value="target/tmp/effective-pom.xml" />
<arg value="src/main/xslt/pom-to-fileinstall-config.xsl" />
<arg value="id=copy-pipeline-modules" />
<arg value="id=copy-modules-pipeline-bundles" />
<arg value="startLevel=50" />
<arg value="dest=${project.baseUri}/target/generated-resources/etc" />
<arg value="prefix=modules" />
Expand All @@ -1925,7 +1949,7 @@
<java classname="net.sf.saxon.Transform">
<arg value="target/tmp/effective-pom.xml" />
<arg value="src/main/xslt/pom-to-fileinstall-config.xsl" />
<arg value="id=copy-pipeline-modules-linux" />
<arg value="id=copy-modules-linux-bundles" />
<arg value="startLevel=50" />
<arg value="dest=${project.baseUri}/target/generated-resources/etc" />
<arg value="prefix=modules" />
Expand All @@ -1934,7 +1958,7 @@
<java classname="net.sf.saxon.Transform">
<arg value="target/tmp/effective-pom.xml" />
<arg value="src/main/xslt/pom-to-fileinstall-config.xsl" />
<arg value="id=copy-frontend" />
<arg value="id=copy-webservice-bundles" />
<arg value="startLevel=100" />
<arg value="dest=${project.baseUri}/target/generated-resources/etc/webservice" />
<arg value="prefix=frontend" />
Expand All @@ -1943,7 +1967,7 @@
<java classname="net.sf.saxon.Transform">
<arg value="target/tmp/effective-pom.xml" />
<arg value="src/main/xslt/pom-to-fileinstall-config.xsl" />
<arg value="id=copy-pipeline-modules-mac" />
<arg value="id=copy-modules-mac-bundles" />
<arg value="startLevel=50" />
<arg value="dest=${project.baseUri}/target/generated-resources/etc" />
<arg value="prefix=modules" />
Expand All @@ -1952,7 +1976,7 @@
<java classname="net.sf.saxon.Transform">
<arg value="target/tmp/effective-pom.xml" />
<arg value="src/main/xslt/pom-to-fileinstall-config.xsl" />
<arg value="id=copy-pipeline-modules-win" />
<arg value="id=copy-modules-win-bundles" />
<arg value="startLevel=50" />
<arg value="dest=${project.baseUri}/target/generated-resources/etc" />
<arg value="prefix=modules" />
Expand All @@ -1961,7 +1985,7 @@
<java classname="net.sf.saxon.Transform">
<arg value="target/tmp/effective-pom.xml" />
<arg value="src/main/xslt/pom-to-fileinstall-config.xsl" />
<arg value="id=copy-gui" />
<arg value="id=copy-gui-bundles" />
<arg value="startLevel=100" />
<arg value="dest=${project.baseUri}/target/generated-resources/etc/gui" />
<arg value="prefix=frontend" />
Expand All @@ -1970,7 +1994,7 @@
<java classname="net.sf.saxon.Transform">
<arg value="target/tmp/effective-pom.xml" />
<arg value="src/main/xslt/pom-to-fileinstall-config.xsl" />
<arg value="id=copy-volatile-pipeline-bundles" />
<arg value="id=copy-volatile-bundles" />
<arg value="startLevel=100" />
<arg value="dest=${project.baseUri}/target/generated-resources/etc/gui" />
<arg value="prefix=frontend" />
Expand Down
24 changes: 15 additions & 9 deletions src/main/xslt/pom-to-release.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,31 @@
<xsl:when test="pom:id = 'copy-felix-bundles'">
<xsl:value-of select="'system/felix'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-libs-bundles'">
<xsl:when test="pom:id = 'copy-logging-bundles'">
<xsl:value-of select="'system/felix'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-framework-libs-bundles'">
<xsl:value-of select="'system/framework'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-pipeline-bundles'">
<xsl:when test="pom:id = 'copy-framework-pipeline-bundles'">
<xsl:value-of select="'system/framework'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-frontend'">
<xsl:when test="pom:id = 'copy-webservice-bundles'">
<xsl:value-of select="'system/frontend'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-pipeline-modules'">
<xsl:when test="pom:id = 'copy-modules-libs-bundles'">
<xsl:value-of select="'system/framework'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-modules-pipeline-bundles'">
<xsl:value-of select="'modules'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-pipeline-modules-linux'">
<xsl:when test="pom:id = 'copy-modules-linux-bundles'">
<xsl:value-of select="'modules'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-pipeline-modules-mac'">
<xsl:when test="pom:id = 'copy-modules-mac-bundles'">
<xsl:value-of select="'modules'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-pipeline-modules-win'">
<xsl:when test="pom:id = 'copy-modules-win-bundles'">
<xsl:value-of select="'modules'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-persistence-libs-bundles'">
Expand All @@ -53,10 +59,10 @@
<xsl:when test="pom:id = 'copy-persistence-pipeline-bundles'">
<xsl:value-of select="'system/framework/persistence'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-volatile-pipeline-bundles'">
<xsl:when test="pom:id = 'copy-volatile-bundles'">
<xsl:value-of select="'system/framework/volatile'"/>
</xsl:when>
<xsl:when test="pom:id = 'copy-gui'">
<xsl:when test="pom:id = 'copy-gui-bundles'">
<xsl:value-of select="'system/gui'"/>
</xsl:when>
<xsl:otherwise>
Expand Down

0 comments on commit 9be5866

Please sign in to comment.