Re: maven-release-plugin does not build cleanly - M2_HOME is missing

2015-03-25 Thread Mirko Friedenhagen
Hello there, I now have a workaround. I am setting:

 ${maven.home}

in  maven-release-manager/pom.xml and use this to set:
releaseEnvironment.setMavenHome( new File( System.getProperty(
"injectedMavenHome" ) ) );
in the testcase.

Works fine from the command line.

Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Wed, Mar 25, 2015 at 10:04 PM, Bernd Eckenfels
 wrote:
> Am Wed, 25 Mar 2015 21:01:53 +0100
> schrieb Mirko Friedenhagen :
>> - however this will not help with IDEs like Eclipse or Intellij which
>> use their own code to invoke stuff.
>
> I guess it is better when you pass it as a system property:
>
> -Dmaven.home="${M2_HOME}"
>
> that way you dont need to export it and the configuration is consistent
> (with the settings the IDEs typically set as well).
>
> Gruss
> Bernd
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-release-plugin does not build cleanly - M2_HOME is missing

2015-03-25 Thread Bernd Eckenfels
Am Wed, 25 Mar 2015 21:01:53 +0100
schrieb Mirko Friedenhagen :
> - however this will not help with IDEs like Eclipse or Intellij which
> use their own code to invoke stuff.

I guess it is better when you pass it as a system property:

-Dmaven.home="${M2_HOME}"

that way you dont need to export it and the configuration is consistent
(with the settings the IDEs typically set as well).

Gruss
Bernd

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-release-plugin does not build cleanly - M2_HOME is missing

2015-03-25 Thread Karl Heinz Marbaise

Hi Mirko,

On 3/25/15 9:31 PM, Mirko Friedenhagen wrote:

What I do not understand is, that
https://builds.apache.org/view/All/job/maven-release/261/consoleFull
is just running fine with Maven 3.0.5. Two wild guesses:
- it is because we do not use a Jenkins freestyle job but a beloved by
Stephen ;-) Maven job.


Yes the beloved Maven Job...is used...


- or maybe something changed with shellshock, where export of
environment variables did change.


Hm...it's a though worth...

Kind regards
Karl Heinz Marbaise



Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Wed, Mar 25, 2015 at 9:12 PM, Mirko Friedenhagen
 wrote:

Unfortunately, we may not use Assume in this testcase because it is
derived from PlexusTestcase and this one does fail on
AssumptionViolated as well. As a dirty workaround we could just return
when System.getenv("M2_HOME") is null.
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Wed, Mar 25, 2015 at 9:01 PM, Mirko Friedenhagen
 wrote:

Hello,

further inspection of the problem leads to a possible solution:
- the shell script does retrieve M2_HOME, however, as it is not
exported it is not available furtheron.
- so a quick fix would be to export M2_HOME directly before invoking
exec "$JAVACMD" ...
- however this will not help with IDEs like Eclipse or Intellij which
use their own code to invoke stuff.

Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Tue, Mar 24, 2015 at 11:17 PM, Mirko Friedenhagen
 wrote:

Hello Robert,

I see maven-shared-invoker was just released by you. I will take a look at
MSHARED-261, which at least has a suggestion for a fix.

Regards
Mirko
--
Sent from my mobile

On Mar 24, 2015 10:31 PM, "Robert Scholte"  wrote:


Hi Mirko,

This confirms why Karl Heinz had issues with the Maven Invoker 2.2 (take
1)
On Windows there's no issue, the mvn.bat/mvn.cmd always sets M2_HOME if
it's not there.

We could add an AssumeThat-clause in this test as well...

thanks,
Robert


Op Tue, 24 Mar 2015 22:16:59 +0100 schreef Mirko Friedenhagen
:


Hello,

I just checked out the trunk (r1643023) and running "mvn clean verify"
does not succeed neither with Maven 3.0.5, Maven 3.2.5 nor with Maven
3.3.1 (OS X 10.10.2, JDK 1.7.0_76):

The test
org.apache.maven.shared.release.exec.InvokerMavenExecutorTest#testEncryptSettings
is always failing with the following message from

/maven-invoker-2.1-sources.jar!/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java:124

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

When I set the M2_HOME variable on the command line manually, the tests
succeed.

Regards
Mirko


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-release-plugin does not build cleanly - M2_HOME is missing

2015-03-25 Thread Mirko Friedenhagen
What I do not understand is, that
https://builds.apache.org/view/All/job/maven-release/261/consoleFull
is just running fine with Maven 3.0.5. Two wild guesses:
- it is because we do not use a Jenkins freestyle job but a beloved by
Stephen ;-) Maven job.
- or maybe something changed with shellshock, where export of
environment variables did change.
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Wed, Mar 25, 2015 at 9:12 PM, Mirko Friedenhagen
 wrote:
