I recovered some codes for building the class-path in the MANIFEST-MF file, it is required by jaxwsl tools. It looks to me that it won't break OSGi stuff. If any problem, please drop an email. Thanks.
2011/6/10 <[email protected]> > Author: xuhaihong > Date: Fri Jun 10 10:20:07 2011 > New Revision: 1134266 > > URL: http://svn.apache.org/viewvc?rev=1134266&view=rev > Log: > GERONIMO-6003 Enable jaxws script files in the bin directory > > Modified: > > > geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java > geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml > > geronimo/server/trunk/plugins/jaxws/jaxws-tools/src/main/assembly/bin.xml > > Modified: > geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java > URL: > http://svn.apache.org/viewvc/geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java?rev=1134266&r1=1134265&r2=1134266&view=diff > > ============================================================================== > --- > geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java > (original) > +++ > geronimo/server/trunk/framework/buildsupport/car-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/car/ArchiveCarMojo.java > Fri Jun 10 10:20:07 2011 > @@ -33,6 +33,7 @@ import org.apache.geronimo.kernel.osgi.C > import org.apache.geronimo.system.osgi.BootActivator; > import org.apache.maven.archiver.MavenArchiveConfiguration; > import org.apache.maven.archiver.MavenArchiver; > +import org.apache.maven.artifact.Artifact; > import org.apache.maven.artifact.versioning.ArtifactVersion; > import org.apache.maven.model.License; > import org.apache.maven.plugin.MojoExecutionException; > @@ -339,6 +340,11 @@ public class ArchiveCarMojo > } > } > } > + > + if (classpath != null) { > + archive.addManifestEntry("Class-Path", getClassPath()); > + } > + > archiver.createArchive(project, archive); > > return archiveFile; > @@ -349,6 +355,43 @@ public class ArchiveCarMojo > } > } > > + private String getClassPath() throws MojoExecutionException { > + StringBuilder buff = new StringBuilder(); > + for (int i = 0; i < classpath.length; i++) { > + String entry = classpath[i].getEntry(); > + if (entry != null) { > + buff.append(entry); > + } else { > + Artifact artifact = > resolveArtifact(classpath[i].getGroupId(), classpath[i].getArtifactId(), > classpath[i].getType()); > + if (artifact == null) { > + throw new MojoExecutionException("Could not resolve > classpath item: " + classpath[i]); > + } > + // > + // TODO: Need to optionally get all transitive > dependencies... but dunno how to get that intel from m2 > + // > + String prefix = classpath[i].getClasspathPrefix(); > + if (prefix == null) { > + prefix = classpathPrefix; > + } > + if (prefix != null) { > + buff.append(prefix); > + if (!prefix.endsWith("/")) { > + buff.append("/"); > + } > + } > + String path = getArtifactRepository().pathOf(artifact); > + buff.append(path); > + } > + if (i + 1 < classpath.length) { > + buff.append(" "); > + } > + } > + if (getLog().isDebugEnabled()) { > + getLog().debug("Using classpath: " + buff); > + } > + return buff.toString(); > + } > + > private static class GeronimoArchiver extends MavenArchiver { > > private ArchiverManager archiverManager; > > Modified: geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml > URL: > http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml?rev=1134266&r1=1134265&r2=1134266&view=diff > > ============================================================================== > --- geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml (original) > +++ geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml Fri Jun 10 > 10:20:07 2011 > @@ -94,7 +94,7 @@ > <Extension-Dirs>lib/ext</Extension-Dirs> > </manifestEntries> > <manifest> > - > <mainClass>org.apache.geronimo.jaxws.builder.JAXWSToolsCLI</mainClass> > + > <mainClass>org.apache.geronimo.jaxws.sun.tools.JAXWSToolsCLI</mainClass> > </manifest> > </archive> > <!-- > @@ -112,27 +112,24 @@ > <version>${project.version}</version> > </element> > <element> > - <groupId>cglib</groupId> > - <artifactId>cglib-nodep</artifactId> > + > <groupId>org.apache.servicemix.bundles</groupId> > + > <artifactId>org.apache.servicemix.bundles.cglib</artifactId> > </element> > <element> > - <groupId>org.slf4j</groupId> > - <artifactId>slf4j-api</artifactId> > + <groupId>org.ops4j.pax.logging</groupId> > + <artifactId>pax-logging-api</artifactId> > </element> > <element> > - <groupId>org.slf4j</groupId> > - <artifactId>slf4j-log4j12</artifactId> > - </element> > - <element> > - <groupId>org.slf4j</groupId> > - <artifactId>jcl-over-slf4j</artifactId> > + > <groupId>org.apache.geronimo.framework</groupId> > + <artifactId>geronimo-pax-logging</artifactId> > + <version>${project.version}</version> > </element> > <element> > - <groupId>log4j</groupId> > - <artifactId>log4j</artifactId> > + <groupId>org.apache.xbean</groupId> > + <artifactId>xbean-classloader</artifactId> > </element> > </classpath> > - <classpathPrefix>../lib</classpathPrefix> > + <classpathPrefix>../repository</classpathPrefix> > > <useMavenDependencies> > <value>true</value> > > Modified: > geronimo/server/trunk/plugins/jaxws/jaxws-tools/src/main/assembly/bin.xml > URL: > http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/jaxws-tools/src/main/assembly/bin.xml?rev=1134266&r1=1134265&r2=1134266&view=diff > > ============================================================================== > --- > geronimo/server/trunk/plugins/jaxws/jaxws-tools/src/main/assembly/bin.xml > (original) > +++ > geronimo/server/trunk/plugins/jaxws/jaxws-tools/src/main/assembly/bin.xml > Fri Jun 10 10:20:07 2011 > @@ -24,14 +24,6 @@ > <dependencySets> > > <dependencySet> > - <outputDirectory>contents/lib</outputDirectory> > - <useStrictFiltering>true</useStrictFiltering> > - <includes> > - > <include>org.apache.geronimo.modules:geronimo-jaxws-sun-tools</include> > - </includes> > - </dependencySet> > - > - <dependencySet> > <outputDirectory>contents/bin</outputDirectory> > <outputFileNameMapping>jaxws-tools.jar</outputFileNameMapping> > <useStrictFiltering>true</useStrictFiltering> > > > -- Ivan
