Manage licenses
authormbaudier <mbaudier@argeo.org>
Wed, 18 Jun 2014 09:54:21 +0000 (11:54 +0200)
committermbaudier <mbaudier@argeo.org>
Wed, 18 Jun 2014 09:54:21 +0000 (11:54 +0200)
Use singletons

META-INF/spring/distribution.xml
META-INF/spring/org.argeo.tp.apache.tomcat.xml
META-INF/spring/org.argeo.tp.javax.xml
META-INF/spring/org.argeo.tp.xml
META-INF/spring/templates.xml

index b5cd3191ed3d59f7796e889520caefec0354eb54..c905ec0b0e57969a7aa299403b661600e33158f7 100644 (file)
@@ -16,7 +16,7 @@
                                <ref bean="org.argeo.tp/org.apache.log4j" />
                                <ref bean="org.argeo.tp/org.slf4j" />
                                <ref bean="org.argeo.tp.apache.tomcat/org.apache.tomcat" />
-                               <ref bean="org.argeo.tp/org.aopalliance" />
+                               <ref bean="org.aopalliance" />
                                <ref bean="org.argeo.tp/org.aspectj" />
                                <ref bean="org.argeo.tp.spring/org.springframework" />
                                <ref bean="org.argeo.tp.apache.ant/org.apache.ant" />
                <property name="workspace" value="argeo-tp-2.1" />
                <property name="nodeIndexers">
                        <list>
-                               <bean class="org.argeo.slc.repo.ArtifactIndexer" />
                                <bean class="org.argeo.slc.repo.JarFileIndexer" />
                                <bean class="org.argeo.slc.repo.ModularDistributionIndexer" />
                                <bean class="org.argeo.slc.repo.PdeSourcesIndexer" />
+                               <bean class="org.argeo.slc.repo.ArtifactIndexer" />
                        </list>
                </property>
                <property name="mirrors">
index 3f295e24aca9e3dd6f2f300c7bd4317fe42b3208..2f28be84c74be8d92ea0287836881267b2413fa2 100644 (file)
@@ -66,6 +66,9 @@
                <bean parent="template.archiveWrapper">
                        <property name="uri"
                                value="http://archive.apache.org/dist/tomcat/tomcat-7/v@{version}/bin/apache-tomcat-@{version}.zip" />
+                       <property name="license">
+                               <util:constant static-field="org.argeo.slc.repo.FreeLicense.APACHE" />
+                       </property>
                        <property name="wrappers">
                                <map>
                                        <!-- Tomcat -->
index cb57e7386107d495d80483a0eeb148a061c1dba7..1fc9ecd4d58956f745e5b27b4e55095bb60349ca 100644 (file)
@@ -20,5 +20,8 @@
        <!-- FACTORY -->
        <bean id="template.javax" parent="template.bndWrapper" abstract="true">
                <property name="groupId" value="org.argeo.tp.javax" />
+               <property name="license">
+                       <util:constant static-field="org.argeo.slc.repo.FreeLicense.CDDL" />
+               </property>
        </bean>
 </beans>
\ No newline at end of file
index 155c11913f37e82aabb1391d30ebbda82859cb62..80792178b3d5404f2a68478b2a1f870d0ae2f42f 100644 (file)
        <bean id="org.slf4j.api" parent="template.org.slf4j" />
        <bean id="org.slf4j.commons.logging" parent="template.org.slf4j" />
 
-       <bean id="org.aopalliance" p:version="1.0.0" 
-               p:sourceCoords="aopalliance:aopalliance:1.0" parent="template.mavenWrapper" />
-
-       <!-- AOP Alliance factory -->
-       <flow:flow name="org.argeo.tp/org.aopalliance">
-               <ref bean="org.aopalliance" />
-       </flow:flow>
+       <bean id="org.aopalliance" p:version="1.0.0" p:sourceCoords="aopalliance:aopalliance:1.0"
+               parent="template.mavenWrapper">
+               <property name="license">
+                       <util:constant static-field="org.argeo.slc.repo.FreeLicense.PUBLIC_DOMAIN" />
+               </property>
+       </bean>
 
        <!-- Eclipse Batch Compiler (ECJ) factory -->
        <flow:flow name="org.argeo.tp/org.eclipse.jdt.core.compiler.batch"
@@ -69,6 +68,9 @@
                <bean parent="template.archiveWrapper">
                        <property name="uri"
                                value="http://archive.apache.org/dist/logging/log4j/@{version}/log4j-@{version}.zip" />
+                       <property name="license">
+                               <util:constant static-field="org.argeo.slc.repo.FreeLicense.APACHE" />
+                       </property>
                        <property name="wrappers">
                                <map>
                                        <entry key="apache-log4j-@{version}/log4j-@{version}.jar"
@@ -84,6 +86,9 @@
                <bean parent="template.archiveWrapper">
                        <property name="uri"
                                value="http://www.eclipse.org/downloads/tools/aspectj/aspectj-@{version}.jar" />
+                       <property name="license">
+                               <util:constant static-field="org.argeo.slc.repo.FreeLicense.EPL" />
+                       </property>
                        <property name="wrappers">
                                <map>
                                        <entry key="lib/aspectjweaver.jar" value-ref="org.aspectj.weaver" />
                <bean parent="template.archiveWrapper">
                        <property name="uri"
                                value="http://www.slf4j.org/dist/slf4j-@{version}.zip" />
+                       <property name="license">
+                               <util:constant static-field="org.argeo.slc.repo.FreeLicense.MIT" />
+                       </property>
                        <property name="wrappers">
                                <map>
                                        <entry key="slf4j-@{version}/slf4j-log4j12-@{version}.jar"
index 87524890e2ef1d8b018256762a8f2217861e01bc..94411443179e5c573956e3523afa6601efa4ebd2 100644 (file)
                <property name="osgiFactory" ref="osgiFactory" />
        </bean>
 
-       <!-- Must be a prototype since wrapper are stateful objects, properties 
-               such as version can be set by caller. -->
        <bean id="template.bndWrapper" class="org.argeo.slc.repo.osgi.BndWrapper"
-               abstract="true" scope="prototype">
+               abstract="true">
                <property name="groupId" value="org.argeo.tp" />
                <property name="bndProperties">
                        <props>
@@ -30,7 +28,7 @@
                </property>
        </bean>
        <bean id="template.mavenWrapper" class="org.argeo.slc.repo.osgi.MavenWrapper"
-               abstract="true" scope="prototype">
+               abstract="true">
                <property name="groupId" value="org.argeo.tp" />
                <property name="bndProperties">
                        <props>