incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r662451 - in /incubator/sling/trunk/etc: ./ notice/ notice/notices/
Date Mon, 02 Jun 2008 14:53:55 GMT
Author: bdelacretaz
Date: Mon Jun  2 07:53:55 2008
New Revision: 662451

URL: http://svn.apache.org/viewvc?rev=662451&view=rev
Log:
SLING-493 - script to generate NOTICE files from Maven dependencies

Added:
    incubator/sling/trunk/etc/
    incubator/sling/trunk/etc/notice/
    incubator/sling/trunk/etc/notice/mknotice   (with props)
    incubator/sling/trunk/etc/notice/noticemap.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/
    incubator/sling/trunk/etc/notice/notices/asm.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/cglib.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/codehaus.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/concurrent.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/equinox.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/jetty.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/json.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/junit.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/kxml2.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/nekohtml.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/pax.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/pdfbox.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/prefix.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/rhino.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/slf4j.txt   (with props)
    incubator/sling/trunk/etc/notice/notices/textmining.txt   (with props)

Added: incubator/sling/trunk/etc/notice/mknotice
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/mknotice?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/mknotice (added)
+++ incubator/sling/trunk/etc/notice/mknotice Mon Jun  2 07:53:55 2008
@@ -0,0 +1,90 @@
+#!/bin/bash
+# Generate NOTICE files for ASF projects based on Maven
+# dependencies.
+#
+# Runs mvn dependency:resolve, filters the output to
+# get the list of non-ASF dependencies, and uses the
+# names in this list to concatenate a series of notice
+# files found under this directory.
+#
+ME=$(basename $0)
+MYDIR=$(dirname $0)
+NOTICES=$MYDIR/notices
+NOTICEMAP=$MYDIR/noticemap.txt
+GLOBAL_PREFIX=$NOTICES/prefix.txt
+PROJECT_NAME=""
+
+fatal() {
+  echo ""
+  echo "$0: FATAL ERROR:" $* >&2
+  exit 1
+}
+
+set_project_name() {
+  PROJECT_NAME=$( \
+	  mvn -o validate \
+	  | grep "INFO.*Building" | head -1 \
+	  | sed 's/.*INFO.*Building//' \
+	  | sed 's/Sling/Apache Sling/g'
+	)	  
+}
+
+add_notice() {
+  NFILE=$NOTICES/$1.notice.txt
+  [[ -f $NFILE ]] || fatal "$NFILE not found"
+}
+
+# Collect dependencies of current module, and filter their names
+# so that they can be used as input to map_deps
+collect_deps() {
+  NO_NOTICE_FILTER="org.apache|commons-|javax."
+  
+  mvn -o dependency:resolve \
+  | grep '\[INFO\].*:.*:.*:.*' \
+  | grep -v 'Finished at:' \
+  | egrep -v "$NO_NOTICE_FILTER" | awk -F' ' '{ print $2 }' \
+  | cut -d':' -f1-2
+}
+
+# Map a list of dependencies to their notice files
+# Input is like
+#	org.eclipse.equinox.http:servlet
+#	org.slf4j:jcl104-over-slf4j
+#	org.slf4j:slf4j-api
+#	org.slf4j:slf4j-log4j12
+#
+# and output is built from the NOTICEMAP:
+#	equinox.txt
+#	slf4j.txt
+map_deps() {
+    [[ -f $NOTICEMAP ]] || fatal "$NOTICEMAP not found"
+	while read dep
+	do
+		mapped=$(grep "^${dep}=" $NOTICEMAP)
+		[[ -n "$mapped" ]] || fatal "No mapping found for '$dep' in $NOTICEMAP"
+		echo "$mapped"
+	done | cut -d= -f2
+}
+
+#Ɗcollect dependencies, map them to their notice
+# files and concatenate those
+generate_notice() {
+	set_project_name
+	[[ -n "$PROJECT_NAME" ]] || fatal "Project name not found"
+	echo "------------------------------------------------------------------------------"
+	echo $PROJECT_NAME  
+	cat $GLOBAL_PREFIX || fatal "prefix output failed"
+	collect_deps | map_deps | sort -u | while read notice
+	do
+	  if [[ "$notice" = NO_NOTICE ]]
+	  then
+	  	continue
+	  fi
+	  notice=$NOTICES/$notice
+	  [[ -f $notice ]] || fatal "Notice file $notice not found"
+	  cat $notice
+	  echo ""
+	done
+}
+
+generate_notice
\ No newline at end of file

