Skip to content

Commit

Permalink
feat: add Karaf features via artifacts classifier for Flow (#9927)
Browse files Browse the repository at this point in the history
feat: add Karaf features via artifacts clarifier for Flow

Part of #6525
  • Loading branch information
Denis committed Feb 2, 2021
1 parent 54ff155 commit 206e1a6
Show file tree
Hide file tree
Showing 9 changed files with 117 additions and 66 deletions.
10 changes: 10 additions & 0 deletions flow-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<configuration>
<includeTransitiveDependency>false</includeTransitiveDependency>
<enableGeneration>true</enableGeneration>
<includeProjectArtifact>true</includeProjectArtifact>
<excludedArtifactIds>flow-server</excludedArtifactIds>
</configuration>
</plugin>
</plugins>
</build>
</project>
Expand Down
10 changes: 10 additions & 0 deletions flow-data/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="flow-data">

<repository>mvn:com.vaadin/flow-server/${project.version}/xml/features</repository>

<feature name="flow-data" description="Flow data" version="${project.version}">
<details>Vaadin Flow Data feature</details>
<feature>flow-server</feature>
</feature>
</features>
22 changes: 0 additions & 22 deletions flow-lit-template/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,6 @@
</dependency>


<!-- API DEPENDENCIES -->

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-server</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Library dependencies -->

<!-- Jsoup for Template, ... -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup.version}</version>
</dependency>

<!-- TESTING DEPENDENCIES -->

<dependency>
Expand Down
30 changes: 0 additions & 30 deletions flow-polymer-template/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,6 @@
<scope>test</scope>
</dependency>


<!-- API DEPENDENCIES -->

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Library dependencies -->

<!-- Jsoup for BootstrapHandler, Template, ... -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup.version}</version>
</dependency>

<!-- Byte code generation -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</dependency>

<!-- Small reflection library -->
<dependency>
<groupId>com.vaadin.external</groupId>
<artifactId>gentyref</artifactId>
<version>1.2.0.vaadin1</version>
</dependency>

<!-- TESTING DEPENDENCIES -->

<dependency>
Expand Down
20 changes: 15 additions & 5 deletions flow-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<!-- DefaultApplicationConfigurationFactory is declared as an OSGi service -->


<!-- DefaultApplicationConfigurationFactory is declared as an OSGi
service -->

<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<version>${osgi.compendium.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
Expand Down Expand Up @@ -81,7 +82,7 @@
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
<!-- commons-fileupload:1.3.3 depends on commons-io:2.2, override
<!-- commons-fileupload:1.3.3 depends on commons-io:2.2, override
it with Flow declaration -->
<exclusions>
<exclusion>
Expand Down Expand Up @@ -262,6 +263,15 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<configuration>
<enableGeneration>true</enableGeneration>
<includeProjectArtifact>true</includeProjectArtifact>
<excludedArtifactIds>httpclient,httpcore</excludedArtifactIds>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
6 changes: 6 additions & 0 deletions flow-server/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="flow-server">
<feature name="flow-server" description="Flow server" version="${project.version}">
<details>Vaadin Flow Server feature</details>
</feature>
</features>
44 changes: 42 additions & 2 deletions flow/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<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">
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.vaadin</groupId>
Expand Down Expand Up @@ -32,5 +33,44 @@
<artifactId>flow-html-components</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-data</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-dnd</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-lit-template</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-polymer-template</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>fusion-endpoint</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<configuration>
<includeProjectArtifact>false</includeProjectArtifact>
<excludedArtifactIds>flow-server,flow-data,fusion-endpoint</excludedArtifactIds>
<includeTransitiveDependency>false</includeTransitiveDependency>
</configuration>
</plugin>
</plugins>
</build>
</project>
12 changes: 12 additions & 0 deletions flow/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="flow">

<repository>mvn:com.vaadin/flow-server/${project.version}/xml/features</repository>
<repository>mvn:com.vaadin/flow-data/${project.version}/xml/features</repository>

<feature name="flow" description="Flow" version="${project.version}">
<details>Vaadin Flow feature</details>
<feature>flow-server</feature>
<feature>flow-data</feature>
</feature>
</features>
29 changes: 22 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
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">
<modelVersion>4.0.0</modelVersion>

<artifactId>flow-project</artifactId>
Expand Down Expand Up @@ -130,12 +130,12 @@
<maven.test.skip>false</maven.test.skip>

<!-- This property is needed to allow some Win-specific unit tests -->
<!-- to be disabled via system property in CI until they got fixed-->
<!-- to be disabled via system property in CI until they got fixed -->
<exclude.windows.failed.tests></exclude.windows.failed.tests>
</properties>

<repositories>
<!-- The order of definitions matters. Explicitly defining central
<!-- The order of definitions matters. Explicitly defining central
here to make sure it has the highest priority. -->
<repository>
<id>central</id>
Expand All @@ -161,7 +161,7 @@
</repositories>

<pluginRepositories>
<!-- The order of definitions matters. Explicitly defining central
<!-- The order of definitions matters. Explicitly defining central
here to make sure it has the highest priority. -->
<pluginRepository>
<id>central</id>
Expand Down Expand Up @@ -433,6 +433,21 @@
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>4.3.0</version>
<extensions>true</extensions>
<executions>
<execution>
<id>generate-features-file</id>
<phase>generate-resources</phase>
<goals>
<goal>features-generate-descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand All @@ -455,7 +470,7 @@
<configuration>
<rules>
<restrictImports
implementation="de.skuzzle.enforcer.restrictimports.RestrictImports">
implementation="de.skuzzle.enforcer.restrictimports.RestrictImports">
<reason>Use SLF4j for logging</reason>
<bannedImport>java.util.logging.**
</bannedImport>
Expand Down Expand Up @@ -508,7 +523,7 @@
<threadCount>2</threadCount>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse
<!--This plugin's configuration is used to store Eclipse
m2e settings only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
Expand Down

0 comments on commit 206e1a6

Please sign in to comment.