You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by jf...@apache.org on 2019/10/20 13:52:41 UTC
[plc4x] 06/25: [OSGi] Added feature for S7 Driver.
This is an automated email from the ASF dual-hosted git repository.
jfeinauer pushed a commit to branch feature/resolve-split-package-osgi
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 64010d08b3235fe745758bac0a0f9d5f214461dc
Author: Julian Feinauer <j....@pragmaticminds.de>
AuthorDate: Sun Oct 13 13:59:10 2019 +0200
[OSGi] Added feature for S7 Driver.
---
plc4j/drivers/s7/pom.xml | 2 +-
plc4j/karaf-features/pom.xml | 69 ++++++++++++++++++++++
plc4j/karaf-features/s7/pom.xml | 48 +++++++++++++++
.../karaf-features/s7/src/main/feature/feature.xml | 48 +++++++++++++++
plc4j/pom.xml | 2 +
5 files changed, 168 insertions(+), 1 deletion(-)
diff --git a/plc4j/drivers/s7/pom.xml b/plc4j/drivers/s7/pom.xml
index 02b393c..4a505cf 100644
--- a/plc4j/drivers/s7/pom.xml
+++ b/plc4j/drivers/s7/pom.xml
@@ -121,7 +121,7 @@
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
- <version>7.0.0</version>
+ <version>6.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/plc4j/karaf-features/pom.xml b/plc4j/karaf-features/pom.xml
new file mode 100644
index 0000000..14d7f56
--- /dev/null
+++ b/plc4j/karaf-features/pom.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <!-- TODO Currnelty thats the easeist way to avoid importing of slf4j -->
+ <artifactId>plc4x-parent</artifactId>
+ <groupId>org.apache.plc4x</groupId>
+ <version>0.5.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>karaf-features</artifactId>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>s7</module>
+ </modules>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ <version>4.2.4</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>karaf-maven-plugin</artifactId>
+ </plugin>
+
+ <!-- No checking needed here -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+
+</project>
\ No newline at end of file
diff --git a/plc4j/karaf-features/s7/pom.xml b/plc4j/karaf-features/s7/pom.xml
new file mode 100644
index 0000000..36043d4
--- /dev/null
+++ b/plc4j/karaf-features/s7/pom.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>karaf-features</artifactId>
+ <groupId>org.apache.plc4x</groupId>
+ <version>0.5.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>driver-s7-feature</artifactId>
+ <packaging>feature</packaging>
+
+ <!-- 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>-->
+
+</project>
\ No newline at end of file
diff --git a/plc4j/karaf-features/s7/src/main/feature/feature.xml b/plc4j/karaf-features/s7/src/main/feature/feature.xml
new file mode 100644
index 0000000..6bf41bb
--- /dev/null
+++ b/plc4j/karaf-features/s7/src/main/feature/feature.xml
@@ -0,0 +1,48 @@
+<?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.5.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" dependency="false">wrap</feature>
+ <feature>scr</feature>
+ <bundle>mvn:org.apache.plc4x/plc4j-driver-s7/0.5.0-SNAPSHOT</bundle>
+ <bundle>mvn:org.apache.plc4x/plc4j-api/0.5.0-SNAPSHOT</bundle>
+ <bundle>mvn:org.apache.plc4x/plc4j-protocol-iso-on-tcp/0.5.0-SNAPSHOT</bundle>
+ <bundle>mvn:org.apache.plc4x/plc4j-protocol-iso-tp/0.5.0-SNAPSHOT</bundle>
+ <bundle>mvn:org.apache.plc4x/plc4j-protocol-s7/0.5.0-SNAPSHOT</bundle>
+ <bundle>mvn:io.netty/netty-codec/4.1.39.Final</bundle>
+ <bundle>mvn:org.apache.plc4x/plc4j-protocol-driver-base/0.5.0-SNAPSHOT</bundle>
+ <bundle>mvn:org.apache.plc4x/plc4j-utils-driver-base-java/0.5.0-SNAPSHOT</bundle>
+ <bundle>wrap:mvn:com.github.jinahya/bit-io/1.4.2</bundle>
+ <bundle>mvn:commons-codec/commons-codec/1.12</bundle>
+ <bundle>mvn:org.apache.plc4x/plc4j-protocol-driver-base-tcp/0.5.0-SNAPSHOT</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>
diff --git a/plc4j/pom.xml b/plc4j/pom.xml
index ade6306..be7aba9 100644
--- a/plc4j/pom.xml
+++ b/plc4j/pom.xml
@@ -41,6 +41,7 @@
<module>examples</module>
<module>integrations</module>
+ <module>karaf-features</module>
</modules>
<build>
@@ -180,6 +181,7 @@
</execution>
</executions>
<configuration>
+ <exportScr>true</exportScr>
<instructions>
<_include>-bnd.bnd</_include>
</instructions>