[NO ISSUE][LIC] Add project attribute "jarName"

Change-Id: I36a2c0595f14f58ea4dce5e441a91d318793f2a9
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2867
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterixdb/src/main/licenses/templates/asterix-license.ftl b/asterixdb/src/main/licenses/templates/asterix-license.ftl
index bf2c7ea..381d400 100644
--- a/asterixdb/src/main/licenses/templates/asterix-license.ftl
+++ b/asterixdb/src/main/licenses/templates/asterix-license.ftl
@@ -46,7 +46,7 @@
    <#list projects as p>
        * ${p.name} (${p.groupId}:${p.artifactId}:${p.version})
      <#list p.locations as loc>
-         - ${loc}${p.artifactId}-${p.version}.jar
+         - ${loc}${p.jarName}
        </#list>
    </#list>
 
diff --git a/asterixdb/src/main/licenses/templates/asterix-notice.ftl b/asterixdb/src/main/licenses/templates/asterix-notice.ftl
index d31e408..41cd8a0 100644
--- a/asterixdb/src/main/licenses/templates/asterix-notice.ftl
+++ b/asterixdb/src/main/licenses/templates/asterix-notice.ftl
@@ -36,7 +36,7 @@
    <#list projects as p>
 ${p.name} (${p.groupId}:${p.artifactId}:${p.version})
        <#list p.locations as loc>
-- ${loc}${p.artifactId}-${p.version}.jar
+- ${loc}${p.jarName}
        </#list>
    </#list>
 
diff --git a/hyracks-fullstack/hyracks-fullstack-license/src/main/licenses/templates/hyracks-notice.ftl b/hyracks-fullstack/hyracks-fullstack-license/src/main/licenses/templates/hyracks-notice.ftl
index 7ce76de..077e7bc 100644
--- a/hyracks-fullstack/hyracks-fullstack-license/src/main/licenses/templates/hyracks-notice.ftl
+++ b/hyracks-fullstack/hyracks-fullstack-license/src/main/licenses/templates/hyracks-notice.ftl
@@ -32,7 +32,7 @@
    <#list projects as p>
 ${p.name} (${p.groupId}:${p.artifactId}:${p.version})
        <#list p.locations as loc>
-- ${loc}${p.artifactId}-${p.version}.jar
+- ${loc}${p.jarName}
        </#list>
    </#list>
 
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/project/Project.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/project/Project.java
index ff35162..e44914d 100644
--- a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/project/Project.java
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/project/Project.java
@@ -40,6 +40,7 @@
     private String noticeText;
     private String licenseText;
     private String sourcePointer;
+    private String classifier;
 
     @JsonIgnore
     private MavenProject mavenProject;
@@ -54,6 +55,7 @@
         artifactId = project.getArtifactId();
         version = project.getVersion();
         url = project.getUrl();
+        classifier = project.getArtifact().getClassifier();
         this.artifactPath = artifactPath.getPath();
         setLocation(location);
     }
@@ -63,7 +65,7 @@
             @JsonProperty("artifactId") String artifactId, @JsonProperty("url") String url,
             @JsonProperty("version") String version, @JsonProperty("location") String location,
             @JsonProperty("artifactPath") String artifactPath, @JsonProperty("noticeText") String noticeText,
-            @JsonProperty("licenseText") String licenseText) {
+            @JsonProperty("licenseText") String licenseText, @JsonProperty("classifier") String classifier) {
         this.name = name;
         this.groupId = groupId;
         this.artifactId = artifactId;
@@ -73,6 +75,7 @@
         this.artifactPath = artifactPath;
         this.noticeText = noticeText;
         this.licenseText = licenseText;
+        this.classifier = classifier;
     }
 
     public String getName() {
@@ -91,6 +94,10 @@
         return url;
     }
 
+    public String getClassifier() {
+        return classifier;
+    }
+
     public String getVersion() {
         return version;
     }
@@ -108,6 +115,11 @@
     }
 
     @JsonIgnore
+    public String getJarName() {
+        return artifactId + "-" + version + (classifier != null ? "-" + classifier : "") + ".jar";
+    }
+
+    @JsonIgnore
     public List<String> getLocations() {
         // TODO(mblow): store locations as an set instead of string
         return Arrays.asList(getLocation().split(","));
@@ -129,6 +141,10 @@
         this.url = url;
     }
 
+    public void setClassifier(String classifier) {
+        this.classifier = classifier;
+    }
+
     public void setVersion(String version) {
         this.version = version;
     }