Author: nbubna
Date: Fri Apr 2 21:07:51 2010
New Revision: 930385
URL: http://svn.apache.org/viewvc?rev=930385&view=rev
Log:
VELOCITY-694 manually build osgi manifest stuff
Modified:
velocity/engine/trunk/build/build.properties
velocity/engine/trunk/build/build.xml
Modified: velocity/engine/trunk/build/build.properties
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/build/build.properties?rev=930385&r1=930384&r2=930385&view=diff
==============================================================================
--- velocity/engine/trunk/build/build.properties (original)
+++ velocity/engine/trunk/build/build.properties Fri Apr 2 21:07:51 2010
@@ -163,3 +163,10 @@ jar.commons-lang.dir= ${build.lib}
javac.target=1.4
javac.source=1.4
+
+########################################################################
+# OSGi stuff
+import
=com.werken.xpath,javax.naming,javax.servlet,javax.servlet.http,javax.sql,org.apache.commons.collections,org.apache.commons.collections.map,org.apache.commons.lang,org.apache.commons.lang.builder,org.apache.commons.lang.text,org.apache.commons.logging,org.apache.log,org.apache.log.format,org.apache.log.output.io,org.apache.log4j,org.apache.oro.text.perl,org.apache.tools.ant,org.apache.tools.ant.taskdefs,org.jdom,org.jdom.input,org.jdom.output,org.xml.sax
+dep.import=com.werken.xpath,javax.naming,javax.servlet,javax.servlet.http,javax.sql,org.apache.commons.logging,org.apache.log,org.apache.log.format,org.apache.log.output.io,org.apache.log4j,org.apache.tools.ant,org.apache.tools.ant.taskdefs,org.jdom,org.jdom.input,org.jdom.output,org.xml.sax
+export
=org.apache.velocity;uses:="org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime.resource",org.apache.velocity.anakia;uses:="com.werken.xpath,org.apache.tools.ant,org.apache.tools.ant.taskdefs,org.jdom,org.jdom.output",org.apache.velocity.app;uses:="org.apache.commons.collections,org.apache.velocity,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.log",org.apache.velocity.app.event;uses:="org.apache.velocity.context,org.apache.velocity.runtime,org.apache.velocity.util.introspection",org.apache.velocity.app.event.implement;uses:="org.apache.velocity.app.event,org.apache.velocity.context,org.apache.velocity.runtime,org.apache.velocity.util,org.apache.velocity.util.introspection",org.apache.velocity.app.tools;uses:="org.apache.velocity.context",org.apache.velocity.context;uses:="org.apache.velocity.app.event,org.apache.velocity.exception,org.apache.velocity.runtime,org.ap
ache.velocity.runtime.parser.node,org.apache.velocity.runtime.resource,org.apache.velocity.util.introspection",org.apache.velocity.convert,org.apache.velocity.exception;uses:="org.apache.velocity.runtime.parser,org.apache.velocity.util.introspection",org.apache.velocity.io,org.apache.velocity.runtime;uses:="org.apache.commons.collections,org.apache.velocity,org.apache.velocity.app.event,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.log,org.apache.velocity.runtime.parser,org.apache.velocity.runtime.parser.node,org.apache.velocity.runtime.resource,org.apache.velocity.util.introspection",org.apache.velocity.runtime.defaults,org.apache.velocity.runtime.directive;uses:="org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.parser,org.apache.velocity.runtime.parser.node",org.apache.velocity.runtime.log;uses:="org.apache.log.format,org.apache.vel
ocity.runtime,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser.node,org.apache.velocity.util.introspection",org.apache.velocity.runtime.parser;uses:="org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser.node",org.apache.velocity.runtime.parser.node;uses:="org.apache.commons.lang.text,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.log,org.apache.velocity.runtime.parser,org.apache.velocity.util.introspection",org.apache.velocity.runtime.resource;uses:="org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.resource.loader",org.apache.velocity.runtime.resource.loader;uses:="javax.sql,org.apache.commons.collections,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.resource,org.apache.velocity.runtime.resource.util",org.apache.velocity.runtime.reso
urce.util,org.apache.velocity.runtime.visitor;uses:="org.apache.velocity.context,org.apache.velocity.runtime.parser.node",org.apache.velocity.servlet;uses:="javax.servlet,javax.servlet.http,org.apache.velocity,org.apache.velocity.context,org.apache.velocity.exception",org.apache.velocity.texen;uses:="org.apache.velocity,org.apache.velocity.app,org.apache.velocity.context",org.apache.velocity.texen.ant;uses:="org.apache.commons.collections,org.apache.tools.ant,org.apache.velocity.context",org.apache.velocity.texen.defaults,org.apache.velocity.texen.util,org.apache.velocity.util;uses:="org.apache.velocity.context,org.apache.velocity.runtime,org.apache.velocity.runtime.parser.node,org.apache.velocity.util.introspection",org.apache.velocity.util.introspection;uses:="org.apache.velocity.runtime,org.apache.velocity.runtime.log,org.apache.velocity.runtime.parser.node,org.apache.velocity.util"
+dep.export=org.apache.commons.collections,org.apache.commons.collections.iterators;uses:="org.apache.commons.collections",org.apache.commons.collections.map;uses:="org.apache.commons.collections",org.apache.commons.lang;uses:="org.apache.commons.lang.exception",org.apache.commons.lang.builder,org.apache.commons.lang.enum,org.apache.commons.lang.enums,org.apache.commons.lang.exception,org.apache.commons.lang.math,org.apache.commons.lang.mutable,org.apache.commons.lang.text,org.apache.commons.lang.time,org.apache.oro.io;uses:="org.apache.oro.text,org.apache.oro.text.regex",org.apache.oro.text;uses:="org.apache.oro.text.regex,org.apache.oro.util",org.apache.oro.text.awk;uses:="org.apache.oro.text.regex",org.apache.oro.text.perl;uses:="org.apache.oro.text,org.apache.oro.text.regex",org.apache.oro.text.regex,org.apache.oro.util,org.apache.velocity;uses:="org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime.resource",org.apache.velocity.anakia;uses
:="com.werken.xpath,org.apache.tools.ant,org.apache.tools.ant.taskdefs,org.jdom,org.jdom.output",org.apache.velocity.app;uses:="org.apache.commons.collections,org.apache.velocity,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.log",org.apache.velocity.app.event;uses:="org.apache.velocity.context,org.apache.velocity.runtime,org.apache.velocity.util.introspection",org.apache.velocity.app.event.implement;uses:="org.apache.velocity.app.event,org.apache.velocity.context,org.apache.velocity.runtime,org.apache.velocity.util,org.apache.velocity.util.introspection",org.apache.velocity.app.tools;uses:="org.apache.velocity.context",org.apache.velocity.context;uses:="org.apache.velocity.app.event,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.parser.node,org.apache.velocity.runtime.resource,org.apache.velocity.util.introspection",org.apache.velocity.convert,org.apache.velocity.except
ion;uses:="org.apache.velocity.runtime.parser,org.apache.velocity.util.introspection",org.apache.velocity.io,org.apache.velocity.runtime;uses:="org.apache.commons.collections,org.apache.velocity,org.apache.velocity.app.event,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.log,org.apache.velocity.runtime.parser,org.apache.velocity.runtime.parser.node,org.apache.velocity.runtime.resource,org.apache.velocity.util.introspection",org.apache.velocity.runtime.defaults,org.apache.velocity.runtime.directive;uses:="org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.parser,org.apache.velocity.runtime.parser.node",org.apache.velocity.runtime.log;uses:="org.apache.log.format,org.apache.velocity.runtime,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser.node,org.apache.velocity.util.introspection",org.apache.velocity.runtime.parse
r;uses:="org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.directive,org.apache.velocity.runtime.parser.node",org.apache.velocity.runtime.parser.node;uses:="org.apache.commons.lang.text,org.apache.velocity.context,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.log,org.apache.velocity.runtime.parser,org.apache.velocity.util.introspection",org.apache.velocity.runtime.resource;uses:="org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.resource.loader",org.apache.velocity.runtime.resource.loader;uses:="javax.sql,org.apache.commons.collections,org.apache.velocity.exception,org.apache.velocity.runtime,org.apache.velocity.runtime.resource,org.apache.velocity.runtime.resource.util",org.apache.velocity.runtime.resource.util,org.apache.velocity.runtime.visitor;uses:="org.apache.velocity.context,org.apache.velocity.runtime.parser.node",org.apache.velocity.servlet;uses:="javax.se
rvlet,javax.servlet.http,org.apache.velocity,org.apache.velocity.context,org.apache.velocity.exception",org.apache.velocity.texen;uses:="org.apache.velocity,org.apache.velocity.app,org.apache.velocity.context",org.apache.velocity.texen.ant;uses:="org.apache.commons.collections,org.apache.tools.ant,org.apache.velocity.context",org.apache.velocity.texen.defaults,org.apache.velocity.texen.util,org.apache.velocity.util;uses:="org.apache.velocity.context,org.apache.velocity.runtime,org.apache.velocity.runtime.parser.node,org.apache.velocity.util.introspection",org.apache.velocity.util.introspection;uses:="org.apache.velocity.runtime,org.apache.velocity.runtime.log,org.apache.velocity.runtime.parser.node,org.apache.velocity.util"
\ No newline at end of file
Modified: velocity/engine/trunk/build/build.xml
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/build/build.xml?rev=930385&r1=930384&r2=930385&view=diff
==============================================================================
--- velocity/engine/trunk/build/build.xml (original)
+++ velocity/engine/trunk/build/build.xml Fri Apr 2 21:07:51 2010
@@ -432,6 +432,8 @@
description="Builds the Velocity Jar file including all
dependencies">
<property name="jarname" value="${project}-${version}-dep" />
<property name="bundlename" value="${project}-dep" />
+ <property name="bundleimport" value="${dep.import}" />
+ <property name="bundleexport" value="${dep.export}" />
<antcall target="build-jar" />
</target>
@@ -442,6 +444,8 @@
description="Builds the Velocity Jar file">
<property name="jarname" value="${final.name}" />
<property name="bundlename" value="${project}" />
+ <property name="bundleimport" value="${import}" />
+ <property name="bundleexport" value="${export}" />
<antcall target="build-jar" />
</target>
@@ -470,10 +474,16 @@
<attribute name="Implementation-Vendor-Id" value="org.apache"/>
<attribute name="Implementation-Vendor" value="Apache Software
Foundation"/>
<attribute name="Implementation-Version" value="${version}"/>
+ <attribute name="Bundle-ManifestVersion" value="2"/>
+ <attribute name="Bundle-Name" value="${ant.project.name}"/>
+ <attribute name="Bundle-Vendor" value="Apache Software Foundation"/>
+ <attribute name="Bundle-SymbolicName"
value="org.apache.${bundlename}"/>
+ <attribute name="Bundle-Version" value="${version}"/>
+ <attribute name="Import-Package" value="${bundleimport}"/>
+ <attribute name="Export-Package" value="${bundleexport}"/>
</manifest>
</jar>
<antcall target="bundlor"/>
- <antcall target="if-no-osgi"/>
<checksum file="${build.dir}/${jarname}.jar" algorithm="md5"
property="checksum.jar.md5"/>
<checksum file="${build.dir}/${jarname}.jar" algorithm="sha1"
property="checksum.jar.sha1"/>
<echo message="${checksum.jar.md5} *${jarname}.jar"
file="${build.dir}/${jarname}.jar.md5" />
@@ -500,13 +510,8 @@
outputPath="${build.dir}/${jarname}.jar"
bundleVersion="${version}">
<property name="name" value="${ant.project.name}" />
- <property name="bundlename" value="${bundlename}" />
+ <property name="bundlename" value="org.apache.${bundlename}" />
<manifestTemplate>
-Bundle-ManifestVersion: 2
-Bundle-Name: Apache Velocity
-Bundle-Vendor: Apache Software Foundation
-Bundle-SymbolicName: org.apache.${bundlename}
-Bundle-Version: ${version}
</manifestTemplate>
</bundlor:bundlor>
</target>
@@ -957,7 +962,7 @@ Bundle-Version: ${version}
<!-- ================================================================== -->
<target name="release"
description="Build the packages as release manager, does additional checks
over the package target"
- depends="package-java-check, use-osgi, clean, package, pom,
release.howto"/>
+ depends="package-java-check, clean, package, pom, release.howto"/>
<!-- ================================================================== -->
<!-- Packages the distribution with ZIP and TAR-GZIP -->