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 f9128b0601d6a9366a4cb1dd04ab75b6e71a8047 Author: Andreas Schaefer <[email protected]> AuthorDate: Fri Dec 20 15:40:06 2019 -0800 Preparation for the upcoming Release This was mostly cleaning up the IT tests to make it easier to work with during the releease and in the future --- pom.xml | 13 +- .../core/pom.xml | 44 +-- .../test => }/servlet/ByPathServletTest.java | 0 .../pom.xml | 372 +-------------------- .../ui.apps/pom.xml | 51 +-- .../verify.bsh | 9 +- .../core/pom.xml | 43 +-- .../fm.launcher/pom.xml | 29 +- .../package-with-single-bundle-target-mode/pom.xml | 371 +------------------- .../ui.apps/pom.xml | 49 +-- .../verify.bsh | 9 +- .../core/pom.xml | 43 +-- .../pom.xml | 370 +------------------- .../ui.apps/pom.xml | 51 +-- .../verify.bsh | 9 +- src/it/setup-tests/ReadMe.md | 7 + src/it/setup-tests/invoker.properties | 17 + .../pom.xml | 216 ++---------- src/site/markdown/usage.md.vm | 25 +- 19 files changed, 180 insertions(+), 1548 deletions(-) diff --git a/pom.xml b/pom.xml index 718832c..255fe33 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ <parent> <groupId>org.apache.sling</groupId> <artifactId>sling</artifactId> - <version>33</version> + <version>35</version> <relativePath /> </parent> @@ -34,11 +34,11 @@ <properties> <sling.java.version>8</sling.java.version> <plexus-component-metadata.version>1.7.1</plexus-component-metadata.version> - <jackrabbit-spi-commons.version>2.19.1</jackrabbit-spi-commons.version> - <jackrabbit-api.version>2.19.3</jackrabbit-api.version> + <jackrabbit-spi-commons.version>2.18.4</jackrabbit-spi-commons.version> + <jackrabbit-api.version>2.18.4</jackrabbit-api.version> <javax.json.version>1.0.4</javax.json.version> <org.apache.jackrabbit.vault.version>3.2.8</org.apache.jackrabbit.vault.version> - <org.apache.sling.feature.cpconverter.version>0.0.1-SNAPSHOT</org.apache.sling.feature.cpconverter.version> + <org.apache.sling.feature.cpconverter.version>1.0.2</org.apache.sling.feature.cpconverter.version> <org.apache.sling.feature.modelconverter.version>1.0.8</org.apache.sling.feature.modelconverter.version> <org.apache.sling.feature.version>1.1.0</org.apache.sling.feature.version> <org.apache.sling.provisioning.model.version>1.8.4</org.apache.sling.provisioning.model.version> @@ -122,6 +122,10 @@ <pomInclude>**/pom.xml</pomInclude> </pomIncludes> <postBuildHookScript>verify</postBuildHookScript> + <scriptVariables> + <plugin.group>${project.groupId}</plugin.group> + <plugin.version>${project.version}</plugin.version> + </scriptVariables> </configuration> <executions> <execution> @@ -230,6 +234,7 @@ <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> + <version>3.0.2</version> </dependency> <!-- testing --> diff --git a/src/it/package-with-single-bundle-no-parameters/core/pom.xml b/src/it/package-with-single-bundle-no-parameters/core/pom.xml index cc7f813..59061a4 100644 --- a/src/it/package-with-single-bundle-no-parameters/core/pom.xml +++ b/src/it/package-with-single-bundle-no-parameters/core/pom.xml @@ -22,26 +22,17 @@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>sling-cpconverter-maven-plugin-test-no-param</artifactId> <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-no-param</artifactId> <version>1.0.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> </parent> - <artifactId>sling-cpconverter-maven-plugin-test-no-param.core</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-no-param.core</artifactId> <packaging>bundle</packaging> - <name>CQ Converter Test - Core</name> + <name>Sling Feature Converter Maven Plugin Test No Parameter - Core</name> <description> - This is an empty OSGi Bundle which can be used - to compile and deploy OSGi Services to Sling. - - This Bundle can be deployed using the Profile - "autoInstallBundle" but that should not be used - together with the "ui.apps" Profile "autoInstallAll" - as they are not deployed the same way and can lead - to undesired issues during deployment (bundle not - updated or not working at all). + Sling Feature Converter Maven Plugin Core Test Bundle with No Parameters </description> <build> @@ -83,6 +74,7 @@ </plugin> </plugins> </build> + <dependencies> <dependency> <groupId>org.osgi</groupId> @@ -97,15 +89,6 @@ <artifactId>org.osgi.service.component.annotations</artifactId> </dependency> <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.service.metatype.annotations</artifactId> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - </dependency> - - <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> </dependency> @@ -122,29 +105,12 @@ <artifactId>org.apache.sling.models.api</artifactId> </dependency> <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-api</artifactId> - </dependency> - - <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> - - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </dependency> - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> </dependencies> - - <!-- - Attention: the autoInstallBundle was removed as deploying bundles directly and through a package is causing - issues with updates and can prevent the latest code of a bundle being deployed. - If you know what you are doing then you can use maven-sling-plugin directly from the Maven CLI. - --> </project> diff --git a/src/it/package-with-single-bundle-no-parameters/core/src/test/java/org/apache/sling/cpconverter/test/org/apache/sling/cpconverter/test/servlet/ByPathServletTest.java b/src/it/package-with-single-bundle-no-parameters/core/src/test/java/org/apache/sling/cpconverter/test/servlet/ByPathServletTest.java similarity index 100% rename from src/it/package-with-single-bundle-no-parameters/core/src/test/java/org/apache/sling/cpconverter/test/org/apache/sling/cpconverter/test/servlet/ByPathServletTest.java rename to src/it/package-with-single-bundle-no-parameters/core/src/test/java/org/apache/sling/cpconverter/test/servlet/ByPathServletTest.java diff --git a/src/it/package-with-single-bundle-no-parameters/pom.xml b/src/it/package-with-single-bundle-no-parameters/pom.xml index 5ddd115..117b4c0 100644 --- a/src/it/package-with-single-bundle-no-parameters/pom.xml +++ b/src/it/package-with-single-bundle-no-parameters/pom.xml @@ -13,86 +13,28 @@ <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.sling</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-no-param</artifactId> - <packaging>pom</packaging> - <version>1.0.0-SNAPSHOT</version> - <name>Apache Sling Features Maven plugin test - no parameter</name> - <description>This is just an Apache Sling Content Package Maven plugin test to convert a package with a single - bundle - </description> - <organization> - <name>The Apache Software Foundation</name> - <url>https://www.apache.org/</url> - </organization> - <licenses> - <license> - <name>Apache License, Version 2.0</name> - <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> - <distribution>repo</distribution> - </license> - </licenses> - <properties> - <interpolated_variable>true</interpolated_variable> - <osgi.framework.version>1.9.0</osgi.framework.version> - <sling.framework.install.incremental>true</sling.framework.install.incremental> - <sling.framework.install.startlevel>1</sling.framework.install.startlevel> - <sling.ignoreSystemProperties>true</sling.ignoreSystemProperties> - <sling.host>localhost</sling.host> - <sling.port>8080</sling.port> - <sling.user>admin</sling.user> + <parent> + <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> - <sling.password>admin</sling.password> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <artifactId>sling-feature-converter-maven-plugin-test-no-param</artifactId> + <packaging>pom</packaging> - <release.plugin.version>2.5.3</release.plugin.version> - <source.plugin.version>3.0.1</source.plugin.version> - <resource.plugin.version>3.1.0</resource.plugin.version> - <jar.plugin.version>3.1.1</jar.plugin.version> - <enforcer.plugin.version>3.0.0-M2</enforcer.plugin.version> - <compiler.plugin.version>3.8.0</compiler.plugin.version> - <bundle.plugin.version>4.2.0</bundle.plugin.version> - <clean.plugin.version>3.1.0</clean.plugin.version> - <installer.plugin.version>3.0.0-M1</installer.plugin.version> - <surfire.plugin.version>3.0.0-M3</surfire.plugin.version> - <failsafe.plugin.version>3.0.0-M3</failsafe.plugin.version> - <deploy.plugin.version>3.0.0-M1</deploy.plugin.version> - <sling.plugin.version>2.4.0</sling.plugin.version> - <dependency.plugin.version>3.1.1</dependency.plugin.version> - <build.helper.plugin.version>3.0.0</build.helper.plugin.version> - <wcmio.plugin.version>1.6.18</wcmio.plugin.version> - <filevault-package.plugin.version>1.0.3</filevault-package.plugin.version> + <name>Apache Sling Features Converter Maven Plugin test - no parameter</name> + <description> + This is an Apache Sling Feature Converter Maven plugin test to convert a package with a single bundle + </description> - <osgi.core.version>7.0.0</osgi.core.version> - <osgi.annotation.version>7.0.0</osgi.annotation.version> - <org.osgi.service.component.annotations.version>1.4.0</org.osgi.service.component.annotations.version> - <org.osgi.service.metatype.annotations.version>1.4.0</org.osgi.service.metatype.annotations.version> - <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version> - <javax.servlet-api.version>3.1.0</javax.servlet-api.version> - <javax.inject.version>1</javax.inject.version> - <jcr.version>2.0</jcr.version> - <sling.models.api.version>1.3.6</sling.models.api.version> - <jetbrains.annotations.version>16.0.2</jetbrains.annotations.version> - <sling.settings.version>1.3.10</sling.settings.version> - <sling.commons.osgi.version>2.4.0</sling.commons.osgi.version> - <jackrabbit-api.version>2.16.3</jackrabbit-api.version> - <commons-lang.version>2.6</commons-lang.version> - <jmock-junit4.version>2.8.2</jmock-junit4.version> - </properties> <build> <plugins> <!-- Maven Release Plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> - <configuration> - <scmCommentPrefix>[maven-scm] :</scmCommentPrefix> - <preparationGoals>clean install</preparationGoals> - <goals>install</goals> - <releaseProfiles>release</releaseProfiles> - </configuration> + <inherited>true</inherited> </plugin> <!-- Maven Source Plugin --> <plugin> @@ -104,9 +46,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> - <configuration> - <encoding>UTF-8</encoding> - </configuration> + <inherited>true</inherited> </plugin> <!-- Maven Jar Plugin --> <plugin> @@ -117,299 +57,17 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <executions> - <execution> - <id>enforce-maven</id> - <goals> - <goal>enforce</goal> - </goals> - <configuration> - <rules> - <requireMavenVersion> - <message>Project must be built with Maven 3.1.0 or higher</message> - <version>[3.1.0,)</version> - </requireMavenVersion> - <requireJavaVersion> - <message>Project must be compiled with Java 7 or higher</message> - <version>1.7.0</version> - </requireJavaVersion> - </rules> - </configuration> - </execution> - </executions> + <inherited>true</inherited> </plugin> <!-- Maven Compiler Plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>8</source> - <target>8</target> - <encoding>UTF-8</encoding> - </configuration> + <inherited>true</inherited> </plugin> </plugins> - <pluginManagement> - <plugins> - <!-- Maven Release Plugin --> - <plugin> - <artifactId>maven-release-plugin</artifactId> - <version>${release.plugin.version}</version> - </plugin> - <!-- Maven Source Plugin --> - <plugin> - <artifactId>maven-source-plugin</artifactId> - <version>${source.plugin.version}</version> - </plugin> - <!-- Maven Resources Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>${resource.plugin.version}</version> - </plugin> - <!-- Maven Jar Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>${jar.plugin.version}</version> - </plugin> - <!-- Maven Enforcer Plugin --> - <plugin> - <artifactId>maven-enforcer-plugin</artifactId> - <version>${enforcer.plugin.version}</version> - </plugin> - <!-- Maven Compiler Plugin --> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <version>${compiler.plugin.version}</version> - </plugin> - - <!-- Maven Clean Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-clean-plugin</artifactId> - <version>${clean.plugin.version}</version> - </plugin> - <!-- Maven Installer Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-install-plugin</artifactId> - <version>${installer.plugin.version}</version> - </plugin> - <!-- Maven Surefire Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surfire.plugin.version}</version> - </plugin> - <!-- Maven Failsafe Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <version>${failsafe.plugin.version}</version> - </plugin> - <!-- Maven Deploy Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - <version>${deploy.plugin.version}</version> - </plugin> - <!-- Apache Sling Plugin --> - <plugin> - <groupId>org.apache.sling</groupId> - <artifactId>maven-sling-plugin</artifactId> - <version>${sling.plugin.version}</version> - </plugin> - <!-- Content Package Plugin --> - <plugin> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>filevault-package-maven-plugin</artifactId> - <version>${filevault-package.plugin.version}</version> - <extensions>true</extensions> - <configuration> - <failOnMissingEmbed>true</failOnMissingEmbed> - <force>true</force> - </configuration> - </plugin> - <plugin> - <groupId>io.wcm.maven.plugins</groupId> - <artifactId>wcmio-content-package-maven-plugin</artifactId> - <version>${wcmio.plugin.version}</version> - <configuration> - <serviceURL>http://${sling.host}:${sling.port}/bin/cpm/</serviceURL> - <userId>${sling.user}</userId> - <password>${sling.password}</password> - <failOnMissingEmbed>true</failOnMissingEmbed> - <force>true</force> - <group>cpconverter</group> - </configuration> - </plugin> - <!-- Apache Felix Bundle Plugin --> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>${bundle.plugin.version}</version> - <inherited>true</inherited> - </plugin> - <!-- Maven Dependency Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>${dependency.plugin.version}</version> - </plugin> - <!-- Build Helper Maven Plugin --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>${build.helper.plugin.version}</version> - </plugin> - </plugins> - </pluginManagement> </build> - <!-- ====================================================================== --> - <!-- D E P E N D E N C I E S --> - <!-- ====================================================================== --> - <dependencyManagement> - <dependencies> - <!-- OSGi Dependencies --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi.core</artifactId> - <version>${osgi.core.version}</version> - <scope>provided</scope> - </dependency> - - <!-- OSGi annotations: @Version, @ProviderType, @ConsumerType --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi.annotation</artifactId> - <version>${osgi.annotation.version}</version> - <scope>provided</scope> - </dependency> - - <!-- OSGi annotations for DS and metatype --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.service.component.annotations</artifactId> - <version>${org.osgi.service.component.annotations.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.service.metatype.annotations</artifactId> - <version>${org.osgi.service.metatype.annotations.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Needs to be placed after 'org.osgi.service.component.annotations' otherwise field @Reference will not work --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - <version>${org.osgi.compendium.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Web Application API --> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - <version>${javax.servlet-api.version}</version> - <scope>provided</scope> - </dependency> - - <!-- dependency injection annotations --> - <dependency> - <groupId>javax.inject</groupId> - <artifactId>javax.inject</artifactId> - <version>$[javax.inject.version</version> - <scope>provided</scope> - </dependency> - - <!-- JCR API --> - <dependency> - <groupId>javax.jcr</groupId> - <artifactId>jcr</artifactId> - <version>${jcr.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Basic Logging --> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.7.6</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.jetbrains</groupId> - <artifactId>annotations</artifactId> - <version>${jetbrains.annotations.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Apache Sling Dependencies --> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.api</artifactId> - <version>2.9.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.settings</artifactId> - <version>${sling.settings.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.commons.osgi</artifactId> - <version>${sling.commons.osgi.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.models.api</artifactId> - <version>${sling.models.api.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-api</artifactId> - <version>${jackrabbit-api.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Support --> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>${commons-lang.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Basic dependencies for Unit Tests --> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.jmock</groupId> - <artifactId>jmock-junit4</artifactId> - <version>${jmock-junit4.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-simple</artifactId> - <version>1.7.6</version> - <scope>test</scope> - </dependency> - </dependencies> - </dependencyManagement> <modules> <module>core</module> <module>ui.apps</module> diff --git a/src/it/package-with-single-bundle-no-parameters/ui.apps/pom.xml b/src/it/package-with-single-bundle-no-parameters/ui.apps/pom.xml index 4ec8713..98bcaad 100644 --- a/src/it/package-with-single-bundle-no-parameters/ui.apps/pom.xml +++ b/src/it/package-with-single-bundle-no-parameters/ui.apps/pom.xml @@ -23,44 +23,29 @@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>sling-cpconverter-maven-plugin-test-no-param</artifactId> <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-no-param</artifactId> <version>1.0.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> </parent> - <artifactId>sling-cpconverter-maven-plugin-test-no-param.ui.apps</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-no-param.ui.apps</artifactId> <packaging>content-package</packaging> - <name>CQ Converter Test - UI Apps</name> + <name>Sling Feature Converter Maven Plugin No Parameter Test - UI Apps</name> <description> - This is an empty JCR Package where the JCR Content - can be deployed with. + Sling Feature Converter Maven Plugin Core Test Content Bundle with No Parameter </description> - <!-- NOTE: - For a 'not all' package this JCR Package will embedd - the "core" bundle. It can be deployed with the - "autoInstallPackage" profile. - For an 'all' package this only provides the content - of the project which is deployed in the root with - the "autoInstallAll" profile. - - It is advisable to deploy any bundles or packages - in one manner as deploying bundles inside a package - and through the System Console can lead to unexpected - and errorneous situations. - --> <dependencies> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-no-param.core</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-no-param.core</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.feature.cpconverter</artifactId> - <version>0.0.1-SNAPSHOT</version> + <version>${org.apache.sling.feature.cpconverter.version}</version> </dependency> </dependencies> @@ -75,7 +60,7 @@ <embeddeds> <embedded> <groupId>${project.groupId}</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-no-param.core</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-no-param.core</artifactId> <filter>true</filter> </embedded> </embeddeds> @@ -99,26 +84,4 @@ </plugin> </plugins> </build> - <profiles> - <!-- ATTENTION: It is highly recomended not to deploy this with this Profile if this Package was or will be deployed with the All package --> - <profile> - <id>autoInstallPackage</id> - <build> - <plugins> - <plugin> - <groupId>io.wcm.maven.plugins</groupId> - <artifactId>wcmio-content-package-maven-plugin</artifactId> - <executions> - <execution> - <id>install-package</id> - <goals> - <goal>install</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> diff --git a/src/it/package-with-single-bundle-no-parameters/verify.bsh b/src/it/package-with-single-bundle-no-parameters/verify.bsh index 88da15c..a8b39cd 100644 --- a/src/it/package-with-single-bundle-no-parameters/verify.bsh +++ b/src/it/package-with-single-bundle-no-parameters/verify.bsh @@ -19,10 +19,11 @@ import java.util.*; import org.codehaus.plexus.util.*; boolean check() { - String projectName = "sling-cpconverter-maven-plugin-test-no-param.ui.apps"; - String projectCoreName = "sling-cpconverter-maven-plugin-test-no-param.core"; - String projectVersion = "1.0.0-SNAPSHOT"; - String projectGroup = "org.apache.sling"; + String projectName = "sling-feature-converter-maven-plugin-test-no-param.ui.apps"; + String projectCoreName = "sling-feature-converter-maven-plugin-test-no-param.core"; + // These are <scriptVariables/> provided by the plugin POM + String projectVersion = plugin.version; + String projectGroup = plugin.group; String projectGroupPath = projectGroup.replaceAll("\\.", "/"); File targetFolder = new File(basedir, "ui.apps/target"); diff --git a/src/it/package-with-single-bundle-target-mode/core/pom.xml b/src/it/package-with-single-bundle-target-mode/core/pom.xml index e9a550d..5dc538c 100644 --- a/src/it/package-with-single-bundle-target-mode/core/pom.xml +++ b/src/it/package-with-single-bundle-target-mode/core/pom.xml @@ -22,26 +22,17 @@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode</artifactId> <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode</artifactId> <version>1.0.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> </parent> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode.core</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode.core</artifactId> <packaging>bundle</packaging> - <name>CQ Converter Test - Core</name> + <name>Sling Feature Converter Maven Plugin Test Target Mode - Core</name> <description> - This is an empty OSGi Bundle which can be used - to compile and deploy OSGi Services to Sling. - - This Bundle can be deployed using the Profile - "autoInstallBundle" but that should not be used - together with the "ui.apps" Profile "autoInstallAll" - as they are not deployed the same way and can lead - to undesired issues during deployment (bundle not - updated or not working at all). + Sling Feature Converter Maven Plugin Core Test Bundle in Target Mode </description> <build> @@ -97,15 +88,6 @@ <artifactId>org.osgi.service.component.annotations</artifactId> </dependency> <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.service.metatype.annotations</artifactId> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - </dependency> - - <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> </dependency> @@ -122,29 +104,12 @@ <artifactId>org.apache.sling.models.api</artifactId> </dependency> <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-api</artifactId> - </dependency> - - <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> - - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </dependency> - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> </dependencies> - - <!-- - Attention: the autoInstallBundle was removed as deploying bundles directly and through a package is causing - issues with updates and can prevent the latest code of a bundle being deployed. - If you know what you are doing then you can use maven-sling-plugin directly from the Maven CLI. - --> </project> diff --git a/src/it/package-with-single-bundle-target-mode/fm.launcher/pom.xml b/src/it/package-with-single-bundle-target-mode/fm.launcher/pom.xml index ee2a9c9..2c80ae7 100644 --- a/src/it/package-with-single-bundle-target-mode/fm.launcher/pom.xml +++ b/src/it/package-with-single-bundle-target-mode/fm.launcher/pom.xml @@ -23,45 +23,30 @@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode</artifactId> <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode</artifactId> <version>1.0.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> </parent> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode.fm.launcher</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode.fm.launcher</artifactId> <packaging>jar</packaging> - <name>CQ Converter Test - UI Apps</name> + <name>Sling Feature Converter Maven Plugin Target Mode Test - FM Launcher</name> <description> - This is an empty JCR Package where the JCR Content - can be deployed with. + Sling Feature Converter Maven Plugin Core Test FM Launcher in Target Model </description> - <!-- NOTE: - For a 'not all' package this JCR Package will embedd - the "core" bundle. It can be deployed with the - "autoInstallPackage" profile. - For an 'all' package this only provides the content - of the project which is deployed in the root with - the "autoInstallAll" profile. - - It is advisable to deploy any bundles or packages - in one manner as deploying bundles inside a package - and through the System Console can lead to unexpected - and errorneous situations. - --> <dependencies> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode.ui.apps</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode.ui.apps</artifactId> <version>${project.version}</version> <type>zip</type> </dependency> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.feature.cpconverter</artifactId> - <version>0.0.1-SNAPSHOT</version> + <version>${org.apache.sling.feature.cpconverter.version}</version> </dependency> </dependencies> @@ -86,7 +71,7 @@ <contentPackages> <contentPackage> <groupId>${project.groupId}</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode.ui.apps</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode.ui.apps</artifactId> </contentPackage> </contentPackages> </configuration> diff --git a/src/it/package-with-single-bundle-target-mode/pom.xml b/src/it/package-with-single-bundle-target-mode/pom.xml index c671441..f2d73b3 100644 --- a/src/it/package-with-single-bundle-target-mode/pom.xml +++ b/src/it/package-with-single-bundle-target-mode/pom.xml @@ -13,86 +13,29 @@ <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.sling</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode</artifactId> - <packaging>pom</packaging> - <version>1.0.0-SNAPSHOT</version> - <name>Apache Sling Features Maven plugin test - target mode</name> - <description>This is just an Apache Sling Content Package Maven plugin test to convert a package with a single - bundle - </description> - <organization> - <name>The Apache Software Foundation</name> - <url>https://www.apache.org/</url> - </organization> - <licenses> - <license> - <name>Apache License, Version 2.0</name> - <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> - <distribution>repo</distribution> - </license> - </licenses> - <properties> - <interpolated_variable>true</interpolated_variable> - <osgi.framework.version>1.9.0</osgi.framework.version> - <sling.framework.install.incremental>true</sling.framework.install.incremental> - <sling.framework.install.startlevel>1</sling.framework.install.startlevel> - <sling.ignoreSystemProperties>true</sling.ignoreSystemProperties> - <sling.host>localhost</sling.host> - <sling.port>8080</sling.port> - <sling.user>admin</sling.user> + <parent> + <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> - <sling.password>admin</sling.password> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode</artifactId> + <packaging>pom</packaging> + + <name>Apache Sling Features Converter Maven Plugin test - target mode</name> + <description> + This is an Apache Sling Feature Converter Maven plugin to convert a package with a single bundle + </description> - <release.plugin.version>2.5.3</release.plugin.version> - <source.plugin.version>3.0.1</source.plugin.version> - <resource.plugin.version>3.1.0</resource.plugin.version> - <jar.plugin.version>3.1.1</jar.plugin.version> - <enforcer.plugin.version>3.0.0-M2</enforcer.plugin.version> - <compiler.plugin.version>3.8.0</compiler.plugin.version> - <bundle.plugin.version>4.2.0</bundle.plugin.version> - <clean.plugin.version>3.1.0</clean.plugin.version> - <installer.plugin.version>3.0.0-M1</installer.plugin.version> - <surfire.plugin.version>3.0.0-M3</surfire.plugin.version> - <failsafe.plugin.version>3.0.0-M3</failsafe.plugin.version> - <deploy.plugin.version>3.0.0-M1</deploy.plugin.version> - <sling.plugin.version>2.4.0</sling.plugin.version> - <dependency.plugin.version>3.1.1</dependency.plugin.version> - <build.helper.plugin.version>3.0.0</build.helper.plugin.version> - <wcmio.plugin.version>1.6.18</wcmio.plugin.version> - <filevault-package.plugin.version>1.0.3</filevault-package.plugin.version> - <osgi.core.version>7.0.0</osgi.core.version> - <osgi.annotation.version>7.0.0</osgi.annotation.version> - <org.osgi.service.component.annotations.version>1.4.0</org.osgi.service.component.annotations.version> - <org.osgi.service.metatype.annotations.version>1.4.0</org.osgi.service.metatype.annotations.version> - <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version> - <javax.servlet-api.version>3.1.0</javax.servlet-api.version> - <javax.inject.version>1</javax.inject.version> - <jcr.version>2.0</jcr.version> - <sling.models.api.version>1.3.6</sling.models.api.version> - <jetbrains.annotations.version>16.0.2</jetbrains.annotations.version> - <sling.settings.version>1.3.10</sling.settings.version> - <sling.commons.osgi.version>2.4.0</sling.commons.osgi.version> - <jackrabbit-api.version>2.16.3</jackrabbit-api.version> - <commons-lang.version>2.6</commons-lang.version> - <jmock-junit4.version>2.8.2</jmock-junit4.version> - </properties> <build> <plugins> <!-- Maven Release Plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> - <configuration> - <scmCommentPrefix>[maven-scm] :</scmCommentPrefix> - <preparationGoals>clean install</preparationGoals> - <goals>install</goals> - <releaseProfiles>release</releaseProfiles> - </configuration> + <inherited>true</inherited> </plugin> <!-- Maven Source Plugin --> <plugin> @@ -104,9 +47,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> - <configuration> - <encoding>UTF-8</encoding> - </configuration> + <inherited>true</inherited> </plugin> <!-- Maven Jar Plugin --> <plugin> @@ -117,299 +58,17 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <executions> - <execution> - <id>enforce-maven</id> - <goals> - <goal>enforce</goal> - </goals> - <configuration> - <rules> - <requireMavenVersion> - <message>Project must be built with Maven 3.1.0 or higher</message> - <version>[3.1.0,)</version> - </requireMavenVersion> - <requireJavaVersion> - <message>Project must be compiled with Java 7 or higher</message> - <version>1.7.0</version> - </requireJavaVersion> - </rules> - </configuration> - </execution> - </executions> + <inherited>true</inherited> </plugin> <!-- Maven Compiler Plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>8</source> - <target>8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <!-- Maven Release Plugin --> - <plugin> - <artifactId>maven-release-plugin</artifactId> - <version>${release.plugin.version}</version> - </plugin> - <!-- Maven Source Plugin --> - <plugin> - <artifactId>maven-source-plugin</artifactId> - <version>${source.plugin.version}</version> - </plugin> - <!-- Maven Resources Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>${resource.plugin.version}</version> - </plugin> - <!-- Maven Jar Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>${jar.plugin.version}</version> - </plugin> - <!-- Maven Enforcer Plugin --> - <plugin> - <artifactId>maven-enforcer-plugin</artifactId> - <version>${enforcer.plugin.version}</version> - </plugin> - <!-- Maven Compiler Plugin --> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <version>${compiler.plugin.version}</version> - </plugin> - - <!-- Maven Clean Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-clean-plugin</artifactId> - <version>${clean.plugin.version}</version> - </plugin> - <!-- Maven Installer Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-install-plugin</artifactId> - <version>${installer.plugin.version}</version> - </plugin> - <!-- Maven Surefire Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surfire.plugin.version}</version> - </plugin> - <!-- Maven Failsafe Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <version>${failsafe.plugin.version}</version> - </plugin> - <!-- Maven Deploy Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - <version>${deploy.plugin.version}</version> - </plugin> - <!-- Apache Sling Plugin --> - <plugin> - <groupId>org.apache.sling</groupId> - <artifactId>maven-sling-plugin</artifactId> - <version>${sling.plugin.version}</version> - </plugin> - <!-- Content Package Plugin --> - <plugin> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>filevault-package-maven-plugin</artifactId> - <version>${filevault-package.plugin.version}</version> - <extensions>true</extensions> - <configuration> - <failOnMissingEmbed>true</failOnMissingEmbed> - <force>true</force> - </configuration> - </plugin> - <plugin> - <groupId>io.wcm.maven.plugins</groupId> - <artifactId>wcmio-content-package-maven-plugin</artifactId> - <version>${wcmio.plugin.version}</version> - <configuration> - <serviceURL>http://${sling.host}:${sling.port}/bin/cpm/</serviceURL> - <userId>${sling.user}</userId> - <password>${sling.password}</password> - <failOnMissingEmbed>true</failOnMissingEmbed> - <force>true</force> - <group>cpconverter</group> - </configuration> - </plugin> - <!-- Apache Felix Bundle Plugin --> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>${bundle.plugin.version}</version> <inherited>true</inherited> </plugin> - <!-- Maven Dependency Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>${dependency.plugin.version}</version> - </plugin> - <!-- Build Helper Maven Plugin --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>${build.helper.plugin.version}</version> - </plugin> </plugins> - </pluginManagement> </build> - <!-- ====================================================================== --> - <!-- D E P E N D E N C I E S --> - <!-- ====================================================================== --> - <dependencyManagement> - <dependencies> - <!-- OSGi Dependencies --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi.core</artifactId> - <version>${osgi.core.version}</version> - <scope>provided</scope> - </dependency> - - <!-- OSGi annotations: @Version, @ProviderType, @ConsumerType --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi.annotation</artifactId> - <version>${osgi.annotation.version}</version> - <scope>provided</scope> - </dependency> - - <!-- OSGi annotations for DS and metatype --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.service.component.annotations</artifactId> - <version>${org.osgi.service.component.annotations.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.service.metatype.annotations</artifactId> - <version>${org.osgi.service.metatype.annotations.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Needs to be placed after 'org.osgi.service.component.annotations' otherwise field @Reference will not work --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - <version>${org.osgi.compendium.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Web Application API --> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - <version>${javax.servlet-api.version}</version> - <scope>provided</scope> - </dependency> - - <!-- dependency injection annotations --> - <dependency> - <groupId>javax.inject</groupId> - <artifactId>javax.inject</artifactId> - <version>$[javax.inject.version</version> - <scope>provided</scope> - </dependency> - - <!-- JCR API --> - <dependency> - <groupId>javax.jcr</groupId> - <artifactId>jcr</artifactId> - <version>${jcr.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Basic Logging --> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.7.6</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.jetbrains</groupId> - <artifactId>annotations</artifactId> - <version>${jetbrains.annotations.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Apache Sling Dependencies --> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.api</artifactId> - <version>2.9.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.settings</artifactId> - <version>${sling.settings.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.commons.osgi</artifactId> - <version>${sling.commons.osgi.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.models.api</artifactId> - <version>${sling.models.api.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-api</artifactId> - <version>${jackrabbit-api.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Support --> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>${commons-lang.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Basic dependencies for Unit Tests --> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.jmock</groupId> - <artifactId>jmock-junit4</artifactId> - <version>${jmock-junit4.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-simple</artifactId> - <version>1.7.6</version> - <scope>test</scope> - </dependency> - </dependencies> - </dependencyManagement> <modules> <module>core</module> <module>ui.apps</module> diff --git a/src/it/package-with-single-bundle-target-mode/ui.apps/pom.xml b/src/it/package-with-single-bundle-target-mode/ui.apps/pom.xml index 393a432..dffa003 100644 --- a/src/it/package-with-single-bundle-target-mode/ui.apps/pom.xml +++ b/src/it/package-with-single-bundle-target-mode/ui.apps/pom.xml @@ -23,44 +23,29 @@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode</artifactId> <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode</artifactId> <version>1.0.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> </parent> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode.ui.apps</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode.ui.apps</artifactId> <packaging>content-package</packaging> <name>CQ Converter Test - UI Apps</name> <description> - This is an empty JCR Package where the JCR Content - can be deployed with. + Sling Feature Converter Maven Plugin Core Test Content Bundle in Target Mode </description> - <!-- NOTE: - For a 'not all' package this JCR Package will embedd - the "core" bundle. It can be deployed with the - "autoInstallPackage" profile. - For an 'all' package this only provides the content - of the project which is deployed in the root with - the "autoInstallAll" profile. - - It is advisable to deploy any bundles or packages - in one manner as deploying bundles inside a package - and through the System Console can lead to unexpected - and errorneous situations. - --> <dependencies> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode.core</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode.core</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.feature.cpconverter</artifactId> - <version>0.0.1-SNAPSHOT</version> + <version>${org.apache.sling.feature.cpconverter.version}</version> </dependency> </dependencies> @@ -75,7 +60,7 @@ <embeddeds> <embedded> <groupId>${project.groupId}</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-target-mode.core</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-target-mode.core</artifactId> <filter>true</filter> </embedded> </embeddeds> @@ -83,26 +68,4 @@ </plugin> </plugins> </build> - <profiles> - <!-- ATTENTION: It is highly recomended not to deploy this with this Profile if this Package was or will be deployed with the All package --> - <profile> - <id>autoInstallPackage</id> - <build> - <plugins> - <plugin> - <groupId>io.wcm.maven.plugins</groupId> - <artifactId>wcmio-content-package-maven-plugin</artifactId> - <executions> - <execution> - <id>install-package</id> - <goals> - <goal>install</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> diff --git a/src/it/package-with-single-bundle-target-mode/verify.bsh b/src/it/package-with-single-bundle-target-mode/verify.bsh index 28993ab..91cbfc5 100644 --- a/src/it/package-with-single-bundle-target-mode/verify.bsh +++ b/src/it/package-with-single-bundle-target-mode/verify.bsh @@ -19,10 +19,11 @@ import java.util.*; import org.codehaus.plexus.util.*; boolean check() { - String projectName = "sling-cpconverter-maven-plugin-test-target-mode.ui.apps"; - String projectCoreName = "sling-cpconverter-maven-plugin-test-target-mode.core"; - String projectVersion = "1.0.0-SNAPSHOT"; - String projectGroup = "org.apache.sling"; + String projectName = "sling-feature-converter-maven-plugin-test-target-mode.ui.apps"; + String projectCoreName = "sling-feature-converter-maven-plugin-test-target-mode.core"; + // These are <scriptVariables/> provided by the plugin POM + String projectVersion = plugin.version; + String projectGroup = plugin.group; String projectGroupPath = projectGroup.replaceAll("\\.", "/"); File cpTargetFolder = new File(basedir, "ui.apps/target"); diff --git a/src/it/package-with-single-bundle-with-parameters/core/pom.xml b/src/it/package-with-single-bundle-with-parameters/core/pom.xml index 1fc3757..86dfd70 100644 --- a/src/it/package-with-single-bundle-with-parameters/core/pom.xml +++ b/src/it/package-with-single-bundle-with-parameters/core/pom.xml @@ -22,26 +22,17 @@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>sling-cpconverter-maven-plugin-test-with-param</artifactId> <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-with-param</artifactId> <version>1.0.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> </parent> - <artifactId>sling-cpconverter-maven-plugin-test-with-param.core</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-with-param.core</artifactId> <packaging>bundle</packaging> - <name>CQ Converter Test - Core</name> + <name>Sling Feature Converter Maven Plugin Test With Parameter - Core</name> <description> - This is an empty OSGi Bundle which can be used - to compile and deploy OSGi Services to Sling. - - This Bundle can be deployed using the Profile - "autoInstallBundle" but that should not be used - together with the "ui.apps" Profile "autoInstallAll" - as they are not deployed the same way and can lead - to undesired issues during deployment (bundle not - updated or not working at all). + Sling Feature Converter Maven Plugin Core Test Bundle With Parameters </description> <build> @@ -97,15 +88,6 @@ <artifactId>org.osgi.service.component.annotations</artifactId> </dependency> <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.service.metatype.annotations</artifactId> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - </dependency> - - <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> </dependency> @@ -122,29 +104,12 @@ <artifactId>org.apache.sling.models.api</artifactId> </dependency> <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-api</artifactId> - </dependency> - - <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> - - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </dependency> - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> </dependencies> - - <!-- - Attention: the autoInstallBundle was removed as deploying bundles directly and through a package is causing - issues with updates and can prevent the latest code of a bundle being deployed. - If you know what you are doing then you can use maven-sling-plugin directly from the Maven CLI. - --> </project> diff --git a/src/it/package-with-single-bundle-with-parameters/pom.xml b/src/it/package-with-single-bundle-with-parameters/pom.xml index 5df12ef..d80277a 100644 --- a/src/it/package-with-single-bundle-with-parameters/pom.xml +++ b/src/it/package-with-single-bundle-with-parameters/pom.xml @@ -13,86 +13,28 @@ <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>org.apache.sling</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-with-param</artifactId> - <packaging>pom</packaging> - <version>1.0.0-SNAPSHOT</version> - <name>Apache Sling Features Maven plugin test - with parameter</name> - <description>This is just an Apache Sling Content Package Maven plugin test to convert a package with a single - bundle - </description> - <organization> - <name>The Apache Software Foundation</name> - <url>https://www.apache.org/</url> - </organization> - <licenses> - <license> - <name>Apache License, Version 2.0</name> - <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> - <distribution>repo</distribution> - </license> - </licenses> - <properties> - <interpolated_variable>true</interpolated_variable> - <osgi.framework.version>1.9.0</osgi.framework.version> - <sling.framework.install.incremental>true</sling.framework.install.incremental> - <sling.framework.install.startlevel>1</sling.framework.install.startlevel> - <sling.ignoreSystemProperties>true</sling.ignoreSystemProperties> - <sling.host>localhost</sling.host> - <sling.port>8080</sling.port> - <sling.user>admin</sling.user> + <parent> + <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> - <sling.password>admin</sling.password> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <artifactId>sling-feature-converter-maven-plugin-test-with-param</artifactId> + <packaging>pom</packaging> - <release.plugin.version>2.5.3</release.plugin.version> - <source.plugin.version>3.0.1</source.plugin.version> - <resource.plugin.version>3.1.0</resource.plugin.version> - <jar.plugin.version>3.1.1</jar.plugin.version> - <enforcer.plugin.version>3.0.0-M2</enforcer.plugin.version> - <compiler.plugin.version>3.8.0</compiler.plugin.version> - <bundle.plugin.version>4.2.0</bundle.plugin.version> - <clean.plugin.version>3.1.0</clean.plugin.version> - <installer.plugin.version>3.0.0-M1</installer.plugin.version> - <surfire.plugin.version>3.0.0-M3</surfire.plugin.version> - <failsafe.plugin.version>3.0.0-M3</failsafe.plugin.version> - <deploy.plugin.version>3.0.0-M1</deploy.plugin.version> - <sling.plugin.version>2.4.0</sling.plugin.version> - <dependency.plugin.version>3.1.1</dependency.plugin.version> - <build.helper.plugin.version>3.0.0</build.helper.plugin.version> - <wcmio.plugin.version>1.6.18</wcmio.plugin.version> - <filevault-package.plugin.version>1.0.3</filevault-package.plugin.version> + <name>Apache Sling Features Converter Maven Plugin test - with parameter</name> + <description> + This is an Apache Sling Feature Converter Maven plugin test to convert a package with a single bundle with Parameters + </description> - <osgi.core.version>7.0.0</osgi.core.version> - <osgi.annotation.version>7.0.0</osgi.annotation.version> - <org.osgi.service.component.annotations.version>1.4.0</org.osgi.service.component.annotations.version> - <org.osgi.service.metatype.annotations.version>1.4.0</org.osgi.service.metatype.annotations.version> - <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version> - <javax.servlet-api.version>3.1.0</javax.servlet-api.version> - <javax.inject.version>1</javax.inject.version> - <jcr.version>2.0</jcr.version> - <sling.models.api.version>1.3.6</sling.models.api.version> - <jetbrains.annotations.version>16.0.2</jetbrains.annotations.version> - <sling.settings.version>1.3.10</sling.settings.version> - <sling.commons.osgi.version>2.4.0</sling.commons.osgi.version> - <jackrabbit-api.version>2.16.3</jackrabbit-api.version> - <commons-lang.version>2.6</commons-lang.version> - <jmock-junit4.version>2.8.2</jmock-junit4.version> - </properties> <build> <plugins> <!-- Maven Release Plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> - <configuration> - <scmCommentPrefix>[maven-scm] :</scmCommentPrefix> - <preparationGoals>clean install</preparationGoals> - <goals>install</goals> - <releaseProfiles>release</releaseProfiles> - </configuration> + <inherited>true</inherited> </plugin> <!-- Maven Source Plugin --> <plugin> @@ -104,9 +46,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> - <configuration> - <encoding>UTF-8</encoding> - </configuration> + <inherited>true</inherited> </plugin> <!-- Maven Jar Plugin --> <plugin> @@ -117,299 +57,17 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <executions> - <execution> - <id>enforce-maven</id> - <goals> - <goal>enforce</goal> - </goals> - <configuration> - <rules> - <requireMavenVersion> - <message>Project must be built with Maven 3.1.0 or higher</message> - <version>[3.1.0,)</version> - </requireMavenVersion> - <requireJavaVersion> - <message>Project must be compiled with Java 7 or higher</message> - <version>1.7.0</version> - </requireJavaVersion> - </rules> - </configuration> - </execution> - </executions> + <inherited>true</inherited> </plugin> <!-- Maven Compiler Plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>8</source> - <target>8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <!-- Maven Release Plugin --> - <plugin> - <artifactId>maven-release-plugin</artifactId> - <version>${release.plugin.version}</version> - </plugin> - <!-- Maven Source Plugin --> - <plugin> - <artifactId>maven-source-plugin</artifactId> - <version>${source.plugin.version}</version> - </plugin> - <!-- Maven Resources Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>${resource.plugin.version}</version> - </plugin> - <!-- Maven Jar Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>${jar.plugin.version}</version> - </plugin> - <!-- Maven Enforcer Plugin --> - <plugin> - <artifactId>maven-enforcer-plugin</artifactId> - <version>${enforcer.plugin.version}</version> - </plugin> - <!-- Maven Compiler Plugin --> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <version>${compiler.plugin.version}</version> - </plugin> - - <!-- Maven Clean Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-clean-plugin</artifactId> - <version>${clean.plugin.version}</version> - </plugin> - <!-- Maven Installer Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-install-plugin</artifactId> - <version>${installer.plugin.version}</version> - </plugin> - <!-- Maven Surefire Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surfire.plugin.version}</version> - </plugin> - <!-- Maven Failsafe Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <version>${failsafe.plugin.version}</version> - </plugin> - <!-- Maven Deploy Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - <version>${deploy.plugin.version}</version> - </plugin> - <!-- Apache Sling Plugin --> - <plugin> - <groupId>org.apache.sling</groupId> - <artifactId>maven-sling-plugin</artifactId> - <version>${sling.plugin.version}</version> - </plugin> - <!-- Content Package Plugin --> - <plugin> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>filevault-package-maven-plugin</artifactId> - <version>${filevault-package.plugin.version}</version> - <extensions>true</extensions> - <configuration> - <failOnMissingEmbed>true</failOnMissingEmbed> - <force>true</force> - </configuration> - </plugin> - <plugin> - <groupId>io.wcm.maven.plugins</groupId> - <artifactId>wcmio-content-package-maven-plugin</artifactId> - <version>${wcmio.plugin.version}</version> - <configuration> - <serviceURL>http://${sling.host}:${sling.port}/bin/cpm/</serviceURL> - <userId>${sling.user}</userId> - <password>${sling.password}</password> - <failOnMissingEmbed>true</failOnMissingEmbed> - <force>true</force> - <group>cpconverter</group> - </configuration> - </plugin> - <!-- Apache Felix Bundle Plugin --> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>${bundle.plugin.version}</version> <inherited>true</inherited> </plugin> - <!-- Maven Dependency Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>${dependency.plugin.version}</version> - </plugin> - <!-- Build Helper Maven Plugin --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>${build.helper.plugin.version}</version> - </plugin> </plugins> - </pluginManagement> </build> - <!-- ====================================================================== --> - <!-- D E P E N D E N C I E S --> - <!-- ====================================================================== --> - <dependencyManagement> - <dependencies> - <!-- OSGi Dependencies --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi.core</artifactId> - <version>${osgi.core.version}</version> - <scope>provided</scope> - </dependency> - - <!-- OSGi annotations: @Version, @ProviderType, @ConsumerType --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>osgi.annotation</artifactId> - <version>${osgi.annotation.version}</version> - <scope>provided</scope> - </dependency> - - <!-- OSGi annotations for DS and metatype --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.service.component.annotations</artifactId> - <version>${org.osgi.service.component.annotations.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.service.metatype.annotations</artifactId> - <version>${org.osgi.service.metatype.annotations.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Needs to be placed after 'org.osgi.service.component.annotations' otherwise field @Reference will not work --> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - <version>${org.osgi.compendium.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Web Application API --> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - <version>${javax.servlet-api.version}</version> - <scope>provided</scope> - </dependency> - - <!-- dependency injection annotations --> - <dependency> - <groupId>javax.inject</groupId> - <artifactId>javax.inject</artifactId> - <version>$[javax.inject.version</version> - <scope>provided</scope> - </dependency> - - <!-- JCR API --> - <dependency> - <groupId>javax.jcr</groupId> - <artifactId>jcr</artifactId> - <version>${jcr.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Basic Logging --> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.7.6</version> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.jetbrains</groupId> - <artifactId>annotations</artifactId> - <version>${jetbrains.annotations.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Apache Sling Dependencies --> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.api</artifactId> - <version>2.9.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.settings</artifactId> - <version>${sling.settings.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.commons.osgi</artifactId> - <version>${sling.commons.osgi.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.models.api</artifactId> - <version>${sling.models.api.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.jackrabbit</groupId> - <artifactId>jackrabbit-api</artifactId> - <version>${jackrabbit-api.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Support --> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>${commons-lang.version}</version> - <scope>provided</scope> - </dependency> - - <!-- Basic dependencies for Unit Tests --> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.jmock</groupId> - <artifactId>jmock-junit4</artifactId> - <version>${jmock-junit4.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-simple</artifactId> - <version>1.7.6</version> - <scope>test</scope> - </dependency> - </dependencies> - </dependencyManagement> <modules> <module>core</module> <module>ui.apps</module> diff --git a/src/it/package-with-single-bundle-with-parameters/ui.apps/pom.xml b/src/it/package-with-single-bundle-with-parameters/ui.apps/pom.xml index a3d1a68..c80a8da 100644 --- a/src/it/package-with-single-bundle-with-parameters/ui.apps/pom.xml +++ b/src/it/package-with-single-bundle-with-parameters/ui.apps/pom.xml @@ -23,44 +23,29 @@ <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>sling-cpconverter-maven-plugin-test-with-param</artifactId> <groupId>org.apache.sling</groupId> + <artifactId>sling-feature-converter-maven-plugin-test-with-param</artifactId> <version>1.0.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> </parent> - <artifactId>sling-cpconverter-maven-plugin-test-with-param.ui.apps</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-with-param.ui.apps</artifactId> <packaging>content-package</packaging> - <name>CQ Converter Test - UI Apps</name> + <name>Sling Feature Converter Maven Plugin Wotj Parameter Test - UI Apps</name> <description> - This is an empty JCR Package where the JCR Content - can be deployed with. + Sling Feature Converter Maven Plugin Core Test Content Bundle With Parameter </description> - <!-- NOTE: - For a 'not all' package this JCR Package will embedd - the "core" bundle. It can be deployed with the - "autoInstallPackage" profile. - For an 'all' package this only provides the content - of the project which is deployed in the root with - the "autoInstallAll" profile. - - It is advisable to deploy any bundles or packages - in one manner as deploying bundles inside a package - and through the System Console can lead to unexpected - and errorneous situations. - --> <dependencies> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-with-param.core</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-with-param.core</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.feature.cpconverter</artifactId> - <version>0.0.1-SNAPSHOT</version> + <version>${org.apache.sling.feature.cpconverter.version}</version> </dependency> </dependencies> @@ -75,7 +60,7 @@ <embeddeds> <embedded> <groupId>${project.groupId}</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-with-param.core</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-with-param.core</artifactId> <filter>true</filter> </embedded> </embeddeds> @@ -104,26 +89,4 @@ </plugin> </plugins> </build> - <profiles> - <!-- ATTENTION: It is highly recomended not to deploy this with this Profile if this Package was or will be deployed with the All package --> - <profile> - <id>autoInstallPackage</id> - <build> - <plugins> - <plugin> - <groupId>io.wcm.maven.plugins</groupId> - <artifactId>wcmio-content-package-maven-plugin</artifactId> - <executions> - <execution> - <id>install-package</id> - <goals> - <goal>install</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> diff --git a/src/it/package-with-single-bundle-with-parameters/verify.bsh b/src/it/package-with-single-bundle-with-parameters/verify.bsh index fbac8ab..8531f76 100644 --- a/src/it/package-with-single-bundle-with-parameters/verify.bsh +++ b/src/it/package-with-single-bundle-with-parameters/verify.bsh @@ -19,10 +19,11 @@ import java.util.*; import org.codehaus.plexus.util.*; boolean check() { - String projectName = "sling-cpconverter-maven-plugin-test-with-param.ui.apps"; - String projectCoreName = "sling-cpconverter-maven-plugin-test-with-param.core"; - String projectVersion = "1.0.0-SNAPSHOT"; - String projectGroup = "org.apache.sling"; + String projectName = "sling-feature-converter-maven-plugin-test-with-param.ui.apps"; + String projectCoreName = "sling-feature-converter-maven-plugin-test-with-param.core"; + // These are <scriptVariables/> provided by the plugin POM + String projectVersion = plugin.version; + String projectGroup = plugin.group; String projectGroupPath = projectGroup.replaceAll("\\.", "/"); File targetFolder = new File(basedir, "ui.apps/target"); diff --git a/src/it/setup-tests/ReadMe.md b/src/it/setup-tests/ReadMe.md new file mode 100644 index 0000000..1806c0f --- /dev/null +++ b/src/it/setup-tests/ReadMe.md @@ -0,0 +1,7 @@ +# Parent POM for the IT Tests + +This pom.xml and invoker.properties file provide the common settings for +the IT tests for this Maven Plugin to avoid duplication. + +This is then used by the Maven Invoker Plugin that is calling this as a +setup project because the parent folder starts with **setup**. \ No newline at end of file diff --git a/src/it/setup-tests/invoker.properties b/src/it/setup-tests/invoker.properties new file mode 100644 index 0000000..209b6ef --- /dev/null +++ b/src/it/setup-tests/invoker.properties @@ -0,0 +1,17 @@ +# 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. + +invoker.goals = clean install +invoker.debug = true diff --git a/src/it/package-with-single-bundle-no-parameters/pom.xml b/src/it/setup-tests/pom.xml similarity index 56% copy from src/it/package-with-single-bundle-no-parameters/pom.xml copy to src/it/setup-tests/pom.xml index 5ddd115..5c4977a 100644 --- a/src/it/package-with-single-bundle-no-parameters/pom.xml +++ b/src/it/setup-tests/pom.xml @@ -13,14 +13,17 @@ <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.sling</groupId> - <artifactId>sling-cpconverter-maven-plugin-test-no-param</artifactId> + <artifactId>sling-feature-converter-maven-plugin-test-parent</artifactId> <packaging>pom</packaging> <version>1.0.0-SNAPSHOT</version> - <name>Apache Sling Features Maven plugin test - no parameter</name> - <description>This is just an Apache Sling Content Package Maven plugin test to convert a package with a single - bundle + + <name>Apache Sling Features Converter Maven Plugin test - Parent</name> + <description> + This is the Parent POM for the IT tests of the Sling Feature Converter Maven Plugin </description> + <organization> <name>The Apache Software Foundation</name> <url>https://www.apache.org/</url> @@ -32,20 +35,11 @@ <distribution>repo</distribution> </license> </licenses> + <properties> <interpolated_variable>true</interpolated_variable> - <osgi.framework.version>1.9.0</osgi.framework.version> - <sling.framework.install.incremental>true</sling.framework.install.incremental> - <sling.framework.install.startlevel>1</sling.framework.install.startlevel> - <sling.ignoreSystemProperties>true</sling.ignoreSystemProperties> - - <sling.host>localhost</sling.host> - <sling.port>8080</sling.port> - <sling.user>admin</sling.user> - <sling.password>admin</sling.password> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <org.apache.sling.feature.cpconverter.version>1.0.2</org.apache.sling.feature.cpconverter.version> <release.plugin.version>2.5.3</release.plugin.version> <source.plugin.version>3.0.1</source.plugin.version> @@ -71,90 +65,25 @@ <org.osgi.service.metatype.annotations.version>1.4.0</org.osgi.service.metatype.annotations.version> <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version> <javax.servlet-api.version>3.1.0</javax.servlet-api.version> - <javax.inject.version>1</javax.inject.version> <jcr.version>2.0</jcr.version> <sling.models.api.version>1.3.6</sling.models.api.version> - <jetbrains.annotations.version>16.0.2</jetbrains.annotations.version> - <sling.settings.version>1.3.10</sling.settings.version> - <sling.commons.osgi.version>2.4.0</sling.commons.osgi.version> <jackrabbit-api.version>2.16.3</jackrabbit-api.version> <commons-lang.version>2.6</commons-lang.version> - <jmock-junit4.version>2.8.2</jmock-junit4.version> </properties> + <build> - <plugins> - <!-- Maven Release Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-release-plugin</artifactId> - <configuration> - <scmCommentPrefix>[maven-scm] :</scmCommentPrefix> - <preparationGoals>clean install</preparationGoals> - <goals>install</goals> - <releaseProfiles>release</releaseProfiles> - </configuration> - </plugin> - <!-- Maven Source Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <inherited>true</inherited> - </plugin> - <!-- Maven Resources Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <configuration> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - <!-- Maven Jar Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - </plugin> - <!-- Maven Enforcer Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-enforcer-plugin</artifactId> - <executions> - <execution> - <id>enforce-maven</id> - <goals> - <goal>enforce</goal> - </goals> - <configuration> - <rules> - <requireMavenVersion> - <message>Project must be built with Maven 3.1.0 or higher</message> - <version>[3.1.0,)</version> - </requireMavenVersion> - <requireJavaVersion> - <message>Project must be compiled with Java 7 or higher</message> - <version>1.7.0</version> - </requireJavaVersion> - </rules> - </configuration> - </execution> - </executions> - </plugin> - <!-- Maven Compiler Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>8</source> - <target>8</target> - <encoding>UTF-8</encoding> - </configuration> - </plugin> - </plugins> <pluginManagement> <plugins> <!-- Maven Release Plugin --> <plugin> <artifactId>maven-release-plugin</artifactId> <version>${release.plugin.version}</version> + <configuration> + <scmCommentPrefix>[maven-scm] :</scmCommentPrefix> + <preparationGoals>clean install</preparationGoals> + <goals>install</goals> + <releaseProfiles>release</releaseProfiles> + </configuration> </plugin> <!-- Maven Source Plugin --> <plugin> @@ -166,6 +95,9 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${resource.plugin.version}</version> + <configuration> + <encoding>UTF-8</encoding> + </configuration> </plugin> <!-- Maven Jar Plugin --> <plugin> @@ -180,8 +112,14 @@ </plugin> <!-- Maven Compiler Plugin --> <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${compiler.plugin.version}</version> + <configuration> + <source>8</source> + <target>8</target> + <encoding>UTF-8</encoding> + </configuration> </plugin> <!-- Maven Clean Plugin --> @@ -190,36 +128,6 @@ <artifactId>maven-clean-plugin</artifactId> <version>${clean.plugin.version}</version> </plugin> - <!-- Maven Installer Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-install-plugin</artifactId> - <version>${installer.plugin.version}</version> - </plugin> - <!-- Maven Surefire Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surfire.plugin.version}</version> - </plugin> - <!-- Maven Failsafe Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <version>${failsafe.plugin.version}</version> - </plugin> - <!-- Maven Deploy Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - <version>${deploy.plugin.version}</version> - </plugin> - <!-- Apache Sling Plugin --> - <plugin> - <groupId>org.apache.sling</groupId> - <artifactId>maven-sling-plugin</artifactId> - <version>${sling.plugin.version}</version> - </plugin> <!-- Content Package Plugin --> <plugin> <groupId>org.apache.jackrabbit</groupId> @@ -231,19 +139,6 @@ <force>true</force> </configuration> </plugin> - <plugin> - <groupId>io.wcm.maven.plugins</groupId> - <artifactId>wcmio-content-package-maven-plugin</artifactId> - <version>${wcmio.plugin.version}</version> - <configuration> - <serviceURL>http://${sling.host}:${sling.port}/bin/cpm/</serviceURL> - <userId>${sling.user}</userId> - <password>${sling.password}</password> - <failOnMissingEmbed>true</failOnMissingEmbed> - <force>true</force> - <group>cpconverter</group> - </configuration> - </plugin> <!-- Apache Felix Bundle Plugin --> <plugin> <groupId>org.apache.felix</groupId> @@ -251,18 +146,6 @@ <version>${bundle.plugin.version}</version> <inherited>true</inherited> </plugin> - <!-- Maven Dependency Plugin --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>${dependency.plugin.version}</version> - </plugin> - <!-- Build Helper Maven Plugin --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>${build.helper.plugin.version}</version> - </plugin> </plugins> </pluginManagement> </build> @@ -272,6 +155,12 @@ <!-- ====================================================================== --> <dependencyManagement> <dependencies> + <dependency> + <groupId>org.apache.sling</groupId> + <artifactId>org.apache.sling.feature.cpconverter</artifactId> + <version>${org.apache.sling.feature.cpconverter.version}</version> + </dependency> + <!-- OSGi Dependencies --> <dependency> <groupId>org.osgi</groupId> @@ -318,14 +207,6 @@ <scope>provided</scope> </dependency> - <!-- dependency injection annotations --> - <dependency> - <groupId>javax.inject</groupId> - <artifactId>javax.inject</artifactId> - <version>$[javax.inject.version</version> - <scope>provided</scope> - </dependency> - <!-- JCR API --> <dependency> <groupId>javax.jcr</groupId> @@ -342,13 +223,6 @@ <scope>provided</scope> </dependency> - <dependency> - <groupId>org.jetbrains</groupId> - <artifactId>annotations</artifactId> - <version>${jetbrains.annotations.version}</version> - <scope>provided</scope> - </dependency> - <!-- Apache Sling Dependencies --> <dependency> <groupId>org.apache.sling</groupId> @@ -358,18 +232,6 @@ </dependency> <dependency> <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.settings</artifactId> - <version>${sling.settings.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> - <artifactId>org.apache.sling.commons.osgi</artifactId> - <version>${sling.commons.osgi.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.models.api</artifactId> <version>${sling.models.api.version}</version> <scope>provided</scope> @@ -396,23 +258,7 @@ <version>4.12</version> <scope>test</scope> </dependency> - <dependency> - <groupId>org.jmock</groupId> - <artifactId>jmock-junit4</artifactId> - <version>${jmock-junit4.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-simple</artifactId> - <version>1.7.6</version> - <scope>test</scope> - </dependency> </dependencies> </dependencyManagement> - <modules> - <module>core</module> - <module>ui.apps</module> - </modules> </project> diff --git a/src/site/markdown/usage.md.vm b/src/site/markdown/usage.md.vm index 0c63fc9..253167f 100644 --- a/src/site/markdown/usage.md.vm +++ b/src/site/markdown/usage.md.vm @@ -6,7 +6,16 @@ #set($sp2 = '${{') #set($sp3 = '${{{') #set($ep = '}') - +## Version for the JCR Packageinit +#set($jpiv = '0.0.1-SNAPSHOT') +## Version for the Slingfeature Maven Plugin +#set($sfmpv = '1.1.12') +## Version for the Sling Feature Extension Content +#set($sfecv = '1.0.5-SNAPSHOT') +## Version for the Sling Feature Launcher +#set($sflv = '1.1.0') +## Version for this Plugin (Sling Feature Converter Maven Plugin) +#set($sfcmpv = '1.0.0-SNAPSHOT') $h2 Usage @@ -37,7 +46,7 @@ the project is launched: <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.jcr.packageinit</artifactId> - <version>0.0.1-SNAPSHOT</version> + <version>${jpiv}</version> </dependency> ... </dependencies> @@ -53,7 +62,7 @@ here is placed in the **src/main/resouces/fm** folder named **sling_packageinit. }, "bundles":[ { - "id":"org.apache.sling:org.apache.sling.jcr.packageinit:0.0.1-SNAPSHOT", + "id":"org.apache.sling:org.apache.sling.jcr.packageinit:${jpiv}", "start-level":"10" } ] @@ -172,7 +181,7 @@ be relative to the basedir and cannot be absolute): <plugin> <groupId>org.apache.sling</groupId> <artifactId>slingfeature-maven-plugin</artifactId> - <version>1.0.7-SNAPSHOT</version> + <version>${sfmpv}</version> <extensions>true</extensions> <configuration> <features>target/fm</features> @@ -246,7 +255,7 @@ 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>1.0.7-SNAPSHOT</version> + <version>${sfmpv}</version> <extensions>true</extensions> <dependencies> <!-- For now the Extension Content has to be placed ahead of the launcher to make CP @@ -254,12 +263,12 @@ if the project is buil with goal **install** and profile **launch** (mvn install <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.feature.extension.content</artifactId> - <version>1.0.5-SNAPSHOT</version> + <version>${sfecv}</version> </dependency> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.feature.launcher</artifactId> - <version>1.0.7-SNAPSHOT</version> + <version>${sflv}</version> </dependency> </dependencies> <executions> @@ -332,7 +341,7 @@ First in each Content Package module add this plugin configuration to your POM i </plugin> ``` -* **sling-feature-converter-maven-plugin.version**: is a property with the version of this plugin to be used (1.0.0-SNAPSHOT for now) +* **sling-feature-converter-maven-plugin.version**: is a property with the version of this plugin to be used (${sfcmpv} for now) * **artifactIdOverride**: This should match the Maven Id with this pattern: 'groupId':'artifactId':'type fixed to slingosgifeature':'classifier':'version' * **installConvertedCP**: must be set to true otherwise I cannot be assembled later * **convertedCPOutput/fmOutput/fmPrefix**: adjust to your preferences
