You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2020/10/07 10:43:24 UTC
[sling-feature-converter-maven-plugin] 04/23: Cleaning up the POM
dependencies and update the docu
This is an automated email from the ASF dual-hosted git repository.
davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-feature-converter-maven-plugin.git
commit 638bd7143ec46d495ddd6f2edd21e70887f6e640
Author: Andreas Schaefer <sc...@iMac.local>
AuthorDate: Wed Aug 21 12:06:49 2019 -0700
Cleaning up the POM dependencies and update the docu
---
README.md | 20 ++-
pom.xml | 144 ++-------------------
.../maven/mojos/FeatureLauncherMojo.java | 57 --------
src/site/markdown/usage.md.vm | 47 ++++---
4 files changed, 62 insertions(+), 206 deletions(-)
diff --git a/README.md b/README.md
index 09cdd5b..451b2a0 100644
--- a/README.md
+++ b/README.md
@@ -34,4 +34,22 @@ These Goals are support in this plugin:
and its converted ZIP files
* **convert-pom**: Converts Provisioning Models into Feature Models
-See the Site documentation for further info.
\ No newline at end of file
+See the Site documentation for further info.
+
+## Content Package Handling
+
+The installation of Converted Content Packages has be difficult at times.
+
+These are the things fo far that should help making this easier:
+1. Make sure that you use the latest code base
+2. Make sure that during the launch:
+ 1. Sling Feature Extension Content is added first as Plugin Dependency
+ (any extension should be added before the Launcher)
+ 2. Add Sling Feature Launcher as Plugin Dependency afterwards
+ 3. Make sure that the **JCR Package Init** is added as Feature
+ (see Site Documentation **Usage**)
+3. After Feature is up and running log into OSGi Console and check
+ **OSGi Installer** to make sure there are no **Untransformed
+ Resources**
+4. During development make sure that the **Launcher** folder is deleted
+ periodically to avoid side effects from previous launches
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index dcc0832..55be6db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -126,36 +126,10 @@
<dependencies>
<dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
- <version>6.0.0</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-text</artifactId>
- <version>1.6</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.converter</artifactId>
- <version>1.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.configurator</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.commons.johnzon</artifactId>
- <version>1.0.0</version>
- </dependency>
- <dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
<version>2.0</version>
- <scope>compile</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
@@ -170,38 +144,23 @@
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.feature.launcher</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.feature.modelconverter</artifactId>
- <version>1.0.4</version>
+ <version>1.0.8</version>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.feature</artifactId>
- <version>1.0.2</version>
+ <version>1.0.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.feature.io</artifactId>
- <version>1.0.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.feature.analyser</artifactId>
- <version>1.0.2</version>
+ <version>1.0.7-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.provisioning.model</artifactId>
- <version>1.8.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jackrabbit</groupId>
- <artifactId>jackrabbit-api</artifactId>
- <version>2.19.3</version>
+ <groupId>org.glassfish</groupId>
+ <artifactId>javax.json</artifactId>
+ <version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit.vault</groupId>
@@ -209,6 +168,7 @@
<version>3.2.8</version>
<scope>runtime</scope>
</dependency>
+
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
@@ -235,102 +195,20 @@
<version>${maven.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-archiver</artifactId>
- <version>3.3.0</version>
- </dependency>
- <dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.5</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-osgi</artifactId>
- <version>0.2.0</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-interactivity-api</artifactId>
- <version>1.0-alpha-6</version>
- </dependency>
- <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>3.5</version>
</dependency>
<dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>3.0.24</version>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.framework</artifactId>
- <version>1.9.0</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>versions-maven-plugin</artifactId>
- <version>2.7</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.5</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-filtering</artifactId>
- <version>3.1.1</version>
- </dependency>
- <!-- schema validation -->
- <dependency>
- <groupId>com.github.java-json-tools</groupId>
- <artifactId>json-schema-validator</artifactId>
- <version>2.2.10</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- <version>2.2.3</version>
- </dependency>
- <!-- APIs JARs -->
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.utils</artifactId>
- <version>1.11.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-api</artifactId>
- <version>${maven.scm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-manager-plexus</artifactId>
- <version>${maven.scm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-gitexe</artifactId>
- <version>${maven.scm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.scm</groupId>
- <artifactId>maven-scm-provider-svnexe</artifactId>
- <version>${maven.scm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-model-builder</artifactId>
- <version>3.6.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-exec</artifactId>
- <version>1.3</version>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <version>3.0.2</version>
</dependency>
<!-- testing -->
<dependency>
diff --git a/src/main/java/org/apache/sling/cpconverter/maven/mojos/FeatureLauncherMojo.java b/src/main/java/org/apache/sling/cpconverter/maven/mojos/FeatureLauncherMojo.java
deleted file mode 100644
index f29835d..0000000
--- a/src/main/java/org/apache/sling/cpconverter/maven/mojos/FeatureLauncherMojo.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.
- */
-package org.apache.sling.cpconverter.maven.mojos;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.sling.feature.launcher.impl.Main;
-
-import java.io.File;
-
-/**
- * Launches the given Feature File
- */
-@Mojo(
- name = "launch-features",
- requiresProject = true,
- threadSafe = true
-)
-public final class FeatureLauncherMojo
- extends AbstractBaseMojo
-{
-
- public static final String CFG_FEATURE_FILE = "featureFile";
-
- /**
- * The path of the file that is launched here
- */
- @Parameter(property = CFG_FEATURE_FILE, required = true)
- private File featureFile;
-
- @Override
- public void execute() throws MojoExecutionException, MojoFailureException {
- if(!featureFile.isFile()) {
- throw new MojoFailureException("Feature File is not a file: " + featureFile);
- }
- if(!featureFile.canRead()) {
- throw new MojoFailureException("Feature File is cannot be read: " + featureFile);
- }
- Main.main(new String[] {"-f", featureFile.getAbsolutePath()});
- }
-}
diff --git a/src/site/markdown/usage.md.vm b/src/site/markdown/usage.md.vm
index d520dcd..c6118c3 100644
--- a/src/site/markdown/usage.md.vm
+++ b/src/site/markdown/usage.md.vm
@@ -97,7 +97,7 @@ equivalent so that we can launch it together with the converter CP packages late
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>sling-feature-converter-maven-plugin</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>${project.version}</version>
<extensions>true</extensions>
<executions>
<execution>
@@ -172,7 +172,7 @@ be relative to the basedir and cannot be absolute):
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>slingfeature-maven-plugin</artifactId>
- <version>1.0.5-SNAPSHOT</version>
+ <version>1.0.7-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<features>target/fm</features>
@@ -187,6 +187,7 @@ Now we can aggregate, collect them into a single FM file (attach) and verify all
<phase>generate-test-sources</phase>
<goals>
<goal>aggregate-features</goal>
+ <generatedFeatures>${sp}basedir}/target/fm</generatedFeatures>
</goals>
<configuration>
<aggregates>
@@ -245,20 +246,36 @@ if the project is buil with goal **install** and profile **launch** (mvn install
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>slingfeature-maven-plugin</artifactId>
- <version>${project.version}</version>
+ <version>1.0.7-SNAPSHOT</version>
<extensions>true</extensions>
- <executions>
- <execution>
- <id>launch-it</id>
- <phase>install</phase>
- <goals>
- <goal>launch-features</goal>
- </goals>
- <configuration>
- <featureFile>${sp}project.build.directory${ep}/slingfeature-tmp/feature-example-runtime.json</featureFile>
- </configuration>
- </execution>
- </executions>
+ <dependencies>
+ <!-- For now the Extension Content has to be placed ahead of the launcher to make CP
+ deployment work (see SLING-8483) -->
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.feature.extension.content</artifactId>
+ <version>1.0.5-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.feature.launcher</artifactId>
+ <version>1.0.7-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>launch-it</id>
+ <phase>install</phase>
+ <goals>
+ <goal>launch-features</goal>
+ </goals>
+ <configuration>
+ <selection>
+ <includeClassifier>example-runtime</includeClassifier>
+ </selection>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>