Propchange: incubator/sling/trunk/etc/notice/mknotice
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/sling/trunk/etc/notice/noticemap.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/noticemap.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/noticemap.txt (added)
+++ incubator/sling/trunk/etc/notice/noticemap.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,39 @@
+# Map the filtered names (version numbers removed)
+# of Maven dependencies to the corresponding
+# notice files.
+#
+# The goal is to avoid duplicate notices, when 
+# several dependencies come from the same provider.
+#
+# Use NO_NOTICE to signal dependencies which do not
+# need a NOTICE file.
+#
+
+# ASF
+log4j:log4j=NO_NOTICE
+poi:poi=NO_NOTICE
+xerces:xercesImpl=NO_NOTICE
+xml-apis:xml-apis=NO_NOTICE
+
+# third-party
+junit:junit=junit.txt
+org.eclipse.equinox.http:servlet=equinox.txt
+org.slf4j:jcl104-over-slf4j=slf4j.txt
+org.slf4j:slf4j-api=slf4j.txt
+org.slf4j:slf4j-log4j12=slf4j.txt
+rhino:js=rhino.txt
+asm:asm=asm.txt
+cglib:cglib=cglib.txt
+concurrent:concurrent=concurrent.txt
+nekohtml:nekohtml=nekohtml.txt
+net.sf.kxml:kxml2=kxml2.txt
+org.codehaus.plexus:plexus-classworlds=codehaus.txt
+org.codehaus.plexus:plexus-container-default=codehaus.txt
+org.codehaus.plexus:plexus-utils=codehaus.txt
+org.json:json=json.txt
+org.mortbay.jetty:jetty=jetty.txt
+org.mortbay.jetty:jetty-util=jetty.txt
+org.mortbay.jetty:servlet-api-2.5=jetty.txt
+org.ops4j.pax.web:pax-web-service=pax.txt
+org.textmining:tm-extractors=textmining.txt
+pdfbox:pdfbox=pdfbox.txt