> Unfortunately, we may not use Assume in this testcase because it is
> derived from PlexusTestcase and this one does fail on
> AssumptionViolated as well. As a dirty workaround we could just return
> when System.getenv("M2_HOME") is null.
> Regards Mirko
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
> https://bitbucket.org/mfriedenhagen/
>
>
> On Wed, Mar 25, 2015 at 9:01 PM, Mirko Friedenhagen
>  wrote:
>> Hello,
>>
>> further inspection of the problem leads to a possible solution:
>> - the shell script does retrieve M2_HOME, however, as it is not
>> exported it is not available furtheron.
>> - so a quick fix would be to export M2_HOME directly before invoking
>> exec "$JAVACMD" ...
>> - however this will not help with IDEs like Eclipse or Intellij which
>> use their own code to invoke stuff.
>>
>> Regards Mirko
>> --
>> http://illegalstateexception.blogspot.com/
>> https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
>> https://bitbucket.org/mfriedenhagen/
>>
>>
>> On Tue, Mar 24, 2015 at 11:17 PM, Mirko Friedenhagen
>>  wrote:
>>> Hello Robert,
>>>
>>> I see maven-shared-invoker was just released by you. I will take a look at
>>> MSHARED-261, which at least has a suggestion for a fix.
>>>
>>> Regards
>>> Mirko
>>> --
>>> Sent from my mobile
>>>
>>> On Mar 24, 2015 10:31 PM, "Robert Scholte"  wrote:

 Hi Mirko,

 This confirms why Karl Heinz had issues with the Maven Invoker 2.2 (take
 1)
 On Windows there's no issue, the mvn.bat/mvn.cmd always sets M2_HOME if
 it's not there.

 We could add an AssumeThat-clause in this test as well...

 thanks,
 Robert


 Op Tue, 24 Mar 2015 22:16:59 +0100 schreef Mirko Friedenhagen
 :

> Hello,
>
> I just checked out the trunk (r1643023) and running "mvn clean verify"
> does not succeed neither with Maven 3.0.5, Maven 3.2.5 nor with Maven
> 3.3.1 (OS X 10.10.2, JDK 1.7.0_76):
>
> The test
> org.apache.maven.shared.release.exec.InvokerMavenExecutorTest#testEncryptSettings
> is always failing with the following message from
>
> /maven-invoker-2.1-sources.jar!/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java:124
>
> java.lang.IllegalStateException: Maven application directory was not
> specified, and ${maven.home} is not provided in the system properties.
> Please specify at least on of these.
>
> When I set the M2_HOME variable on the command line manually, the tests
> succeed.
>
> Regards
> Mirko
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org


 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org

>>>

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-release-plugin does not build cleanly - M2_HOME is missing

2015-03-25 Thread Mirko Friedenhagen
Unfortunately, we may not use Assume in this testcase because it is
derived from PlexusTestcase and this one does fail on
AssumptionViolated as well. As a dirty workaround we could just return
when System.getenv("M2_HOME") is null.
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Wed, Mar 25, 2015 at 9:01 PM, Mirko Friedenhagen
 wrote:
> Hello,
>
> further inspection of the problem leads to a possible solution:
> - the shell script does retrieve M2_HOME, however, as it is not
> exported it is not available furtheron.
> - so a quick fix would be to export M2_HOME directly before invoking
> exec "$JAVACMD" ...
> - however this will not help with IDEs like Eclipse or Intellij which
> use their own code to invoke stuff.
>
> Regards Mirko
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
> https://bitbucket.org/mfriedenhagen/
>
>
> On Tue, Mar 24, 2015 at 11:17 PM, Mirko Friedenhagen
>  wrote:
>> Hello Robert,
>>
>> I see maven-shared-invoker was just released by you. I will take a look at
>> MSHARED-261, which at least has a suggestion for a fix.
>>
>> Regards
>> Mirko
>> --
>> Sent from my mobile
>>
>> On Mar 24, 2015 10:31 PM, "Robert Scholte"  wrote:
>>>
>>> Hi Mirko,
>>>
>>> This confirms why Karl Heinz had issues with the Maven Invoker 2.2 (take
>>> 1)
>>> On Windows there's no issue, the mvn.bat/mvn.cmd always sets M2_HOME if
>>> it's not there.
>>>
>>> We could add an AssumeThat-clause in this test as well...
>>>
>>> thanks,
>>> Robert
>>>
>>>
>>> Op Tue, 24 Mar 2015 22:16:59 +0100 schreef Mirko Friedenhagen
>>> :
>>>
 Hello,

 I just checked out the trunk (r1643023) and running "mvn clean verify"
 does not succeed neither with Maven 3.0.5, Maven 3.2.5 nor with Maven
 3.3.1 (OS X 10.10.2, JDK 1.7.0_76):

 The test
 org.apache.maven.shared.release.exec.InvokerMavenExecutorTest#testEncryptSettings
 is always failing with the following message from

 /maven-invoker-2.1-sources.jar!/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java:124

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

 When I set the M2_HOME variable on the command line manually, the tests
 succeed.

 Regards
 Mirko

 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: dev-h...@maven.apache.org
>>>
>>

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-release-plugin does not build cleanly - M2_HOME is missing

2015-03-25 Thread Mirko Friedenhagen
Hello,

