GitHub user geomacy opened a pull request:
https://github.com/apache/brooklyn-dist/pull/63
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
TODO: the above process noted the following jars without
pom.properties; check the licenses for these:
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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/geomacy/brooklyn-dist
license-file-for-karaf-distro
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-dist/pull/63.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #63
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---