You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:28:09 UTC
[sling-slingstart-maven-plugin] annotated tag
slingstart-maven-plugin-1.7.0 created (now 59331af)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a change to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git.
at 59331af (tag)
tagging 41536225b38f2b876da301ac8b52fef4d68f537e (commit)
by Carsten Ziegeler
on Thu Dec 15 06:09:12 2016 +0000
- Log -----------------------------------------------------------------
slingstart-maven-plugin-1.7.0
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new 87744a4 Add slingstart maven plugin
new d0a48e9 Add slingstart maven plugin
new 9544826 Update javadocs and rename subsystem to deliverable and run mode to feature
new 869228d Rename classes
new 5758009 Fully support Apach Felix config file format. Move from properties to getter and setter methods
new 42e2fe7 Implement txt format for reading and writing
new c348dc3 Implement txt format for reading and writing
new cb34728 Add merger utility and variable replacement
new c360a20 Cache raw and effective model and provide separate methods
new 08649e0 Adjust to new model
new 46b2387 Update to Sling Parent POM 22 with baselining enabled
new 799c129 Move io methods to helper class
new 6fa67eb Move io methods to helper class
new 9292c9f Use provisioning model
new 68bc095 Correct model caching
new 22e62c6 Rename constants
new 2b243e6 Rename artifact handlers and components
new b4cf460 Get artifacts from repositor if overlayed with a different version
new 84605ad Fix special configuration handling and effective model retrival
new 8fb99d7 Make prepare mojo subclassable
new 3aaf03c Correct extension for config files
new 85bf931 SLING-4081 - SlingStart Maven Plugin fails if the organization is not defined in pom.xml
new 3116925 Moved invocation of org.apache.sling:slingstart-maven-plugin:prepare-package to prepare-package lifecycle phase
new 90e5c8f Rename directory to use from models to provisioning
new c0ef68c Use released provisioning model
new dfabbb8 [maven-release-plugin] prepare release slingstart-maven-plugin-1.0.0
new 6c8eeeb [maven-release-plugin] prepare for next development iteration
new 968d118 Switch to snapshot until release vote is done
new 1f80af8 Use released provisioning model
new bbd3ef7 SLING-4121 : Bootstrap file is created in wrong directory for webapp
new ef15cd3 SLING-4123 : Wrong packaging used for feature
new 38be5ce [maven-release-plugin] prepare release slingstart-maven-plugin-1.0.2
new 71a346e [maven-release-plugin] prepare for next development iteration
new 194cbd8 SLING-4479 : Inherited models are processed in the wrong order
new f83d1b7 SLING-4479 : Inherited models are processed in the wrong order
new 3272ecb [maven-release-plugin] prepare release slingstart-maven-plugin-1.0.4
new 806532a [maven-release-plugin] prepare for next development iteration
new 037927e fix build (use 1.1.1-SNAPSHOT of org.apache.sling.provisioning.model)
new 8668df1 Use released provisioning model
new b0c766a SLING-4474 : Provide a way to start/stop an instance through maven mojos
new 5a664a1 SLING-4600 : Migrate launchpad/test-bundles to provisioning model
new 4e5f8e1 SLING-4598 : Migrate launchpad testing to provisioning model
new 01ce90b Remove unused code and add failing project to exception
new 7861695 Delay resolving of reactor projects until project is built
new 2cfdf79 Correct type/language of slingstart packaging
new 350917d Get dependent projects from build if build in the same build
new 93c268f Check main artifact and attached artifacts for artifacts from the same build
new e2fb051 Refactor slingstart maven plugin: resolve slingstart/slingfeature projects during setup of maven (reactor) project
new 5e423dd Implement control port option
new fd065be SLING-4620 : Slingstart plugin start goal exits even if launchpad.keep.running is set to true
new d5508d2 Use maven.skip.test as the property for skipping the start/stop goals
new 8e24720 SLING-4620 : Slingstart plugin start goal exits even if launchpad.keep.running is set to true
new a55291e [maven-release-plugin] prepare release slingstart-maven-plugin-1.1.0
new 5664925 [maven-release-plugin] prepare for next development iteration
new 265f5f4 SLING-4677 allow to start Sling in debug mode with a simple mojo parameter
new 89d49b0 SLING-4677 allow to override debug settings of all controlled Sling servers through Mojo parameter
new fbb9c15 SLING-4698 - Set parent.relativePath to empty for all modules
new 320de8f SLING-4766 Provisioning Model does not support adding variables to Sling Settings - allow escaping with \${var}
new f2865de SLING-4790 : Removal of artifacts from inherited model is not possible
new ddd4ba0 SLING-4790 : Removal of artifacts from inherited model is not possible
new 3982e2e Prepare for release
new 6cd730f [maven-release-plugin] prepare release slingstart-maven-plugin-1.2.0
new 29b2e20 [maven-release-plugin] prepare for next development iteration
new 2aa3b8f slingstart-maven-plugin: temporarily depend on SNAPSHOT version for provisioning.model
new ab60b2f Update to Sling Parent 23
new 858d446 set parent version to 24 and add empty relativePath where missing
new 72dfaf3 SLING-4879 Allow to read variables from POM
new cfa9a87 SLING-4880 Allow to get artifact versions from POM
new ce4b2b5 SLING-4880 Fix potential NPEs when resolving artifacts
new 51d72c9 SLING-4879 refactor model processing logic from ModelUtility#getEffectiveModel into separate class to make it reusable
new 55bf1b1 SLING-4879 update variables section in feature for attached artifact instead of using effective model
new f59b06d SLING-4880 apply resolved dependencies to raw model instead of attaching effective model add new optional parameter "allowUnresolvedPomDependencies" (default: false)
new b239b9c SLING-4889 : Provide a mojo to create a maven like structure of the referenced artifacts
new c2041da SLING-4889 : Provide a mojo to create a maven like structure of the referenced artifacts
new f93e40b SLING-4912 : Support inlining the model in the pom
new 34fac94 Use latest provisioning model
new 567d94e [maven-release-plugin] prepare release slingstart-maven-plugin-1.3.0
new 91768e0 [maven-release-plugin] prepare for next development iteration
new eba7ffa Switch to latest snapshot for the release vote time
new c0d83a9 Use released prov model
new 250f6a0 Use released prov model
new 0acafe1 SLING-4945 : Model files are missing from created repository SLING-4946 : Model dependencies are not followed transitively
new 9321ca4 [maven-release-plugin] prepare release slingstart-maven-plugin-1.3.2
new 0808f14 [maven-release-plugin] prepare for next development iteration
new e3c6967 SLING-4969 : Store aggregated model as artifact
new e52e8a2 SLING-4969 : Store aggregated model as artifact
new b0ca3ad [maven-release-plugin] prepare release slingstart-maven-plugin-1.3.4
new 9bd2b5e [maven-release-plugin] prepare for next development iteration
new 71a7942 SLING-4970 : Potential NPE with transitive models
new 30c2bf7 [maven-release-plugin] prepare release slingstart-maven-plugin-1.3.6
new 60c436f [maven-release-plugin] prepare for next development iteration
new 49d48b5 Update the main reactor to parent 25
new c3b709a SLING-5170 : Make dependency handling code more reusable
new b98555a SLING-5149 - Generate OSGi subsystem intermediary file in slingstart-maven-plugin
new f6075f8 SLING-5379 - support renaming of bundles in maven-slingstart-plugin. Contributed by David Bosschaert, thanks!
new fcda963 SLING-5379 - use BundleFileProcessor
new e8fd2c9 SLING-5379 - add BSNRenamer
new b703b6b Use latest prov model snapshot version
new f2ac4d9 Use provisioning model 1.4.2
new 9fb072d Switch to parent pom 26
new 16ca65a Use latest commons osgi release
new f679285 [maven-release-plugin] prepare release slingstart-maven-plugin-1.4.0
new 27b495b [maven-release-plugin] prepare for next development iteration
new 2e41a1d Switch to commons osgi 2.4.1 snapshot
new 590bd42 SLING-5414 - embed the full text of the provisioning model in the Sling jar, under /resources/provisioning/model.txt
new 854f279 SLING-5476 : target/classes should not be used by the plugin
new 80b5f02 SLING-5477 : Allow to add an artifact of the slingstart project to the model
new ebae600 Use released commons osgi
new 7ae1ea8 [maven-release-plugin] prepare release slingstart-maven-plugin-1.4.2
new aec1d36 [maven-release-plugin] prepare for next development iteration
new ca0b9d0 SLING-4677 clarify javadoc on debugging options
new af5befd SLING-5738 : Add support for configuring a pattern for the model files to be read
new d1ca2b2 Use provisioning model 1.4.4
new f6bbec6 [maven-release-plugin] prepare release slingstart-maven-plugin-1.4.4
new 4cf08cc [maven-release-plugin] prepare for next development iteration
new 0804217 Switch to provisioning model 1.4.5-SNAPSHOT during release vote
new 40ad7a7 SLING-6068 allow to build and start a quickstart even for non "slingstart" packaging projects.
new 21e28cf SLING-6212 : Create more meaningful exception if no model is found for attach goal
new 93f9f38 SLING-6213 : Provide a way to add artifacts from the current project to the provisioning model
new e017516 SLING-6219 : Provide configuration to add project version to feature
new 7b6e3d0 Clean up code
new 537fdb3 Use latest provisioning model snapshot
new fec71fe SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings
new e0e89f2 SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings
new 25c4c59 SLING-6068 : slingstart-maven-plugin: Allow to start a quickstart JAR based on a provisioning model even for non slingstart packagings
new fb3ba19 SLING-6068 fix javadoc
new 6179279 Use latest provisioning model
new 5d911a2 [maven-release-plugin] prepare release slingstart-maven-plugin-1.5.0
new 1211119 [maven-release-plugin] prepare for next development iteration
new 0fddded SLING-6266 : Feature version should be converted to OSGi version
new 4df72a8 Use provisioning model 1.7.0
new 9df43d8 [maven-release-plugin] prepare release slingstart-maven-plugin-1.6.0
new 762ae72 [maven-release-plugin] prepare for next development iteration
new c11342a Switch the prov model 1.7.1-SNAPSHOT during release
new 5f8e80b SLING-6278 : Provide tooling to create an archive with the provisioning model and all artifacts
new 8943fbf SLING-6284 - PreparePackageMojo.testSubsystemBaseGeneration often fails on Jenkins
new e09af72 SLING-6370 slingstart: start goal failes if not executed together with install
new ee0d1c5 SLING-6393 : Set project final name as default model archive name. Apply patch from Roy Teeuwen
new 7e9b0fb Use prov model 1.8.0 for release
new 64507bd [maven-release-plugin] prepare release slingstart-maven-plugin-1.7.0
new 4153622 [maven-release-plugin] copy for tag slingstart-maven-plugin-1.7.0
The 141 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].
[sling-slingstart-maven-plugin] 08/09: [maven-release-plugin]
prepare release slingstart-maven-plugin-1.7.0
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit 64507bd62ab7a201030e41c9bc73036a386ceec5
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Dec 15 06:08:58 2016 +0000
[maven-release-plugin] prepare release slingstart-maven-plugin-1.7.0
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1774369 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 3ae47e0..700caf7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
</parent>
<artifactId>slingstart-maven-plugin</artifactId>
- <version>1.6.1-SNAPSHOT</version>
+ <version>1.7.0</version>
<packaging>maven-plugin</packaging>
<name>Apache Sling SlingStart Maven Plugin</name>
@@ -35,9 +35,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/tooling/maven/slingstart-maven-plugin</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.7.0</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.7.0</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/slingstart-maven-plugin-1.7.0</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-slingstart-maven-plugin] 02/09: Switch the prov model
1.7.1-SNAPSHOT during release
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit c11342a3e410da00e955d598b8307a35718b0db3
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Nov 10 06:11:49 2016 +0000
Switch the prov model 1.7.1-SNAPSHOT during release
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1769046 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 20bec9e..aa08e1d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,7 +84,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.provisioning.model</artifactId>
- <version>1.7.0</version>
+ <version>1.7.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-slingstart-maven-plugin] 06/09: SLING-6393 : Set project
final name as default model archive name. Apply patch from Roy Teeuwen
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit ee0d1c584909d8e7c6314413be247838aa68237e
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Dec 14 07:54:53 2016 +0000
SLING-6393 : Set project final name as default model archive name. Apply patch from Roy Teeuwen
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1774129 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
.../org/apache/sling/maven/slingstart/AttachModelArchive.java | 9 ++++++++-
.../java/org/apache/sling/maven/slingstart/BuildConstants.java | 3 ---
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index aa08e1d..98220ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,7 +84,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.provisioning.model</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
diff --git a/src/main/java/org/apache/sling/maven/slingstart/AttachModelArchive.java b/src/main/java/org/apache/sling/maven/slingstart/AttachModelArchive.java
index a2d3025..c91b5dc 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/AttachModelArchive.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/AttachModelArchive.java
@@ -31,6 +31,7 @@ import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.sling.provisioning.model.Artifact;
import org.apache.sling.provisioning.model.Model;
@@ -48,6 +49,12 @@ import org.apache.sling.provisioning.model.io.ModelArchiveWriter;
)
public class AttachModelArchive extends AbstractSlingStartMojo {
+ /**
+ * The filename to be used for the generated model archive file.
+ */
+ @Parameter(defaultValue = "${project.build.finalName}")
+ private String modelArchiveName;
+
@Component
private ArtifactHandlerManager artifactHandlerManager;
@@ -69,7 +76,7 @@ public class AttachModelArchive extends AbstractSlingStartMojo {
}
// write the model archive
- final File outputFile = new File(this.project.getBuild().getDirectory() + File.separatorChar + BuildConstants.MODEL_ARCHIVE_NAME);
+ final File outputFile = new File(this.project.getBuild().getDirectory() + File.separatorChar + modelArchiveName + "." + ModelArchiveWriter.DEFAULT_EXTENSION);
outputFile.getParentFile().mkdirs();
try ( final FileOutputStream fos = new FileOutputStream(outputFile)) {
diff --git a/src/main/java/org/apache/sling/maven/slingstart/BuildConstants.java b/src/main/java/org/apache/sling/maven/slingstart/BuildConstants.java
index 62d00bd..3da52da 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/BuildConstants.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/BuildConstants.java
@@ -32,9 +32,6 @@ public abstract class BuildConstants {
// Model artifact name
public static final String MODEL_ARTIFACT_NAME = "slingstart.txt";
- // Model archive name
- public static final String MODEL_ARCHIVE_NAME = "slingstart." + ModelArchiveWriter.DEFAULT_EXTENSION;
-
// Types
public static final String TYPE_JAR = "jar";
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-slingstart-maven-plugin] 04/09: SLING-6284 -
PreparePackageMojo.testSubsystemBaseGeneration often fails on Jenkins
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit 8943fbf8d34671101ff40f5da9a61b66daf08008
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Nov 14 12:21:29 2016 +0000
SLING-6284 - PreparePackageMojo.testSubsystemBaseGeneration often fails
on Jenkins
Fail early if the mkdirs() call fails.
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1769613 13f79535-47bb-0310-9956-ffa450edef68
---
.../java/org/apache/sling/maven/slingstart/PreparePackageMojo.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java b/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
index 83689ec..499d974 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/PreparePackageMojo.java
@@ -330,7 +330,10 @@ public class PreparePackageMojo extends AbstractSlingStartMojo {
Manifest runModesManifest = getRunModesManifest(feature);
getLog().info("Creating subsystem base file: " + subsystemFile.getName());
- subsystemFile.getParentFile().mkdirs();
+ boolean created = subsystemFile.getParentFile().mkdirs();
+ if ( !created ) {
+ throw new MojoExecutionException("Failed creating " + subsystemFile.getParentFile().getAbsolutePath());
+ }
try (JarOutputStream os = new JarOutputStream(new FileOutputStream(subsystemFile), runModesManifest)) {
Map<String, Integer> bsnStartOrderMap = new HashMap<>();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-slingstart-maven-plugin] 09/09: [maven-release-plugin] copy
for tag slingstart-maven-plugin-1.7.0
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit 41536225b38f2b876da301ac8b52fef4d68f537e
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Dec 15 06:09:12 2016 +0000
[maven-release-plugin] copy for tag slingstart-maven-plugin-1.7.0
git-svn-id: https://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.7.0@1774370 13f79535-47bb-0310-9956-ffa450edef68
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-slingstart-maven-plugin] 05/09: SLING-6370 slingstart: start
goal failes if not executed together with install
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit e09af724412d7c83bb631a3cc2a891826a7597ba
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Dec 6 22:33:24 2016 +0000
SLING-6370 slingstart: start goal failes if not executed together with install
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1772982 13f79535-47bb-0310-9956-ffa450edef68
---
.../java/org/apache/sling/maven/slingstart/run/StartMojo.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java b/src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java
index c74939d..af15111 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java
@@ -402,11 +402,18 @@ public class StartMojo extends AbstractMojo {
// If the current project is a slingstart project, use its JAR artifact
if (this.project.getPackaging().equals(BuildConstants.PACKAGING_SLINGSTART)) {
- final File jarFile = project.getArtifact().getFile();
- if (jarFile.exists()) {
+ File jarFile = project.getArtifact().getFile();
+ if (jarFile != null && jarFile.exists()) {
getLog().info("Using launchpad jar being generated as this project's primary artifact: '" + jarFile + "'!");
return jarFile;
}
+ else {
+ jarFile = new File(project.getBuild().getDirectory(), project.getBuild().getFinalName() + ".jar");
+ if (jarFile.exists()) {
+ getLog().info("Using launchpad jar being generated as this project's primary artifact: '" + jarFile + "'!");
+ return jarFile;
+ }
+ }
}
// In case there was a provisioning model found but this is not a slingstart project, the JAR might be attached already through goal "package"
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-slingstart-maven-plugin] 03/09: SLING-6278 : Provide tooling
to create an archive with the provisioning model and all artifacts
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit 5f8e80b2ce762d371cc83e0d2e9549387234ec1f
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sat Nov 12 15:11:04 2016 +0000
SLING-6278 : Provide tooling to create an archive with the provisioning model and all artifacts
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1769385 13f79535-47bb-0310-9956-ffa450edef68
---
.../sling/maven/slingstart/AttachModelArchive.java | 127 +++++++++++++++++++++
.../maven/slingstart/AttachSlingStartModel.java | 9 +-
.../sling/maven/slingstart/BuildConstants.java | 6 +
src/main/resources/META-INF/plexus/components.xml | 12 ++
4 files changed, 147 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/apache/sling/maven/slingstart/AttachModelArchive.java b/src/main/java/org/apache/sling/maven/slingstart/AttachModelArchive.java
new file mode 100644
index 0000000..a2d3025
--- /dev/null
+++ b/src/main/java/org/apache/sling/maven/slingstart/AttachModelArchive.java
@@ -0,0 +1,127 @@
+/*
+ * 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.maven.slingstart;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.sling.provisioning.model.Artifact;
+import org.apache.sling.provisioning.model.Model;
+import org.apache.sling.provisioning.model.ModelUtility;
+import org.apache.sling.provisioning.model.io.ModelArchiveWriter;
+
+/**
+ * Attaches the model archive as a project artifact.
+ */
+@Mojo(
+ name = "attach-modelarchive",
+ defaultPhase = LifecyclePhase.PACKAGE,
+ requiresDependencyResolution = ResolutionScope.TEST,
+ threadSafe = true
+ )
+public class AttachModelArchive extends AbstractSlingStartMojo {
+
+ @Component
+ private ArtifactHandlerManager artifactHandlerManager;
+
+ /**
+ * Used to look up Artifacts in the remote repository.
+ *
+ */
+ @Component
+ private ArtifactResolver resolver;
+
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ Model model = ProjectHelper.getRawModel(this.project);
+ if (usePomVariables) {
+ model = ModelUtility.applyVariables(model, new PomVariableResolver(project));
+ }
+ if (usePomDependencies) {
+ model = ModelUtility.applyArtifactVersions(model, new PomArtifactVersionResolver(project, allowUnresolvedPomDependencies));
+ }
+
+ // write the model archive
+ final File outputFile = new File(this.project.getBuild().getDirectory() + File.separatorChar + BuildConstants.MODEL_ARCHIVE_NAME);
+ outputFile.getParentFile().mkdirs();
+
+ try ( final FileOutputStream fos = new FileOutputStream(outputFile)) {
+ // TODO provide base manifest
+ final JarOutputStream jos = ModelArchiveWriter.write(fos, model, null, new ModelArchiveWriter.ArtifactProvider() {
+
+ @Override
+ public InputStream getInputStream(final Artifact artifact) throws IOException {
+ try {
+ final org.apache.maven.artifact.Artifact a = ModelUtils.getArtifact(project, mavenSession,
+ artifactHandlerManager, resolver,
+ artifact.getGroupId(),
+ artifact.getArtifactId(),
+ artifact.getVersion(),
+ artifact.getType(),
+ artifact.getClassifier());
+ return new FileInputStream(a.getFile());
+ } catch (MojoExecutionException e) {
+ throw (IOException)new IOException("Unable to get artifact: " + artifact.toMvnUrl()).initCause(e);
+ }
+ }
+ });
+
+ // handle license etc.
+ final File classesDir = new File(this.project.getBuild().getOutputDirectory());
+ if ( classesDir.exists() ) {
+ final File metaInfDir = new File(classesDir, "META-INF");
+ for(final String name : new String[] {"LICENSE", "NOTICE", "DEPENDENCIES"}) {
+ final File f = new File(metaInfDir, name);
+ if ( f.exists() ) {
+ final JarEntry artifactEntry = new JarEntry("META-INF/" + name);
+ jos.putNextEntry(artifactEntry);
+
+ final byte[] buffer = new byte[8192];
+ try (final InputStream is = new FileInputStream(f)) {
+ int l = 0;
+ while ( (l = is.read(buffer)) > 0 ) {
+ jos.write(buffer, 0, l);
+ }
+ }
+ jos.closeEntry();
+
+ }
+ }
+ }
+ jos.finish();
+ } catch (final IOException e) {
+ throw new MojoExecutionException("Unable to write model archive to " + outputFile + " : " + e.getMessage(), e);
+ }
+
+ // attach it as an additional artifact
+ projectHelper.attachArtifact(project, ModelArchiveWriter.DEFAULT_EXTENSION,
+ BuildConstants.CLASSIFIER_MAR, outputFile);
+ }
+}
diff --git a/src/main/java/org/apache/sling/maven/slingstart/AttachSlingStartModel.java b/src/main/java/org/apache/sling/maven/slingstart/AttachSlingStartModel.java
index f4131be..4db991a 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/AttachSlingStartModel.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/AttachSlingStartModel.java
@@ -21,7 +21,6 @@ import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
-import org.apache.commons.io.IOUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
@@ -56,14 +55,10 @@ public class AttachSlingStartModel extends AbstractSlingStartMojo {
final File outputFile = new File(this.project.getBuild().getDirectory() + File.separatorChar + BuildConstants.MODEL_ARTIFACT_NAME);
outputFile.getParentFile().mkdirs();
- Writer writer = null;
- try {
- writer = new FileWriter(outputFile);
+ try ( final Writer writer = new FileWriter(outputFile)) {
ModelWriter.write(writer, model);
- } catch (IOException e) {
+ } catch (final IOException e) {
throw new MojoExecutionException("Unable to write model to " + outputFile, e);
- } finally {
- IOUtils.closeQuietly(writer);
}
// if this project is a partial bundle list, it's the main artifact
diff --git a/src/main/java/org/apache/sling/maven/slingstart/BuildConstants.java b/src/main/java/org/apache/sling/maven/slingstart/BuildConstants.java
index 07885fd..62d00bd 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/BuildConstants.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/BuildConstants.java
@@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.sling.provisioning.model.ModelConstants;
+import org.apache.sling.provisioning.model.io.ModelArchiveWriter;
public abstract class BuildConstants {
@@ -31,6 +32,9 @@ public abstract class BuildConstants {
// Model artifact name
public static final String MODEL_ARTIFACT_NAME = "slingstart.txt";
+ // Model archive name
+ public static final String MODEL_ARCHIVE_NAME = "slingstart." + ModelArchiveWriter.DEFAULT_EXTENSION;
+
// Types
public static final String TYPE_JAR = "jar";
@@ -55,6 +59,8 @@ public abstract class BuildConstants {
public static final String CLASSIFIER_WEBAPP = "webapp";
+ public static final String CLASSIFIER_MAR = ModelArchiveWriter.DEFAULT_EXTENSION;
+
// Manifest attributes
public static final String ATTR_BUILT_BY = "Built-By";
diff --git a/src/main/resources/META-INF/plexus/components.xml b/src/main/resources/META-INF/plexus/components.xml
index 21f4ced..6d60143 100644
--- a/src/main/resources/META-INF/plexus/components.xml
+++ b/src/main/resources/META-INF/plexus/components.xml
@@ -87,5 +87,17 @@
<addedToClasspath>false</addedToClasspath>
</configuration>
</component>
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>mar</role-hint>
+ <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
+ <configuration>
+ <type>mar</type>
+ <includesDependencies>false</includesDependencies>
+ <language>java</language>
+ <extension>mar</extension>
+ <addedToClasspath>false</addedToClasspath>
+ </configuration>
+ </component>
</components>
</component-set>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-slingstart-maven-plugin] 07/09: Use prov model 1.8.0 for
release
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit 7e9b0fb4a4528776329c920c821d60afcc731268
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Dec 15 06:08:32 2016 +0000
Use prov model 1.8.0 for release
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1774368 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 98220ed..3ae47e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,7 +84,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.provisioning.model</artifactId>
- <version>1.8.1-SNAPSHOT</version>
+ <version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.
[sling-slingstart-maven-plugin] 01/09: [maven-release-plugin]
prepare for next development iteration
Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit 762ae72d3106758772301eff65f9ef60d34a0edc
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Nov 10 06:05:52 2016 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1769045 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 68ecaa8..20bec9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
</parent>
<artifactId>slingstart-maven-plugin</artifactId>
- <version>1.6.0</version>
+ <version>1.6.1-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Apache Sling SlingStart Maven Plugin</name>
@@ -35,9 +35,9 @@
</properties>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.6.0</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/slingstart-maven-plugin-1.6.0</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/slingstart-maven-plugin-1.6.0</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/tooling/maven/slingstart-maven-plugin</url>
</scm>
<build>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.