This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 480093 - Maven command-line processing is broken
Maven command-line processing is broken
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: jakarta-commons-cli (Show other bugs)
rawhide
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Deepak Bhole
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 453019 480428 F11FTBFS 487802
  Show dependency treegraph
 
Reported: 2009-01-14 18:55 EST by Jerry James
Modified: 2009-03-16 15:48 EDT (History)
11 users (show)

See Also:
Fixed In Version: 1.1-2.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-28 14:47:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
mock build log of javassist (190.29 KB, text/plain)
2009-02-06 02:00 EST, Mamoru TASAKA
no flags Details

  None (edit)
Description Jerry James 2009-01-14 18:55:47 EST
Description of problem:
When multiple -D options are given to maven, it interprets the second one as the name of the goal.  This breaks the mvn-jpp script, which supplies three -D options.

Put the following content into pom.xml in an empty directory:
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>test</groupId>
  <artifactId>test</artifactId>
  <name>Test</name>
  <version>1.0.0</version>
</project>

In Fedora 10, invoking "mvn -Dsome.property=foo -Dother.property=bar compile" simply evokes a message that there is nothing to compile.  In Rawhide, the same invocation produces this message:

[INFO] Invalid task 'other.property=bar': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal

This means that no maven-using projects can currently be built in Rawhide, as mvn-jpp always evokes a message of that form.

Version-Release number of selected component (if applicable):
maven2-2.0.4-10.15.fc10.x86_64

How reproducible:
Always

Steps to Reproduce:
1. See above
  
Actual results:
A failed build

Expected results:
A successful build

Additional info:
Comment 1 Deepak Bhole 2009-01-29 15:42:02 EST
I have tracked this down to the jakarta-commons-cli 1.0 -> 1.1 update in rawhide. Thanks for filing this. Looking into a fix now...
Comment 2 Jerry James 2009-02-02 10:38:34 EST
I didn't realize that jakarta-commons-cli-1.1 was heading for F-10, or I would have given it negative karma.  It landed today, and now maven is broken on F-10, too.  Having maven broken in Rawhide is one thing, but now I can't build my projects at work on my F-10 box.

