Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357448

Summary: maven signing plugin 1.0.3 gets confused with some version numbers
Product: [Technology] Dash Reporter: Hugues Malphettes <hmalphettes>
Component: MavenAssignee: Project Dash Incoming bugs <dash-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: blocker    
Priority: P3 CC: contact, jesse.mcconnell, thanh.ha
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Example of faulty artifacts.jar generated by the plugin in version 1.0.3
none
New artifacts.jar where it fails on org.eclipse.equinox.launcher.gtk.linux.x86_64 none

Description Hugues Malphettes CLA 2011-09-13 03:36:25 EDT
When the artifacts.xml is generated by the mavan dash plugin, some pack.gz artifacts are not correctly generated.

<artifact classifier="org.eclipse.update.feature" id="org.eclipse.equinox.server.core" version="1.1.1.R37x_v20110907-7K7TFBYDzbeA3ypK_98cDL15A4A">

Becomes in its pack.gz form:
    <artifact classifier="org.eclipse.update.feature" id="org.eclipse.equinox.server.core_1.1.1.R37x_v20110907-7K7TFBYDzbeA3ypK" version="98cDL15A4A">


I am guessing that the version number and ID are computed from looking for the last '_' and splitting the name there.
I am betting that looking for the first '_' would make us fail on a symbolic name that would have an '_'.
We need to look for the first '_' that is followed by a digit; even more involved would consist of parsing the MANIFEST.MF file when in doubt.

This affects the jetty-rt-products build.
It happens when we build against the latest 3.7.1 build of the eclipse platform.

Attached is an example of faulty artifacts.jar
as copied from the hudson workspace of https://hudson.eclipse.org/hudson/view/Jetty-RT/job/jetty-rt-products/556/console
Comment 1 Hugues Malphettes CLA 2011-09-13 03:37:02 EDT
Created attachment 203213 [details]
Example of faulty artifacts.jar generated by the plugin in version 1.0.3
Comment 2 Jesse McConnell CLA 2011-09-13 13:49:09 EDT
fixed and deployed 1.0.4-SNAPSHOT of the plugin

https://hudson.eclipse.org/hudson/view/Jetty-RT/job/jetty-rt-bundles/ws/jetty.bundles.repo/target/site/

ran build of bundles to check it out

#338 is the build that passed and I am going to try out importing the repo I am downloading now

hugues, if you can confirm that 1.0.4-SNAPSHOT fixes this I'll release another version of the plugin

cheers,
jesse
Comment 3 Jesse McConnell CLA 2011-09-13 13:56:27 EDT
Cannot complete the install because one or more required items could not be found.
  Software being installed: Jetty - Bundles: all the jetty bundles 7.5.2 (org.eclipse.jetty.bundles.f.feature.group 7.5.2)
  Missing requirement: Jetty :: NoSQL Session Managers 7.5.1.v20110908 (org.eclipse.jetty.nosql 7.5.1.v20110908) requires 'package com.mongodb 0.0.0' but it could not be found
  Cannot satisfy dependency:
    From: Jetty - Bundles: all the jetty bundles 7.5.2 (org.eclipse.jetty.bundles.f.feature.group 7.5.2)
    To: org.eclipse.jetty.nosql [7.5.1.v20110908]
Comment 4 Hugues Malphettes CLA 2011-09-13 18:51:20 EDT
(In reply to comment #3)
> Cannot complete the install because one or more required items could not be
> found.
>   Software being installed: Jetty - Bundles: all the jetty bundles 7.5.2
> (org.eclipse.jetty.bundles.f.feature.group 7.5.2)
>   Missing requirement: Jetty :: NoSQL Session Managers 7.5.1.v20110908
> (org.eclipse.jetty.nosql 7.5.1.v20110908) requires 'package com.mongodb 0.0.0'
> but it could not be found
>   Cannot satisfy dependency:
>     From: Jetty - Bundles: all the jetty bundles 7.5.2
> (org.eclipse.jetty.bundles.f.feature.group 7.5.2)
>     To: org.eclipse.jetty.nosql [7.5.1.v20110908]

Sounds like it is working.
Let me add mongodb to the jetty dependencies feature ad we should be good.
Comment 5 Jesse McConnell CLA 2011-09-13 19:56:03 EDT
1.0.4 has been released fixing this issue
Comment 6 Hugues Malphettes CLA 2011-09-14 02:04:45 EDT
I am having a lot of trouble to build with hudson on Fastlane and master.
Once I resolve myself to manually build from a shell on build.eclipse.org
I get this new error (hint more of the same):


!ENTRY org.eclipse.equinox.p2.artifact.repository 2 0 2011-09-14 00:48:42.133
!MESSAGE Error parsing simple artifact repository.
!SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2011-09-14 00:48:42.134
!MESSAGE Error at line 1203, column 12733: Illegal value for attribute "version" of element "artifact": 64_1.1.100.v20110505
!SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2011-09-14 00:48:42.134
!MESSAGE Error at line 1203, column 46830: Illegal value for attribute "version" of element "artifact": 64_1.1.100.v20110502
Installing org.eclipse.rt.webstarterkit 3.7.1.201109140029.
Installation failed.


It is a regression for the bundle org.eclipse.equinox.launcher.gtk.linux.x86_64
The file is named org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505.jar
and we need to figure out that the version is 1.1.100.v20110505
and the symbolic name is org.eclipse.equinox.launcher.gtk.linux.x86_64

We have the same issue for 
org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502.jar

In fact these are the last 2 files where it fails.
Comment 7 Hugues Malphettes CLA 2011-09-14 02:06:17 EDT
Created attachment 203314 [details]
New artifacts.jar where it fails on org.eclipse.equinox.launcher.gtk.linux.x86_64
Comment 8 Hugues Malphettes CLA 2011-09-14 02:22:07 EDT
Sorry Jesse, I did not foresee that other case.
I tested really quickly this regexp as an improvement to the initial regexp I suggested yesterday:
   Pattern p = Pattern.compile("_\\d*\\.");
And it works fine with:
org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505
org.eclipse.equinox.server.core_1.1.1.R37x_v20110907-7K7TFBYDzbeA3ypK_98cDL15A4A
org.eclipse.jetty.rewrite.source_7.5.1.v20110908

I'll try to deploy a snapshot version of the signing plugin with this fix and will test on the jetty build.
Comment 9 Hugues Malphettes CLA 2011-09-14 03:17:44 EDT
I confirm that the suggested change in comment#8 works:
I was able to build jetty-rt-products for 3.7.1 (on the shell from my account) using a patched version of the signing plugin where the regexp to extract the symbolic name and name from a jar file is: _\d*\.

I deployed 1.0.5-SNAPSHOT of the signing plugin on http://intalio.org/public/maven2 and built.
Comment 10 Benjamin Cabé CLA 2012-02-15 15:04:27 EST
Hi there,
Any chance that the 1.0.5 signing plugin could be deployed at maven.eclipse.org?
Thanks!
Comment 11 Benjamin Cabé CLA 2012-02-15 15:40:13 EST
Forget what I said, I just noticed it has been deployed a while ago... Testing it right now.
Comment 12 Jesse McConnell CLA 2012-02-15 15:56:06 EST
1.0.5 was released quite some time ago
Comment 13 Thanh Ha CLA 2014-04-29 09:50:52 EDT
maven.eclipse.org was decommissioned via bug 405750 and replaced with
repo.eclipse.org.

See: https://wiki.eclipse.org/Services/Nexus


The CBI project also provides a signing plugin in the form of the eclipse-jarsigner-plugin.

See: http://git.eclipse.org/c/cbi/org.eclipse.cbi.maven.plugins.git/about/