You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2016/12/02 16:13:54 UTC

[2/5] brooklyn-dist git commit: Add manually created LICENSE file for Karaf distribution.

Add manually created LICENSE file for Karaf distribution.

This adds the LICENSE file for the Karaf distribution.

For the regular distribution this is automated through the Maven
plugin, however for Karaf the process is different as Karaf
assembles dependencies based also on features.

This commit includes a semi-manually generated LICENSE file until
such time as we can create a process for generating the file
automatically.

The process followed is:

1. Build the code.
2. Search the system directory for jar files and extract their
pom.properties:

find system -name '*jar' -type f | while read jar ; do
   pp=$(jar tf $jar | grep pom.properties)
   if [ "$pp" ] ; then
     jar xf $jar $pp
   else
      echo $jar has no pom.properties
   fi
done

The above process noted the following jars without pom.properties;
added the licenses for these manually:

system/com/google/code/gson/gson/2.3/gson-2.3.jar has no pom.properties
system/com/google/inject/extensions/guice-assistedinject/3.0/guice-assistedinject-3.0.jar has no pom.properties
system/com/google/inject/extensions/guice-multibindings/3.0/guice-multibindings-3.0.jar has no pom.properties
system/com/google/inject/guice/3.0/guice-3.0.jar has no pom.properties
system/com/jayway/jsonpath/json-path/2.0.0/json-path-2.0.0.jar has no pom.properties
system/org/bouncycastle/bcpkix-jdk15on/1.49/bcpkix-jdk15on-1.49.jar has no pom.properties
system/org/bouncycastle/bcprov-ext-jdk15on/1.49/bcprov-ext-jdk15on-1.49.jar has no pom.properties
system/org/bouncycastle/bcprov-jdk15on/1.49/bcprov-jdk15on-1.49.jar has no pom.properties
system/org/codehaus/woodstox/woodstox-core-asl/4.4.1/woodstox-core-asl-4.4.1.jar has no pom.properties
system/org/eclipse/birt/runtime/org.eclipse.osgi/3.10.2.v20150203-1939/org.eclipse.osgi-3.10.2.v20150203-1939.jar has no pom.properties
system/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.jar has no pom.properties
system/org/freemarker/freemarker/2.3.22/freemarker-2.3.22.jar has no pom.properties
system/org/glassfish/external/opendmk_jmxremote_optional_jar/1.0-b01-ea/opendmk_jmxremote_optional_jar-1.0-b01-ea.jar has no pom.properties
system/org/mongodb/mongo-java-driver/3.0.3/mongo-java-driver-3.0.3.jar has no pom.properties
system/org/ow2/asm/asm-all/5.0.2/asm-all-5.0.2.jar has no pom.properties
system/org/ow2/asm/asm-all/5.0.4/asm-all-5.0.4.jar has no pom.properties
system/org/tukaani/xz/1.4/xz-1.4.jar has no pom.properties

3.  find . -name pom.properties | xargs dos2unix

4. Create a POM file snippet with the dependency information:

find META-INF -name pom.properties -type f | while read pp ; do
   groupId=$(sed -n '/^groupId/s/.*=//p' $pp)
   artifactId=$(sed -n '/^artifactId/s/.*=//p' $pp)
   version=$(sed -n '/^version/s/.*=//p' $pp)

   if [ "$groupId" -a "$artifactId" -a "$version" ] ; then
       echo $pp is ok
       cat >> dependencies.xml <<EOF
       <dependency>
           <groupId>${groupId}</groupId>
           <artifactId>${artifactId}</artifactId>
           <version>${version}</version>
       </dependency>

EOF
   else
      echo Could not find groupId:artifactId:version in $pp
   fi
done

5. Create a temporary pom.xml with the dependencies above.
Note, had to remove the JTidy dependency to get the next
step to work.

6. Extract the notices for the dependencies using the normal
plugin:

mvn org.heneveld.maven:license-audit-maven-plugin:notices\
    -Dformat=csv\
    -DlistDependencyIdOnly=true\
    -Ddepth=1\
    -DsuppressExcludedDependencies=true\
    -DlicensesPreferred=ASL2,ASL,EPL1,BSD-2-Clause,BSD-3-Clause,CDDL1.1,CDDL1,CDDL \
    -DoutputFile=notices.autogenerated \
    > tmp_stdout 2> tmp_stderr || ( cat tmp_stdout && echo "----ERRORS----" && cat tmp_stderr && false )

7. Include the notices from notices.autogenerated in section 2 of
the LICENSE file.

8. Manually add licenses for section 3, and the notices for the jars
mentioned in point 2 above.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/4f90e6a3
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/4f90e6a3
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/4f90e6a3

Branch: refs/heads/master
Commit: 4f90e6a3e58c753710fa0a7e0030a59340d3c6f0
Parents: 40743fe
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Authored: Tue Nov 29 17:59:23 2016 +0000
Committer: Geoff Macartney <ge...@cloudsoftcorp.com>
Committed: Thu Dec 1 12:38:54 2016 +0000

----------------------------------------------------------------------
 .../apache-brooklyn/src/main/resources/LICENSE  | 1468 ++++++++++++++++++
 1 file changed, 1468 insertions(+)
----------------------------------------------------------------------