Bug 480093 - Maven command-line processing is broken
Summary: Maven command-line processing is broken
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: jakarta-commons-cli
Version: rawhide
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Deepak Bhole
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 453019 480428 F11FTBFS 487802
TreeView+ depends on / blocked
 
Reported: 2009-01-14 23:55 UTC by Jerry James
Modified: 2009-03-16 19:48 UTC (History)
11 users (show)

Fixed In Version: 1.1-2.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-28 19:47:01 UTC
Type: ---
Embargoed:


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

Description Jerry James 2009-01-14 23:55:47 UTC
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 20:42:02 UTC
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 15:38:34 UTC
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 09:39:09 UTC
(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 09:40:17 UTC
(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-05 04:33:08 UTC
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 06:22:38 UTC
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 07:00:47 UTC
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 07:02:17 UTC
By the way for srpm using snapshot tarball the versioning needs
fixing, however that is another issue.

Comment 9 Brennan Ashton 2009-02-07 02:00:51 UTC
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 11:50:59 UTC
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 11:52:16 UTC
Fixing component.

Comment 12 Deepak Bhole 2009-02-08 11:59:49 UTC
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 15:45:27 UTC
(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 18:46:21 UTC
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 22:50:22 UTC
Are there ay news on this?

Comment 16 Jesus M. Rodriguez 2009-02-17 01:42:12 UTC
I'll be working on this tomorrow.

Comment 17 Jerry James 2009-02-26 15:10:35 UTC
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 15:49:54 UTC
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 18:09:05 UTC
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 19:47:01 UTC
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 14:26:14 UTC
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 19:48:37 UTC
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.