Propchange: incubator/sling/trunk/etc/notice/noticemap.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/asm.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/asm.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/asm.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/asm.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,6 @@
+------------------------------------------------------------------------------
+ASM notice
+------------------------------------------------------------------------------
+This product includes ASM software developed at asm.objectweb.org, distributed
+under ObjectWeb Apache-like license (http://asm.objectweb.org/license.html). 
+

Propchange: incubator/sling/trunk/etc/notice/notices/asm.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/cglib.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/cglib.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/cglib.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/cglib.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,7 @@
+------------------------------------------------------------------------------
+CGLIB notice
+------------------------------------------------------------------------------
+This product includes CGLIB software developed at cglib.sourceforge.net,
+distributed under the Apache Software License 
+(http://sourceforge.net/projects/cglib).
+

Propchange: incubator/sling/trunk/etc/notice/notices/cglib.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/codehaus.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/codehaus.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/codehaus.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/codehaus.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,5 @@
+------------------------------------------------------------------------------
+Codehaus notice
+------------------------------------------------------------------------------
+This product includes software developed at codehaus.org, under BSD-like 
+license.
\ No newline at end of file

Propchange: incubator/sling/trunk/etc/notice/notices/codehaus.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/concurrent.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/concurrent.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/concurrent.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/concurrent.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,9 @@
+------------------------------------------------------------------------------
+Concurrent library notice
+------------------------------------------------------------------------------
+This product includes concurrent library software developed by Doug Lea, 
+http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
+
+That code is public domain and includes classes adapted from Sun JDK source
+code, used with permission see
+http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/sun-u.c.license.pdf

Propchange: incubator/sling/trunk/etc/notice/notices/concurrent.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/equinox.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/equinox.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/equinox.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/equinox.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,9 @@
+------------------------------------------------------------------------------
+Equinox notice
+------------------------------------------------------------------------------
+This product includes Equinox software developed by the Eclipse foundation, 
+distributed under EPL license.
+
+EPL (http://www.eclipse.org/legal/epl-v10.html) is a reciprocal license, but 
+this product uses that software in binary form only, without modifications.
+

Propchange: incubator/sling/trunk/etc/notice/notices/equinox.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/jetty.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/jetty.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/jetty.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/jetty.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,5 @@
+------------------------------------------------------------------------------
+Jetty notice
+------------------------------------------------------------------------------
+This product includes Jetty software developed at mortbay.org, under Apache
+License.
\ No newline at end of file

Propchange: incubator/sling/trunk/etc/notice/notices/jetty.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/json.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/json.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/json.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/json.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,5 @@
+------------------------------------------------------------------------------
+JSON notice
+------------------------------------------------------------------------------
+This product includes software developed at json.org, under BSD-like json.org
+license, see http://www.json.org/license.html .
\ No newline at end of file

Propchange: incubator/sling/trunk/etc/notice/notices/json.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/junit.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/junit.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/junit.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/junit.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,9 @@
+------------------------------------------------------------------------------
+JUnit notice
+------------------------------------------------------------------------------
+This product includes software developed at junit.org, distributed under CPL 
+license (http://sourceforge.net/projects/junit/).
+
+CPL is a reciprocal license, but this product uses that software in binary 
+form only, without modifications.
+

Propchange: incubator/sling/trunk/etc/notice/notices/junit.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/kxml2.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/kxml2.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/kxml2.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/kxml2.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,5 @@
+------------------------------------------------------------------------------
+kXML2 notice
+------------------------------------------------------------------------------
+This product includes kXML2 software developed at http://kxml.sourceforge.net/, 
+under BSD license.
\ No newline at end of file

Propchange: incubator/sling/trunk/etc/notice/notices/kxml2.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/nekohtml.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/nekohtml.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/nekohtml.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/nekohtml.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,5 @@
+------------------------------------------------------------------------------
+CyberNeko notice
+------------------------------------------------------------------------------
+This product includes CyberNeko software developed at
+http://sourceforge.net/projects/nekohtml, under Apache License. 
\ No newline at end of file

Propchange: incubator/sling/trunk/etc/notice/notices/nekohtml.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/pax.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/pax.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/pax.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/pax.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,5 @@
+------------------------------------------------------------------------------
+Pax notice
+------------------------------------------------------------------------------
+This product includes Pax software developed at ops4j.org, under Apache
+License (http://wiki.ops4j.org/confluence/display/ops4j/Licensing).
\ No newline at end of file

Propchange: incubator/sling/trunk/etc/notice/notices/pax.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/pdfbox.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/pdfbox.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/pdfbox.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/pdfbox.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,5 @@
+------------------------------------------------------------------------------
+PDFBox notice
+------------------------------------------------------------------------------
+This product includes software developed at pdfbox.org, www.pdfbox.org, under 
+Apache License.
\ No newline at end of file

Propchange: incubator/sling/trunk/etc/notice/notices/pdfbox.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/prefix.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/prefix.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/prefix.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/prefix.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,16 @@
+Copyright 2007-2008 The Apache Software Foundation
+------------------------------------------------------------------------------
+Do not edit this NOTICE file directly, it is generated from the scripts
+found under etc/notice - see the scripts there for more info.
+------------------------------------------------------------------------------
+
+Based on source code originally developed by
+Day Software (http://www.day.com/).
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+See http://www.apache.org/legal/3party.html for the ASF policy on 
+third-party licenses.
+

Propchange: incubator/sling/trunk/etc/notice/notices/prefix.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/rhino.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/rhino.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/rhino.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/rhino.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,10 @@
+------------------------------------------------------------------------------
+Rhino notice
+------------------------------------------------------------------------------
+This product includes Rhino software developed at mozilla.org 
+(http://www.mozilla.org/), dual-licensed under both an MPL and a GPL license, 
+see http://developer.mozilla.org/en/docs/Rhino_License .
+
+MPL (http://www.mozilla.org/MPL/) is a reciprocal license, but this product 
+uses that software in binary form only, without modifications.
+

Propchange: incubator/sling/trunk/etc/notice/notices/rhino.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/slf4j.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/slf4j.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/slf4j.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/slf4j.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,6 @@
+------------------------------------------------------------------------------
+slf4j notice
+------------------------------------------------------------------------------
+This product includes software developed at http://slf4j.org, distributed
+under the slf4j MIT-like license (http://slf4j.org/license.html). 
+

Propchange: incubator/sling/trunk/etc/notice/notices/slf4j.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/trunk/etc/notice/notices/textmining.txt
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/etc/notice/notices/textmining.txt?rev=662451&view=auto
==============================================================================
--- incubator/sling/trunk/etc/notice/notices/textmining.txt (added)
+++ incubator/sling/trunk/etc/notice/notices/textmining.txt Mon Jun  2 07:53:55 2008
@@ -0,0 +1,8 @@
+------------------------------------------------------------------------------
+Textmining notice
+------------------------------------------------------------------------------
+Although the latest tm-extractors software is under LGPL license, it 
+seems like the version 0.4 that we're using is under the BSD-like license
+found at http://www.searchblox.com/TEXT_MINING_license.html.
+
+TODO: verify this, and find a workaround if needed (SLING-494).

Propchange: incubator/sling/trunk/etc/notice/notices/textmining.txt
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message