asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject [07/10] asterixdb git commit: ASTERIXDB-1720 - Generate License / Notice Files
Date Wed, 04 Jan 2017 22:51:27 GMT
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1355c269/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/freemarker/IndentDirective.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/freemarker/IndentDirective.java
b/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/freemarker/IndentDirective.java
new file mode 100644
index 0000000..fed2a12
--- /dev/null
+++ b/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/freemarker/IndentDirective.java
@@ -0,0 +1,115 @@
+/*
+ * 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.asterix.license.freemarker;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.Map;
+
+import freemarker.core.Environment;
+import freemarker.template.TemplateDirectiveBody;
+import freemarker.template.TemplateDirectiveModel;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+import freemarker.template.TemplateNumberModel;
+
+public class IndentDirective implements TemplateDirectiveModel {
+
+    private static final String PARAM_NAME_SPACES = "spaces";
+
+    @Override
+    public void execute(Environment env, Map params, TemplateModel [] loopVars, TemplateDirectiveBody
body)
+            throws TemplateException, IOException {
+
+        int spacesParam = -1;
+
+        for (Object o : params.entrySet()) {
+            Map.Entry ent = (Map.Entry) o;
+
+            String paramName = (String) ent.getKey();
+            TemplateModel paramValue = (TemplateModel) ent.getValue();
+
+            if (paramName.equals(PARAM_NAME_SPACES)) {
+                if (!(paramValue instanceof TemplateNumberModel)) {
+                    throw new TemplateModelException(
+                            "The \"" + PARAM_NAME_SPACES + "\" parameter must be a number.");
+                }
+                spacesParam = ((TemplateNumberModel) paramValue).getAsNumber().intValue();
+                if (spacesParam < 0) {
+                    throw new TemplateModelException(
+                            "The \"" + PARAM_NAME_SPACES + "\" parameter can't be negative.");
+                }
+            } else {
+                throw new TemplateModelException("Unsupported parameter: " + paramName);
+            }
+        }
+        if (spacesParam < 0) {
+            throw new TemplateModelException("The required \"" + PARAM_NAME_SPACES + "\"
parameter is missing.");
+        }
+
+        if (body == null) {
+            throw new TemplateModelException("Indent requires a body");
+        } else {
+            // Executes the nested body (same as <#nested> in FTL). In this
+            // case we don't provide a special writer as the parameter:
+            body.render(new IndentingWriter(env.getOut(), spacesParam));
+        }
+    }
+
+    private static class IndentingWriter extends Writer {
+        private final Writer out;
+        private final char[] padChars;
+        boolean needsToPad;
+
+        public IndentingWriter(Writer out, int numSpaces) {
+            this.out = out;
+            padChars = new char[numSpaces];
+            Arrays.fill(padChars, ' ');
+            needsToPad = true;
+        }
+
+        @Override
+        public void write(char[] cbuf, int off, int len) throws IOException {
+            for (int i = off; i < len; i++) {
+                if (cbuf[i] == '\n') {
+                    out.write(cbuf[i]);
+                    needsToPad = true;
+                } else {
+                    if (needsToPad) {
+                        out.write(padChars);
+                        needsToPad = false;
+                    }
+                    out.write(cbuf[i]);
+                }
+            }
+        }
+
+        @Override
+        public void flush() throws IOException {
+            out.flush();
+        }
+
+        @Override
+        public void close() throws IOException {
+            out.flush();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1355c269/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/freemarker/LoadFileDirective.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/freemarker/LoadFileDirective.java
b/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/freemarker/LoadFileDirective.java
new file mode 100644
index 0000000..603c6bc
--- /dev/null
+++ b/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/freemarker/LoadFileDirective.java
@@ -0,0 +1,115 @@
+/*
+ * 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.asterix.license.freemarker;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Map;
+
+import freemarker.cache.FileTemplateLoader;
+import freemarker.core.Environment;
+import freemarker.template.Configuration;
+import freemarker.template.TemplateBooleanModel;
+import freemarker.template.TemplateDirectiveBody;
+import freemarker.template.TemplateDirectiveModel;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateModel;
+import freemarker.template.TemplateModelException;
+import freemarker.template.TemplateScalarModel;
+import org.apache.asterix.license.LicenseUtil;
+import org.apache.commons.io.IOUtils;
+
+public class LoadFileDirective implements TemplateDirectiveModel {
+
+    private static final String PARAM_FILE = "file";
+    private static final String PARAM_TRIM = "trim";
+    private static final String PARAM_DEFAULT_TEXT = "defaultOnMissing";
+
+    @Override
+    public void execute(Environment env,
+                        Map params, TemplateModel[] loopVars,
+                        TemplateDirectiveBody body)
+            throws TemplateException, IOException {
+
+        String fileParam = null;
+        String defaultParam = null;
+        boolean trimParam = false;
+
+        for (Object paramObj : params.entrySet()) {
+            Map.Entry param = (Map.Entry) paramObj;
+
+            String paramName = (String) param.getKey();
+            TemplateModel paramValue = (TemplateModel) param.getValue();
+
+            switch (paramName) {
+                case PARAM_FILE:
+                    if (paramValue instanceof TemplateScalarModel) {
+                        fileParam = ((TemplateScalarModel) paramValue).getAsString();
+                    } else {
+                        throw new TemplateModelException(PARAM_FILE + " must be a string");
+                    }
+                    break;
+
+                case PARAM_DEFAULT_TEXT:
+                    if (paramValue instanceof TemplateScalarModel) {
+                        defaultParam = ((TemplateScalarModel) paramValue).getAsString();
+                    } else {
+                        throw new TemplateModelException(PARAM_DEFAULT_TEXT + " must be a
string");
+                    }
+                    break;
+
+                case PARAM_TRIM:
+                    if (paramValue instanceof TemplateBooleanModel) {
+                        trimParam = ((TemplateBooleanModel) paramValue).getAsBoolean();
+                    } else {
+                        throw new TemplateModelException(PARAM_TRIM + " must be a boolean");
+                    }
+                    break;
+
+                default:
+                    throw new TemplateModelException("Unknown param: " + paramName);
+            }
+        }
+        if (fileParam == null) {
+            throw new TemplateModelException(
+                    "The required \"" + PARAM_FILE + "\" parameter"
+                            + "is missing.");
+        }
+        if (body != null) {
+            throw new TemplateModelException("Body is not supported by this directive");
+        }
+        Writer out = env.getOut();
+        File baseDir = ((FileTemplateLoader)((Configuration)env.getTemplate().getParent()).getTemplateLoader()).baseDir;
+        File file = new File(baseDir, fileParam);
+        if (file.exists()) {
+            if (trimParam) {
+                LicenseUtil.readAndTrim(out, file);
+                out.write('\n');
+            } else {
+                IOUtils.copy(new FileReader(file), out);
+            }
+        } else if (defaultParam != null ) {
+            out.append(defaultParam).append("\n");
+        } else {
+            throw new IOException("File not found: " + file);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1355c269/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/project/LicensedProjects.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/project/LicensedProjects.java
b/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/project/LicensedProjects.java
new file mode 100644
index 0000000..5b1aa22
--- /dev/null
+++ b/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/project/LicensedProjects.java
@@ -0,0 +1,57 @@
+/*
+ * 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.asterix.license.project;
+
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.apache.asterix.license.LicenseSpec;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class LicensedProjects {
+    private LicenseSpec license;
+
+    private SortedSet<Project> projects = new TreeSet<>(Project.PROJECT_COMPARATOR);
+
+    public LicensedProjects(LicenseSpec license) {
+        this.license = license;
+    }
+
+    @JsonCreator
+    public LicensedProjects(@JsonProperty("license") LicenseSpec license,
+                            @JsonProperty("projects") Set<Project> projects) {
+        this.license = license;
+        this.projects.addAll(projects);
+    }
+
+    public LicenseSpec getLicense() {
+        return license;
+    }
+
+    public SortedSet<Project> getProjects() {
+        return projects;
+    }
+
+    public void addProject(Project project) {
+        projects.add(project);
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1355c269/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/project/Project.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/project/Project.java
b/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/project/Project.java
new file mode 100644
index 0000000..ce5417e
--- /dev/null
+++ b/asterixdb/asterix-maven-plugins/license-automation-plugin/src/main/java/org/apache/asterix/license/project/Project.java
@@ -0,0 +1,159 @@
+/*
+ * 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.asterix.license.project;
+
+import java.io.File;
+import java.util.Comparator;
+
+import org.apache.maven.project.MavenProject;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Project {
+    private String name;
+    private String groupId;
+    private String artifactId;
+    private String url;
+    private String version;
+    private String location;
+    private String artifactPath;
+    private String noticeText;
+    private String licenseText;
+
+    @JsonIgnore
+    private MavenProject mavenProject;
+
+    public static final Comparator<Project> PROJECT_COMPARATOR = (o1, o2) ->
+            o1.compareToken().compareTo(o2.compareToken());
+
+    public Project(MavenProject project, String location, File artifactPath) {
+        mavenProject = project;
+        name = project.getName();
+        groupId = project.getGroupId();
+        artifactId = project.getArtifactId();
+        version = project.getVersion();
+        url = project.getUrl();
+        this.artifactPath = artifactPath.getPath();
+        setLocation(location);
+    }
+
+    @JsonCreator
+    public Project(@JsonProperty("name") String name, @JsonProperty("groupId") String groupId,
+                   @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) {
+        this.name = name;
+        this.groupId = groupId;
+        this.artifactId = artifactId;
+        this.url = url;
+        this.version = version;
+        this.location = location;
+        this.artifactPath = artifactPath;
+        this.noticeText = noticeText;
+        this.licenseText = licenseText;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public String getArtifactId() {
+        return artifactId;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public String getLocation() {
+        return location;
+    }
+
+    public void setLocation(String location) {
+        if (location != null && !location.endsWith("/")) {
+            this.location = location + "/";
+        } else {
+            this.location = location;
+        }
+    }
+
+    @JsonIgnore
+    public String [] getLocations() {
+        return getLocation().split(",");
+    }
+
+    public void setArtifactId(String artifactId) {
+        this.artifactId = artifactId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String getArtifactPath() {
+        return artifactPath;
+    }
+
+    public void setNoticeText(String noticeText) {
+        this.noticeText = noticeText;
+    }
+
+    public String getNoticeText() {
+        return noticeText;
+    }
+
+    public String gav() {
+        return getGroupId() + ":" + getArtifactId() + ":" + getVersion();
+    }
+
+    private String compareToken() {
+        return getName() + getArtifactId() + getVersion() + ":" + getLocation();
+    }
+
+    public String getLicenseText() {
+        return licenseText;
+    }
+
+    public void setLicenseText(String licenseText) {
+        this.licenseText = licenseText;
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1355c269/asterixdb/asterix-maven-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-maven-plugins/pom.xml b/asterixdb/asterix-maven-plugins/pom.xml
index 9207abe..9da5759 100644
--- a/asterixdb/asterix-maven-plugins/pom.xml
+++ b/asterixdb/asterix-maven-plugins/pom.xml
@@ -57,5 +57,6 @@
     <module>asterix-evaluator-generator-maven-plugin</module>
     <module>asterix-test-datagenerator-maven-plugin</module>
     <module>asterix-grammar-extension-maven-plugin</module>
+    <module>license-automation-plugin</module>
   </modules>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1355c269/asterixdb/asterix-server/pom.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-server/pom.xml b/asterixdb/asterix-server/pom.xml
index 50db2fd..1f8c79c 100644
--- a/asterixdb/asterix-server/pom.xml
+++ b/asterixdb/asterix-server/pom.xml
@@ -42,6 +42,196 @@
   <build>
     <plugins>
       <plugin>
+        <groupId>org.apache.asterix</groupId>
+        <artifactId>license-automation-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <templateRootDir>${basedir}/../../</templateRootDir>
+          <generatedFiles>
+            <generatedFile>
+              <template>asterixdb/src/main/licenses/templates/asterix-license.ftl</template>
+              <outputFile>LICENSE</outputFile>
+            </generatedFile>
+            <generatedFile>
+              <template>asterixdb/src/main/licenses/templates/asterix-notice.ftl</template>
+              <outputFile>NOTICE</outputFile>
+            </generatedFile>
+          </generatedFiles>
+          <location>repo/</location>
+          <licenseMapOutputFile>${project.build.directory}/generated-resources/license_map.json</licenseMapOutputFile>
+          <timeoutSecs>10</timeoutSecs>
+          <downloadDir>${project.build.directory}/generated-resources/license</downloadDir>
+          <excludedScopes>
+            <excludedScope>test</excludedScope>
+          </excludedScopes>
+          <excludes>
+            <exclude>org.apache.asterix:*</exclude>
+            <exclude>org.apache.algebricks:*</exclude>
+            <exclude>org.apache.hyracks:*</exclude>
+          </excludes>
+          <licenseDirectory>${basedir}/../src/main/licenses/content</licenseDirectory>
+          <models>
+             <model>${basedir}/../src/main/appended-resources/supplemental-models.xml</model>
+          </models>
+          <overrides>
+            <override>
+              <gav>stax:stax:1.1.1-dev</gav>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            </override>
+            <override>
+              <gav>stax:stax:1.2.0</gav>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            </override>
+            <override>
+              <gav>org.tukaani:xz:1.0</gav>
+              <url>PUBLIC_DOMAIN</url>
+            </override>
+            <override>
+              <gav>aopalliance:aopalliance:1.0</gav>
+              <url>PUBLIC_DOMAIN</url>
+            </override>
+            <override>
+              <gav>asm:asm:3.1</gav>
+              <url>http://asm.objectweb.org/license.html</url>
+            </override>
+            <override>
+              <gav>commons-el:commons-el:1.0</gav>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            </override>
+            <override>
+              <gav>com.thoughtworks.paranamer:paranamer:2.3</gav>
+              <url>https://raw.githubusercontent.com/codehaus/paranamer-git/master/LICENSE.txt</url>
+            </override>
+            <override>
+              <gav>org.codehaus.jettison:jettison:1.1</gav>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            </override>
+            <override>
+              <gav>commons-configuration:commons-configuration:1.6</gav>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            </override>
+            <override>
+              <gav>commons-digester:commons-digester:1.8</gav>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            </override>
+            <override>
+              <gav>org.apache.zookeeper:zookeeper:3.4.5</gav>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            </override>
+            <override>
+              <gav>javax.servlet.jsp:jsp-api:2.1</gav>
+              <url>https://jsp.java.net/license.html</url>
+            </override>
+            <override>
+              <gav>com.google.protobuf:protobuf-java:2.5.0</gav>
+              <url>https://raw.githubusercontent.com/google/protobuf/master/LICENSE</url>
+            </override>
+            <override>
+              <gav>org.hamcrest:hamcrest-core:1.3</gav>
+              <url>https://raw.githubusercontent.com/hamcrest/JavaHamcrest/1260407ae3d2786cb54b8be52ebe041e54ccd6ac/LICENSE.txt</url>
+            </override>
+            <override>
+              <gav>xmlenc:xmlenc:0.52</gav>
+              <url>xmlenc_0.52_LICENSE</url>
+            </override>
+            <override>
+              <gav>org.slf4j:slf4j-log4j12:1.7.5</gav>
+              <url>http://www.slf4j.org/license.html</url>
+            </override>
+          </overrides>
+          <licenses>
+            <license>
+              <url>https://raw.githubusercontent.com/google/protobuf/master/LICENSE</url>
+              <contentFile>protobuf_2.5.0_LICENSE.txt</contentFile>
+            </license>
+            <license>
+              <url>xmlenc_0.52_LICENSE</url>
+              <contentFile>xmlenc_0.52_LICENSE.txt</contentFile>
+            </license>
+            <license>
+              <url>https://raw.githubusercontent.com/hamcrest/JavaHamcrest/1260407ae3d2786cb54b8be52ebe041e54ccd6ac/LICENSE.txt</url>
+              <contentFile>hamcrest_1.3_LICENSE.txt</contentFile>
+            </license>
+            <license>
+              <displayName>The Apache Software License, Version 2.0</displayName>
+              <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+              <aliasUrls>
+                <aliasUrl>http://www.apache.org/licenses/LICENSE-2.0</aliasUrl>
+                <aliasUrl>https://www.apache.org/licenses/LICENSE-2.0.txt</aliasUrl>
+                <aliasUrl>http://www.apache.org/licenses/LICENSE-2.0.html</aliasUrl>
+              </aliasUrls>
+              <metric>1</metric>
+            </license>
+            <license>
+              <url>https://java.net/projects/stax-utils/sources/svn/content/trunk/LICENSE</url>
+              <contentFile>stax-utils_LICENSE.txt</contentFile>
+              <displayName>a BSD-style License</displayName>
+              <aliasUrls>
+                <aliasUrl>https://stax-utils.dev.java.net/source/browse/*checkout*/stax-utils/LICENSE</aliasUrl>
+              </aliasUrls>
+            </license>
+            <license>
+              <url>http://www.json.org/license.html</url>
+              <displayName>The JSON License</displayName>
+            </license>
+            <license>
+              <url>https://raw.githubusercontent.com/mojohaus/appassembler/master/LICENSE.txt</url>
+              <aliasUrls>http://svn.codehaus.org/mojo/trunk/mojo/appassembler/LICENSE.txt</aliasUrls>
+            </license>
+            <license>
+              <url>https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html</url>
+              <!--<displayName>CDDL 1.1</displayName>-->
+              <metric>10</metric>
+              <aliasUrls>
+                <aliasUrl>https://glassfish.java.net/public/CDDL+GPL_1_1.html</aliasUrl>
+                <aliasUrl>http://glassfish.java.net/public/CDDL+GPL_1_1.html</aliasUrl>
+                <aliasUrl>https://jsp.java.net/license.html</aliasUrl>
+              </aliasUrls>
+            </license>
+            <license>
+              <url>http://www.sun.com/cddl/cddl.html</url>
+              <metric>10</metric>
+              <aliasUrls>
+                <aliasUrl>https://glassfish.dev.java.net/public/CDDL+GPL.html</aliasUrl>
+                <aliasUrl>https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html</aliasUrl>
+                <aliasUrl>http://glassfish.dev.java.net/nonav/public/CDDL+GPL.html</aliasUrl>
+                <aliasUrl>http://glassfish.java.net/public/CDDL+GPL.html</aliasUrl>
+                <aliasUrl>https://glassfish.java.net/public/CDDL+GPL.html</aliasUrl>
+                <aliasUrl>http://glassfish.dev.java.net/public/CDDL+GPL.html</aliasUrl>
+                <aliasUrl>https://glassfish.dev.java.net/public/CDDLv1.0.html</aliasUrl>
+              </aliasUrls>
+            </license>
+            <license>
+              <url>http://www.antlr.org/license.html</url>
+              <aliasUrls>http://antlr.org/license.html</aliasUrls>
+            </license>
+            <license>
+              <url>https://opensource.org/licenses/mit-license.php</url>
+              <aliasUrls>http://www.opensource.org/licenses/mit-license.php</aliasUrls>
+            </license>
+            <license>
+              <url>https://opensource.org/licenses/bsd-license.php</url>
+              <aliasUrls>http://www.opensource.org/licenses/bsd-license.php</aliasUrls>
+            </license>
+            <license>
+              <!-- this is special case- handled in ftl template -->
+              <url>PUBLIC_DOMAIN</url>
+            </license>
+          </licenses>
+          <templateProperties>
+            <assembly>this assembly</assembly>
+            <packageName>Server Install</packageName>
+          </templateProperties>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>appassembler-maven-plugin</artifactId>
         <version>1.10</version>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/1355c269/asterixdb/asterix-server/src/main/assembly/binary-assembly.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-server/src/main/assembly/binary-assembly.xml b/asterixdb/asterix-server/src/main/assembly/binary-assembly.xml
index bdb96de..b968ae1 100644
--- a/asterixdb/asterix-server/src/main/assembly/binary-assembly.xml
+++ b/asterixdb/asterix-server/src/main/assembly/binary-assembly.xml
@@ -27,7 +27,7 @@
   <includeBaseDirectory>false</includeBaseDirectory>
   <fileSets>
     <fileSet>
-      <directory>src/main/licenses</directory>
+      <directory>target/generated-sources</directory>
       <outputDirectory>.</outputDirectory>
       <includes>
         <include>LICENSE*</include>


Mime
View raw message