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:25:51 UTC
[sling-slingstart-maven-plugin] 22/27: SLING-4081 - SlingStart
Maven Plugin fails if the organization is not defined in pom.xml
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag slingstart-maven-plugin-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git
commit 85bf93119d0349e8d72d7f34ae1b545588e01c94
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Oct 21 13:06:33 2014 +0000
SLING-4081 - SlingStart Maven Plugin fails if the organization is not
defined in pom.xml
Handle missing organization in JarArchiverHelper
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/slingstart-maven-plugin@1633368 13f79535-47bb-0310-9956-ffa450edef68
---
.../sling/maven/slingstart/JarArchiverHelper.java | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/apache/sling/maven/slingstart/JarArchiverHelper.java b/src/main/java/org/apache/sling/maven/slingstart/JarArchiverHelper.java
index 9b70652..ce469f0 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/JarArchiverHelper.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/JarArchiverHelper.java
@@ -78,22 +78,27 @@ public class JarArchiverHelper {
}
outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_BUILD,
project.getVersion()));
- outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VENDOR,
- project.getOrganization().getName()));
outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VERSION,
project.getVersion()));
- outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_CREATED_BY,
- project.getOrganization().getName()));
- outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_BUILT_BY,
- project.getOrganization().getName()));
+
+ String organizationName = project.getOrganization() != null ? project.getOrganization().getName() : null;
+ if ( organizationName != null ) {
+ outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VENDOR,
+ organizationName));
+ outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_CREATED_BY,
+ organizationName));
+ outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_BUILT_BY,
+ organizationName));
+ outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_SPECIFICATION_VENDOR,
+ organizationName));
+ }
+
outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_VENDOR_ID,
project.getGroupId()));
outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_IMPLEMENTATION_TITLE,
project.getName()));
outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_SPECIFICATION_TITLE,
project.getName()));
- outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_SPECIFICATION_VENDOR,
- project.getOrganization().getName()));
outManifest.addConfiguredAttribute(new Attribute(BuildConstants.ATTR_SPECIFICATION_VERSION,
project.getVersion()));
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.