Skip to content

Commit

Permalink
Replace patched pax-web-jar with dynamic patching. (openhab#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvanherbergen authored and kaikreuzer committed Sep 25, 2016
1 parent 5f41771 commit cd7bda8
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 32 deletions.
44 changes: 37 additions & 7 deletions distributions/openhab-offline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,27 @@
<type>xml</type>
<scope>runtime</scope>
</dependency>
<!-- Temporary patch for https://github.com/openhab/openhab-distro/issues/10 -->
<dependency>
<groupId>org.openhab.distro.deps</groupId>
<artifactId>pax-web-jetty</artifactId>
<version>4.2.4</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<dependencies>
<dependency>
<groupId>org.openhab.util</groupId>
<artifactId>pax-web-patch</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>

<resources>
<!-- add shared distribution resources -->
<resource>
Expand Down Expand Up @@ -138,6 +149,25 @@
<archiveTarGz>false</archiveTarGz>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.openhab.patch.ClassPathUtilPatcher</mainClass>
<arguments>
<argument>${project.basedir}/target/assembly/system/org/ops4j/pax/web/pax-web-api</argument>
</arguments>
<includePluginDependencies>True</includePluginDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@
<include>lib/**</include>
<include>system/**</include>
</includes>
<excludes>
<exclude>system/**/pax-web-jetty*.jar</exclude>
</excludes>
</fileSet>

<!-- KARAF_DATA -->
Expand Down Expand Up @@ -95,12 +92,6 @@
<outputDirectory></outputDirectory>
<fileMode>0644</fileMode>
<lineEnding>windows</lineEnding>
</file>
<!-- add patch for https://github.com/openhab/openhab-distro/issues/10 -->
<file>
<source>target/assembly/system/org/openhab/distro/deps/pax-web-jetty/4.2.4/pax-web-jetty-4.2.4.jar</source>
<outputDirectory>runtime/karaf/system/org/ops4j/pax/web/pax-web-jetty/4.2.4/</outputDirectory>
<destName>pax-web-jetty-4.2.4.jar</destName>
</file>
</files>

Expand Down
44 changes: 37 additions & 7 deletions distributions/openhab-online/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,27 @@
<type>xml</type>
<scope>runtime</scope>
</dependency>
<!-- Temporary patch for https://github.com/openhab/openhab-distro/issues/10 -->
<dependency>
<groupId>org.openhab.distro.deps</groupId>
<artifactId>pax-web-jetty</artifactId>
<version>4.2.4</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<dependencies>
<dependency>
<groupId>org.openhab.util</groupId>
<artifactId>pax-web-patch</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>

<resources>
<!-- add shared distribution resources -->
<resource>
Expand Down Expand Up @@ -131,6 +142,25 @@
<archiveTarGz>false</archiveTarGz>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.openhab.patch.ClassPathUtilPatcher</mainClass>
<arguments>
<argument>${project.basedir}/target/assembly/system/org/ops4j/pax/web/pax-web-api</argument>
</arguments>
<includePluginDependencies>True</includePluginDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
9 changes: 0 additions & 9 deletions distributions/openhab-online/src/main/descriptors/archive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@
<include>lib/**</include>
<include>system/**</include>
</includes>
<excludes>
<exclude>pax-web-jetty*.jar</exclude>
</excludes>
</fileSet>

<!-- KARAF_DATA -->
Expand Down Expand Up @@ -96,12 +93,6 @@
<fileMode>0644</fileMode>
<lineEnding>windows</lineEnding>
</file>
<!-- add patch for https://github.com/openhab/openhab-distro/issues/10 -->
<file>
<source>target/assembly/system/org/openhab/distro/deps/pax-web-jetty/4.2.4/pax-web-jetty-4.2.4.jar</source>
<outputDirectory>runtime/karaf/system/org/ops4j/pax/web/pax-web-jetty/4.2.4/</outputDirectory>
<destName>pax-web-jetty-4.2.4.jar</destName>
</file>
</files>

</assembly>
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,21 @@
</plugins>
</build>

<pluginRepositories>
<pluginRepository>
<id>openhab-bintray</id>
<name>Bintray Repository for openHAB</name>
<url>https://dl.bintray.com/openhab/mvn/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

<repositories>
<!-- ESH releases -->
<repository>
Expand Down

0 comments on commit cd7bda8

Please sign in to comment.