further inspection of the problem leads to a possible solution:
- the shell script does retrieve M2_HOME, however, as it is not
exported it is not available furtheron.
- so a quick fix would be to export M2_HOME directly before invoking
exec "$JAVACMD" ...
- however this will not help with IDEs like Eclipse or Intellij which
use their own code to invoke stuff.

Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Tue, Mar 24, 2015 at 11:17 PM, Mirko Friedenhagen
 wrote:
> Hello Robert,
>
> I see maven-shared-invoker was just released by you. I will take a look at
> MSHARED-261, which at least has a suggestion for a fix.
>
> Regards
> Mirko
> --
> Sent from my mobile
>
> On Mar 24, 2015 10:31 PM, "Robert Scholte"  wrote:
>>
>> Hi Mirko,
>>
>> This confirms why Karl Heinz had issues with the Maven Invoker 2.2 (take
>> 1)
>> On Windows there's no issue, the mvn.bat/mvn.cmd always sets M2_HOME if
>> it's not there.
>>
>> We could add an AssumeThat-clause in this test as well...
>>
>> thanks,
>> Robert
>>
>>
>> Op Tue, 24 Mar 2015 22:16:59 +0100 schreef Mirko Friedenhagen
>> :
>>
>>> Hello,
>>>
>>> I just checked out the trunk (r1643023) and running "mvn clean verify"
>>> does not succeed neither with Maven 3.0.5, Maven 3.2.5 nor with Maven
>>> 3.3.1 (OS X 10.10.2, JDK 1.7.0_76):
>>>
>>> The test
>>> org.apache.maven.shared.release.exec.InvokerMavenExecutorTest#testEncryptSettings
>>> is always failing with the following message from
>>>
>>> /maven-invoker-2.1-sources.jar!/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java:124
>>>
>>> java.lang.IllegalStateException: Maven application directory was not
>>> specified, and ${maven.home} is not provided in the system properties.
>>> Please specify at least on of these.
>>>
>>> When I set the M2_HOME variable on the command line manually, the tests
>>> succeed.
>>>
>>> Regards
>>> Mirko
>>>
>>> -
>>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: dev-h...@maven.apache.org
>>
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> For additional commands, e-mail: dev-h...@maven.apache.org
>>
>

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: maven-release-plugin does not build cleanly - M2_HOME is missing

2015-03-24 Thread Mirko Friedenhagen
Hello Robert,

I see maven-shared-invoker was just released by you. I will take a look at
MSHARED-261, which at least has a suggestion for a fix.

Regards
Mirko
-- 
Sent from my mobile
On Mar 24, 2015 10:31 PM, "Robert Scholte"  wrote:

> Hi Mirko,
>
> This confirms why Karl Heinz had issues with the Maven Invoker 2.2 (take 1)
> On Windows there's no issue, the mvn.bat/mvn.cmd always sets M2_HOME if
> it's not there.
>
> We could add an AssumeThat-clause in this test as well...
>
> thanks,
> Robert
>
>
> Op Tue, 24 Mar 2015 22:16:59 +0100 schreef Mirko Friedenhagen <
> mfriedenha...@apache.org>:
>
>  Hello,
>>
>> I just checked out the trunk (r1643023) and running "mvn clean verify"
>> does not succeed neither with Maven 3.0.5, Maven 3.2.5 nor with Maven
>> 3.3.1 (OS X 10.10.2, JDK 1.7.0_76):
>>
>> The test org.apache.maven.shared.release.exec.InvokerMavenExecutorTest#
>> testEncryptSettings
>> is always failing with the following message from
>> /maven-invoker-2.1-sources.jar!/org/apache/maven/shared/invoker/
>> MavenCommandLineBuilder.java:124
>>
>> java.lang.IllegalStateException: Maven application directory was not
>> specified, and ${maven.home} is not provided in the system properties.
>> Please specify at least on of these.
>>
>> When I set the M2_HOME variable on the command line manually, the tests
>> succeed.
>>
>> Regards
>> Mirko
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> For additional commands, e-mail: dev-h...@maven.apache.org
>>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


Re: maven-release-plugin does not build cleanly - M2_HOME is missing

2015-03-24 Thread Robert Scholte

Hi Mirko,

This confirms why Karl Heinz had issues with the Maven Invoker 2.2 (take 1)
On Windows there's no issue, the mvn.bat/mvn.cmd always sets M2_HOME if  
it's not there.


We could add an AssumeThat-clause in this test as well...

thanks,
Robert


Op Tue, 24 Mar 2015 22:16:59 +0100 schreef Mirko Friedenhagen  
:



Hello,

I just checked out the trunk (r1643023) and running "mvn clean verify"
does not succeed neither with Maven 3.0.5, Maven 3.2.5 nor with Maven
3.3.1 (OS X 10.10.2, JDK 1.7.0_76):

The test  
org.apache.maven.shared.release.exec.InvokerMavenExecutorTest#testEncryptSettings

is always failing with the following message from
/maven-invoker-2.1-sources.jar!/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java:124

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

When I set the M2_HOME variable on the command line manually, the tests  
succeed.


Regards
Mirko

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org