Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Source bundles for third-party jars

I use a separate project for the source bundle with .source in the artifact name. 


On Friday, July 12, 2013, iulian dragos wrote:
Hi all,

We are re-packaging a few jars (retrieved from Maven Central) as OSGi bundles using the maven-bundle-plugin. It is the Scala standard library, among others.

I'd like to create source bundles for them, and I can't get it work quite right. I can retrieve and unpack sources using the maven-dependency-plugin, and after some fiddling, they get packaged as a separate jar. I am using the same project for both, so I have a single pom file.

The problem is that `mvn install` installs both the bundle and the source bundle under the same artifact name (without `.source` at the end). The "feature" project can't find the .source bundle (I added it in feature.xml), because it presumably it tries to find it in a subdirectory with `.source` at the end:

[INFO] --- maven-install-plugin:2.4:install (default-install) @ org.scala-ide.scala.library ---
[INFO] Installing /Volumes/Thunderbolt_SSD/dragos/workspace/plugin/dragos-scala-ide/org.scala-ide.scala.library/target/org.scala-ide.scala.library-4.0.0-SNAPSHOT.jar to /Users/dragos/.m2/repository/org/scala-ide/org.scala-ide.scala.library/4.0.0-SNAPSHOT/org.scala-ide.scala.library-4.0.0-SNAPSHOT.jar
[INFO] Installing /Volumes/Thunderbolt_SSD/dragos/workspace/plugin/dragos-scala-ide/org.scala-ide.scala.library/pom.xml to /Users/dragos/.m2/repository/org/scala-ide/org.scala-ide.scala.library/4.0.0-SNAPSHOT/org.scala-ide.scala.library-4.0.0-SNAPSHOT.pom
[INFO] Installing /Volumes/Thunderbolt_SSD/dragos/workspace/plugin/dragos-scala-ide/org.scala-ide.scala.library/target/org.scala-ide.scala.library-4.0.0-SNAPSHOT-sources.jar to /Users/dragos/.m2/repository/org/scala-ide/org.scala-ide.scala.library/4.0.0-SNAPSHOT/org.scala-ide.scala.library-4.0.0-SNAPSHOT-sources.jar

What is the preferred way to handle this? Should I have a separate project (what packaging should I use? I don't want to rebuild the sources).

Alternatively, the Scala team already includes OSGi headers in their jars, so I could probably convince them to add OSGi (with Eclipse-SourceBundle headers) in their sources jar, BUT will I be able to use them from Tycho? (publishing will still be to Maven, and sources will be under the same artifact coordinates as the binaries, org.scala-lang:scala-library).


« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

Back to the top