You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/10/24 08:46:14 UTC

[plc4x] branch feature/fix-karaf-feature-release-signing created (now d43e971)

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a change to branch feature/fix-karaf-feature-release-signing
in repository https://gitbox.apache.org/repos/asf/plc4x.git.


      at d43e971  Fixed a problem causing the karaf feature module not to sign the feature.xml artifact causing problems during a release.

This branch includes the following new commits:

     new d43e971  Fixed a problem causing the karaf feature module not to sign the feature.xml artifact causing problems during a release.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[plc4x] 01/01: Fixed a problem causing the karaf feature module not to sign the feature.xml artifact causing problems during a release.

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/fix-karaf-feature-release-signing
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit d43e9717c24a727d2d24cb550ac044603f9c01b9
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Oct 24 10:45:57 2019 +0200

    Fixed a problem causing the karaf feature module not to sign the feature.xml artifact causing problems during a release.
---
 plc4j/karaf-features/pom.xml    | 25 -------------
 plc4j/karaf-features/s7/pom.xml | 83 +++++++++++++++++++++++++++++++++--------
 2 files changed, 68 insertions(+), 40 deletions(-)

diff --git a/plc4j/karaf-features/pom.xml b/plc4j/karaf-features/pom.xml
index f55df3f..8e71be4 100644
--- a/plc4j/karaf-features/pom.xml
+++ b/plc4j/karaf-features/pom.xml
@@ -61,14 +61,6 @@
   </dependencyManagement>
 
   <build>
-    <resources>
-      <resource>
-        <directory>src/main/feature</directory>
-        <filtering>true</filtering>
-        <targetPath>${project.build.directory}/feature</targetPath>
-      </resource>
-    </resources>
-
     <pluginManagement>
       <plugins>
         <plugin>
@@ -81,23 +73,6 @@
     </pluginManagement>
 
     <plugins>
-      <plugin>
-        <groupId>org.apache.karaf.tooling</groupId>
-        <artifactId>karaf-maven-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>resources</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
       <!-- No checking needed here -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
diff --git a/plc4j/karaf-features/s7/pom.xml b/plc4j/karaf-features/s7/pom.xml
index b263f0a..6a6cb73 100644
--- a/plc4j/karaf-features/s7/pom.xml
+++ b/plc4j/karaf-features/s7/pom.xml
@@ -21,29 +21,82 @@
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <artifactId>karaf-features</artifactId>
     <groupId>org.apache.plc4x</groupId>
+    <artifactId>karaf-features</artifactId>
     <version>0.6.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>driver-s7-feature</artifactId>
-  <packaging>feature</packaging>
+  <packaging>pom</packaging>
 
   <name>PLC4J: Karaf-Features: S7</name>
 
   <!-- This would be necessary with the kar goal which works not fine, yet -->
-<!--  <dependencies>-->
-<!--    <dependency>-->
-<!--      <groupId>org.apache.plc4x</groupId>-->
-<!--      <artifactId>plc4j-driver-s7</artifactId>-->
-<!--      <version>${project.version}</version>-->
-<!--      <exclusions>-->
-<!--        <exclusion>-->
-<!--          <groupId>org.slf4j</groupId>-->
-<!--          <artifactId>slf4j-api</artifactId>-->
-<!--        </exclusion>-->
-<!--      </exclusions>-->
-<!--    </dependency>-->
-<!--  </dependencies>-->
+  <!--  <dependencies>-->
+  <!--    <dependency>-->
+  <!--      <groupId>org.apache.plc4x</groupId>-->
+  <!--      <artifactId>plc4j-driver-s7</artifactId>-->
+  <!--      <version>${project.version}</version>-->
+  <!--      <exclusions>-->
+  <!--        <exclusion>-->
+  <!--          <groupId>org.slf4j</groupId>-->
+  <!--          <artifactId>slf4j-api</artifactId>-->
+  <!--        </exclusion>-->
+  <!--      </exclusions>-->
+  <!--    </dependency>-->
+  <!--  </dependencies>-->
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/feature</directory>
+        <filtering>true</filtering>
+        <targetPath>${project.build.directory}/feature</targetPath>
+      </resource>
+    </resources>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>resources</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!--
+        The feature plugin doesn't correctly attach the generated feature file so it
+        wouldn't be signed and hashed during a release build. By manually-attaching it
+        we make sure it's processed correctly.
+      -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>3.0.0</version>
+        <executions>
+          <execution>
+            <id>attach-features</id>
+            <phase>package</phase>
+            <goals>
+              <goal>attach-artifact</goal>
+            </goals>
+            <configuration>
+              <artifacts>
+                <artifact>
+                  <file>target/feature/feature.xml</file>
+                  <classifier>features</classifier>
+                  <type>xml</type>
+                </artifact>
+              </artifacts>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 
 </project>
\ No newline at end of file