Bug 912333 - mvn-rpmbuild on F19 does not export M2_HOME
Summary: mvn-rpmbuild on F19 does not export M2_HOME
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: javapackages-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-18 12:40 UTC by Mattias Ellert
Modified: 2013-10-01 17:02 UTC (History)
5 users (show)

Fixed In Version: 0.12.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-18 14:23:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mattias Ellert 2013-02-18 12:40:48 UTC
Description of problem:

mvn-rpmbuild on Fedora 19 does not export M2_HOME

Version-Release number of selected component (if applicable):

javapackages-tools.noarch 0:0.12.0-1.fc19

How reproducible:

Packages in the f19 rebuild failed due to M2_HOME not set. See e.g.

https://koji.fedoraproject.org/koji/taskinfo?taskID=4996219

Error message is:

"Maven application directory was not specified, and ${maven.home} is not provided in the system properties. Please specify at least on of these."

The code generating this error message is:

if ( ( mavenHome == null ) && ( System.getProperty( "maven.home" ) == null ) )
{
    if ( !getSystemEnvVars().containsKey( "M2_HOME" ) )
    {
        throw new IllegalStateException( "Maven application directory was
            + "specified, and ${maven.home} is not provided in the system "
            + "properties. Please specify at least on of these." );
    }
}

I.e. if M2_HOME is set (like in mvn-rpmbuild for Fedora 18 and earlier) the exception is not thrown.
  
Actual results:

Failed builds due to M2_HOME not set

Expected results:

Working build

Additional info:

mvn-rpmbuild on Fedora 17 contains the line

export M2_HOME=/usr/share/maven

Comment 1 Mikolaj Izdebski 2013-02-18 12:54:44 UTC
Thank you for the report!

Fixed upstream:
http://git.fedorahosted.org/cgit/javapackages.git/commit/?id=4dcb9efd7510d1d61a7be08f82aed5896daa9de1

Build in Fedora is coming soon.

Comment 2 Mikolaj Izdebski 2013-02-18 13:53:13 UTC
Fixed in javapackages-tools-0.12.1-1


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