[
https://issues.apache.org/jira/browse/CXF-2833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878368#action_12878368
]
Christian Schneider commented on CXF-2833:
------------------------------------------
I have now managed to build the bundle and the source bundle.
The problem why the source is not attached is that thwere are different version
formats.
The bundle has: Bundle-Version: 2.3.0.SNAPSHOT
while the source bundle references: Eclipse-SourceBundle:
org.apache.cxf.bundle-minimal;version="2.3.0-SNA
PSHOT"
So at least we have to exchange the "-" for a "."
Additionally I have read that in osgi snapshots in version should be called
.qualifier instead of .SNAPSHOT. But I don“t know if this is really a must.
In camel this is done using the following aant snippet that creates
camel.osgi.version.clean. I really wonder if there is a better way to do this.
Especially I think that the maven source plugin should create a correct
"Eclipse-SourceBundle: " by default. What do you think?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<id>create-prop</id>
<phase>initialize</phase>
<configuration>
<tasks>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="maven.plugin.classpath" />
<property name="ant.regexp.regexpimpl"
value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" />
<property name="mv" value="${project.version}" />
<echo message="Maven version: ${mv}" />
<propertyregex property="ov.p1" input="${mv}"
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace="\1"
defaultValue="0" />
<propertyregex property="ov.p2" input="${mv}"
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\2"
defaultValue=".0" />
<propertyregex property="ov.p3" input="${mv}"
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\3"
defaultValue=".0" />
<propertyregex property="ov.p4" input="${mv}"
regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\4"
defaultValue="" />
<propertyregex property="ov.p1a" input="${ov.p1}" regexp="(.+)"
replace="\1" defaultValue="0" />
<propertyregex property="ov.p2a" input="${ov.p2}"
regexp="(\..+)" replace="\1" defaultValue=".0" />
<propertyregex property="ov.p3a" input="${ov.p3}"
regexp="(\..+)" replace="\1" defaultValue=".0" />
<propertyregex property="ov.p4a" input="${ov.p4}"
regexp="(\..+)" replace="\1" defaultValue="" />
<property name="ov"
value="${ov.p1a}${ov.p2a}${ov.p3a}${ov.p4a}" />
<property name="os" value="${ov.p1a}${ov.p2a}" />
<echo message="OSGi version: ${ov}" />
<mkdir dir="target" />
<echo file="target/camel.osgi.version.txt">
camel.osgi.version.clean = ${ov}
camel.schema.version = ${os}
</echo>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api-version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb-version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>${jaxb-version}</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-optional</artifactId>
<version>1.5.3-1</version>
</dependency>
</dependencies>
</plugin>
> Source jars for osgi jars should work in Eclipse PDE mode
> ---------------------------------------------------------
>
> Key: CXF-2833
> URL: https://issues.apache.org/jira/browse/CXF-2833
> Project: CXF
> Issue Type: Improvement
> Components: OSGi
> Affects Versions: 2.2.8
> Reporter: Christian Schneider
> Assignee: Daniel Kulp
> Priority: Minor
> Fix For: 2.2.10
>
>
> Currently the source jar of osgi bundles like cxf bundle minimal does not
> contain the necessary entries for eclipse to recognize it. The missing
> entries are:
> Bundle-SymbolicName: org.apache.cxf.cxf-bundle-minimal.source
> Eclipse-SourceBundle:org.apache.cxf.cxf-bundle-minimal;version="2.3.0.qualifier"
> Bundle-Version: 2.3.0.qualifier
> In camel there was a similar issue that could be ssolved with the
> maven-source-plugin:
> https://issues.apache.org/activemq/browse/CAMEL-2734
> In this case the shade plugin is used and I am not sure how to influence the
> manifest of the source jar. Any idea how to do this?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.