Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Version numbering for Branches ?

Hi,
 
thank's a lot for the replies. Unfortunately using the tycho-packaging-plugin's 'format' Parmeter with an escaped Branchname
did not work. The same Exception is thrown.
 
Tycho seems to use a Maven 'afterProjectRead' Hook to resolve Target-Platform Dependencies before the actual
Build starts and this is where the Exception is thrown. 
As far as i can tell from looking at the code quickly the 'tycho-packaging-plugin' is not involved in this process.
 
In Class SourcesBundleDependencyMetadataGenerator the SNAPSHOT (if present) ist stripped of the Maven-Version and
'.qualifier' is appended. So a Maven Version of 3.3.0-BRANCHNAME-SNAPSHOT is transformed to 
3.3.0-BRANCHNAME.qualifier which has a non-Numeric Micro Version of '0-BRANCHNAME' which leads to the
Exception.
 
To me it seems that Tycho can't currently handle Maven Versions like 3.3.0-BRANCHNAME-SNAPSHOT !?
 
I will try to work around the problem by using a naming convention for Branch-Versions.
If anyone knows a better solution please let me know :-) !
 
Regards,
 
Andre

>>> Kai Zimmermann <zimmermann.k@xxxxxxxxx> 28.08.2013 17:48 >>>
Oh, i mean. Use the format Parameter ofhttp://eclipse.org/tycho/sitedocs/tycho-packaging-plugin/build-qualifier-mojo.html and escape your branchname in the dateformat.

Am 28.08.2013 um 17:42 schrieb Igor Fedorenko <igor@xxxxxxxxxxxxxx>:

What OSGi version do you want to use for the branch?

--
Regards,
Igor

On 2013-08-28 11:37 AM, Andre Rieck wrote:
Hello,

we use tycho to build our plugins, features and also the final
product.
At the moment we face the problem that we would like to branch the
project do
develop an new feature indenpendently from the trunk.

As for the Versions used, for example we use 3.3.0-SNAPSHOT as the
maven Version
and 3.3.0.qualifier as the OSGi-Version on the trunk.
The problem we face is that we would like to use
3.3.0-BRANCHNAME-SNAPSHOT as
the Maven version on the branch (and use "forceContextQualifier" to
label the
OSGi Artifacts as belonging to the branch)

Unfortunately the Maven Version "3.3.0-BRANCHNAME-SNAPSHOT" lead to
'invalid version "3.3.0-BRANCH.qualifier": non-numeric "0-BRANCH"'
(please see stacktrace below)

Does anyone faces a similar problem or can give a hint to a working
version-number scheme for feature-branches ?

Thanks a lot !

Andr

--

[ERROR] Internal error: java.lang.RuntimeException:
org.osgi.framework.BundleException: Invalid manifest header
Bundle-Version: "3.3.0-BRANCH.qualifier" : inval
id version "3.3.0-BRANCH.qualifier": non-numeric "0-BRANCH": For input
string: "0-BRANCH" -> [Help 1]
org.apache.maven.InternalErrorException: Internal error:
java.lang.RuntimeException: org.osgi.framework.BundleException: Invalid
manifest header Bundle-Version:
"3.3.0-BRANCH.qualifier" : invalid version "3.3.0-BRANCH.qualifier":
non-numeric "0-BRANCH"
at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException:
org.osgi.framework.BundleException: Invalid manifest header
Bundle-Version: "3.3.0-BRANCH.qualifier" : invalid version "3
.3.0-BRANCH.qualifier": non-numeric "0-BRANCH"
at
org.eclipse.tycho.p2.impl.publisher.SourcesBundleDependencyMetadataGenerator.getPublisherActions(SourcesBundleDependencyMetadataGenerator.java:72)
at
org.eclipse.tycho.p2.impl.publisher.AbstractMetadataGenerator.generateMetadata(AbstractMetadataGenerator.java:56)
at
org.eclipse.tycho.p2.impl.publisher.SourcesBundleDependencyMetadataGenerator.generateMetadata(SourcesBundleDependencyMetadataGenerator.java:41)
at
org.eclipse.tycho.p2.impl.publisher.SourcesBundleDependencyMetadataGenerator.generateMetadata(SourcesBundleDependencyMetadataGenerator.java:1)
at
org.eclipse.tycho.source.SourcesP2MetadataProvider.getDependencyMetadata(SourcesP2MetadataProvider.java:48)
at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver$1.run(P2TargetPlatformResolver.java:148)
at
org.eclipse.tycho.core.maven.utils.PluginRealmHelper.execute(PluginRealmHelper.java:119)
at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.getDependencyMetadata(P2TargetPlatformResolver.java:144)
at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.setupProjects(P2TargetPlatformResolver.java:126)
at
org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.setupProject(DefaultTychoDependencyResolver.java:87)
at
org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:77)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
... 11 more
Caused by: org.osgi.framework.BundleException: Invalid manifest header
Bundle-Version: "3.3.0-BRANCH.qualifier" : invalid version
"3.3.0-BRANCH.qualifier": non-
numeric "0-BRANCH"
at
org.eclipse.osgi.internal.resolver.StateBuilder.createBundleDescription(StateBuilder.java:98)
at
org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.createBundleDescription(StateObjectFactoryImpl.java:33)
at
org.eclipse.tycho.p2.impl.publisher.SourcesBundleDependencyMetadataGenerator.getPublisherActions(SourcesBundleDependencyMetadataGenerator.java:62)
... 23 more
Caused by: java.lang.IllegalArgumentException: invalid version
"3.3.0-BRANCH.qualifier": non-numeric "0-BRANCH"
at org.osgi.framework.Version.parseInt(Version.java:170)
at org.osgi.framework.Version.<init>(Version.java:134)
at org.osgi.framework.Version.parseVersion(Version.java:233)
at
org.eclipse.osgi.internal.resolver.StateBuilder.createBundleDescription(StateBuilder.java:94)
... 25 more
Caused by: java.lang.NumberFormatException: For input string:
"0-BRANCH"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Integer.parseInt(Integer.java:499)
at org.osgi.framework.Version.parseInt(Version.java:168)
... 28 more

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

Back to the top