Is there anything I can do to help find a solution to this problem?
Comment 3 Mamoru TASAKA 2009-02-04 04:39:09 EST
(In reply to comment #1)
> I have tracked this down to the jakarta-commons-cli 1.0 -> 1.1 update in
> rawhide. Thanks for filing this. Looking into a fix now...

I am not familiar with Java (watching this bug because a
package I reviewed are now affected by this), however
it seems that jakarta-commons-cli 1.1 seems "broken" [1]

Debian maven2 maintainer applied a patch for maven2 for this issue [2] , 
however it seems that the patch just created another problem [3]

It seems that for now reverting jakarta-commons-cli to 1.1
is the best solution

[1] http://issues.apache.org/jira/browse/CLI-137
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=458895
[3] http://jira.codehaus.org/browse/MNG-3356

CCing to jakarta-commons-cli maintainer.
Comment 4 Mamoru TASAKA 2009-02-04 04:40:17 EST
(In reply to comment #3)
> It seems that for now reverting jakarta-commons-cli to 1.1
> is the best solution

s|to 1.1|to 1.0|
Comment 5 Brennan Ashton 2009-02-04 23:33:08 EST
unfortunately, it was updated to 1.1 because some other packages are now requiring it.  Reverting really is not the solution.
Comment 6 Brennan Ashton 2009-02-05 01:22:38 EST
can someone who is having issue with this (I dont have anything that uses maven) try this http://koji.fedoraproject.org/koji/taskinfo?taskID=1106383 it uses the commons-cli-1.2-SNAPSHOT, which this is suppose to be fixed in.
Comment 7 Mamoru TASAKA 2009-02-06 02:00:47 EST
Created attachment 331094 [details]
mock build log of javassist

(In reply to comment #6)
> can someone who is having issue with this (I dont have anything that uses
> maven) try this http://koji.fedoraproject.org/koji/taskinfo?taskID=1106383 it
> uses the commons-cli-1.2-SNAPSHOT, which this is suppose to be fixed in.

I am not familiar with maven2, however at least javassist
(using maven2 to create .pom file) now builds successfully with mockbuild
(please see attached)
Comment 8 Mamoru TASAKA 2009-02-06 02:02:17 EST
By the way for srpm using snapshot tarball the versioning needs
fixing, however that is another issue.
Comment 9 Brennan Ashton 2009-02-06 21:00:51 EST
yes I know, I was just hacking something together to test that version, I will try and package it up nicely tonight.
Comment 10 Deepak Bhole 2009-02-08 06:50:59 EST
Correct, the patch mentioned in comment 3 does work. I tried it last week and it fixed the issue. I have been waiting for a reply from the patch author before applying it verbatim in Fedora, but haven't heard anything yet. Anyway, given Debian's license, I am sure it is okay to apply it into Fedora so we should just go ahead and do so.
Comment 11 Deepak Bhole 2009-02-08 06:52:16 EST
Fixing component.
Comment 12 Deepak Bhole 2009-02-08 06:59:49 EST
Just to be clear, the patch I tried, that works, is MultiOptions.patch from here:

http://svn.debian.org/wsvn/pkg-java/trunk/libcommons-cli-java/debian/patches/MultOptions.patch?op=file&rev=0&sc=0

After that patch was applied, I had to make a minor update to maven to make it use hasArgs(1) instead of hasArg()

Mamoru, did you check if both mvn and mvn-jpp work, or just one of the two? In my case, one worked, one didn't (until I update maven and rebuilt it ... I forget which one worked and which one didn't though)
Comment 13 Mamoru TASAKA 2009-02-08 10:45:27 EST
(In reply to comment #12)
> Mamoru, did you check if both mvn and mvn-jpp work, or just one of the two? In
> my case, one worked, one didn't (until I update maven and rebuilt it ... I
> forget which one worked and which one didn't though)

I just checked if javassist srpm can rebuild with commons-cli 1.2 svn
(srpm supplied by Brennan). It seems that javassist srpm uses
mvn-jpp.
Comment 14 Brennan Ashton 2009-02-08 13:46:21 EST
Just to clarify, we are just going to patch the 1.1 version, and not move to the 1.2 snapshot?  If so, I wont bother finishing that package (it has to be patched a little to work with fedoras java to pass self tests).
Comment 15 Fabian Deutsch 2009-02-16 17:50:22 EST
Are there ay news on this?
Comment 16 Jesus M. Rodriguez 2009-02-16 20:42:12 EST
I'll be working on this tomorrow.
Comment 17 Jerry James 2009-02-26 10:10:35 EST
So it's 10 days later, making the 24th day of maven not working in F-10.  All maven-using packages just failed the mass rebuild.  Some upgrades I need to get new packages into Fedora are blocked because of this bug.  How much longer do you expect it to take to get this bug fixed?  At what point will you revert jakarta-commons-cli until a fix can be identified?
Comment 18 Fabian Deutsch 2009-02-26 10:49:54 EST
Just to summarize:
This is an cmopat issue between cli 1.0 and 1.1.

As discussed in:
http://issues.apache.org/jira/browse/CLI-137?focusedCommentId=12632921#action_12632921

This compatibility to the 1.0 sematics is brought back to us in some 1.2-SNAPSHOT (as mentioned before).

So we might consider shiping 1.0 as an extra package and use it for all broken builds or use soem 1.2-SNAPSHOT.
Comment 19 Deepak Bhole 2009-02-27 13:09:05 EST
jakarta-commons-cli has been updated in both, F-10 and rawhide now, and it applies the MultiOption patch.

Rebuild of maven failed yesterday due to an issue with the new gcj in rawhide though. We (the Java team) need to look into that though. Assigning this issue back to myself.
Comment 20 Deepak Bhole 2009-02-28 14:47:01 EST
I had initially thought that a Maven rebuild was necessary with a small patch, to make it work with the patched cli. However, that does not appear to be the case any more. I just tried a build in rawhide with the existing maven and it worked (http://koji.fedoraproject.org/koji/taskinfo?taskID=1209347). 

So while maven rebuild itself is broken, there is nothing preventing other packages that utilize maven, from building. I am therefore closing this issue. We'll continue to try and get maven rebuilding asap.
Comment 21 Fedora Update System 2009-03-04 09:26:14 EST
jakarta-commons-cli-1.1-2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/jakarta-commons-cli-1.1-2.fc10
Comment 22 Fedora Update System 2009-03-16 15:48:37 EDT
jakarta-commons-cli-1.1-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.