You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by er...@apache.org on 2020/04/03 14:43:12 UTC

[plc4x] 01/03: Generating feature.xml with dependencies using maven plugin

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

erobinet pushed a commit to branch osgi
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 38f5ce8f4df1a4a2e5a1dcf12c0553ad5a448635
Merge: c4f6ffe 387a17d
Author: Etienne Robinet <et...@gmail.com>
AuthorDate: Thu Apr 2 10:43:52 2020 +0200

    Generating feature.xml with dependencies using maven plugin

 plc4j/karaf-features/s7/pom.xml                    | 73 ++++++----------------
 .../karaf-features/s7/src/main/feature/feature.xml | 44 -------------
 protocols/pom.xml                                  |  5 ++
 src/site/asciidoc/developers/maturity.adoc         |  4 +-
 .../asciidoc/users/blogs-videos-and-slides.adoc    |  4 +-
 5 files changed, 29 insertions(+), 101 deletions(-)

diff --cc plc4j/karaf-features/s7/pom.xml
index 0c861ef,0c861ef..d267243
--- a/plc4j/karaf-features/s7/pom.xml
+++ b/plc4j/karaf-features/s7/pom.xml
@@@ -31,72 -31,72 +31,37 @@@
  
    <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>-->
++  <!--Adding dependencies to generate the XML -->
++  <dependencies>
++    <dependency>
++      <groupId>org.apache.plc4x</groupId>
++      <artifactId>plc4j-driver-s7</artifactId>
++      <version>${project.version}</version>
++    </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>
++        <groupId>org.apache.karaf.tooling</groupId>
++        <artifactId>karaf-maven-plugin</artifactId>
++        <extensions>true</extensions>
++        <configuration>
++          <enableGeneration>true</enableGeneration>
++          <aggregateFeatures>true</aggregateFeatures>
++        </configuration>
          <executions>
            <execution>
++            <id>generate-features-file</id>
++            <phase>generate-resources</phase>
              <goals>
--              <goal>resources</goal>
++              <goal>features-generate-descriptor</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>
diff --cc plc4j/karaf-features/s7/src/main/feature/feature.xml
index b4c7b0b,b4c7b0b..0000000
deleted file mode 100644,100644
--- a/plc4j/karaf-features/s7/src/main/feature/feature.xml
+++ /dev/null
@@@ -1,44 -1,44 +1,0 @@@
--<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
--<!--
--
--  Licensed to the Apache Software Foundation (ASF) under one or more
--  contributor license agreements.  See the NOTICE file distributed with
--  this work for additional information regarding copyright ownership.
--  The ASF licenses this file to You under the Apache License, Version 2.0
--  (the "License"); you may not use this file except in compliance with
--  the License.  You may obtain a copy of the License at
--
--      http://www.apache.org/licenses/LICENSE-2.0
--
--  Unless required by applicable law or agreed to in writing, software
--  distributed under the License is distributed on an "AS IS" BASIS,
--  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--  See the License for the specific language governing permissions and
--  limitations under the License.
--
---->
--<features xmlns="http://karaf.apache.org/xmlns/features/v1.5.0" name="driver-s7-feature">
--  <feature name="driver-s7-feature" description="driver-s7-feature" version="0.6.0.SNAPSHOT">
--    <details>PLC4X is an effort to create a universal library for accessing industrial programmable logic controllers
--      using a variety of protocols using a uniform API.
--    </details>
--    <feature prerequisite="true">wrap</feature>
--    <feature>scr</feature>
--    <bundle>mvn:org.apache.plc4x/plc4j-driver-s7/${project.version}</bundle>
--    <bundle>mvn:org.apache.plc4x/plc4j-api/${project.version}</bundle>
--    <bundle>mvn:org.apache.plc4x/plc4j-spi/${project.version}</bundle>
--    <bundle>mvn:org.apache.plc4x/plc4j-transport-tcp/${project.version}</bundle>
--    <bundle>mvn:io.netty/netty-codec/4.1.39.Final</bundle>
--    <bundle>mvn:com.github.jinahya/bit-io/1.4.3</bundle>
--    <bundle>mvn:commons-codec/commons-codec/1.12</bundle>
--    <bundle>mvn:io.netty/netty-common/4.1.39.Final</bundle>
--    <bundle>mvn:io.netty/netty-transport/4.1.39.Final</bundle>
--    <bundle>mvn:io.netty/netty-resolver/4.1.39.Final</bundle>
--    <bundle>mvn:io.netty/netty-buffer/4.1.39.Final</bundle>
--    <bundle>mvn:org.apache.commons/commons-configuration2/2.6</bundle>
--    <bundle>mvn:org.apache.commons/commons-text/1.8</bundle>
--    <bundle>mvn:commons-logging/commons-logging/1.2</bundle>
--    <bundle>mvn:org.apache.commons/commons-lang3/3.7</bundle>
--    <bundle>mvn:commons-io/commons-io/2.6</bundle>
--  </feature>
--</features>