Seems that entire surefire.forkNumber feature does not work on MVN 2.2.1
since for working directory expansion variables that are not yet defined
during initial plug-in execution are set to 'null' value. Later on both
baseDir and current working directory will be invalid, other parts of the
plug-in (e.g. argLine) are affected too. I would prefer to add note about
this limitation to JIRA / IT test description since it is something outside
of the plug-in itself plus affects deprecated maven version only. If so,
what is the preferred way to disable this IT test in maven-2.2.1 profile?

<workingDirectory>${project.name
}_${NotYetDefined}_${surefire.forkNumber}</workingDirectory>

/home/norbert/src/maven-surefire/surefire-integration-tests/target/Surefire1136CwdPropagationInForkedModeIT_testTestNgAndJUnitTogether/cwd_null_null

      at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.setWorkingDirectory(AbstractSurefireMojo.java:2654)
      at
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.setValueUsingSetter(ComponentValueSetter.java:177)
      at
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:212)
      at
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
      at
org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
      at
org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1357)
      at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:724)
      at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468)
      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      at
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Additional observation is that there are other test with fest library usage
(like i did originally) that cannot work on JDK 1.5:

[ERROR]
/home/norbert/src/maven-surefire/surefire-integration-tests/target/Surefire855AllowFailsafeUseArtifactFileIT_osgiBundleShouldUseFile/src/test/java/jiras/surefre855/bundle/FooIT.java:[32,-1]
cannot access org.fest.assertions.api.Assertions
bad class file:
/home/norbert/src/maven-surefire/surefire-integration-tests/../surefire-setup-integration-tests/target/it-repo/org/easytesting/fest-assert-core/2.0M9/fest-assert-core-2.0M9.jar(org/fest/assertions/api/Assertions.class)
class file has wrong version 50.0, should be 49.0

NW


On Wed, Jan 28, 2015 at 11:28 AM, Norbert Wnuk <norbertw...@gmail.com>
wrote:

> Yes, will do that shortly. I would like to aggregate fixes for unit and
> integration test in one pull request, the link was only to show the
> progress.
>
> NW
>
> On Wed, Jan 28, 2015 at 8:51 AM, Andreas Gudian <andreas.gud...@gmail.com>
> wrote:
>
>> Thanks, Norbert!
>>
>> Could you also create a new Pull-Request for it? Then I can fetch it more
>> easily :-)
>>
>>
>> Am Mittwoch, 28. Januar 2015 schrieb Norbert Wnuk :
>>
>> > Link after pushing amended commit -
>> >
>> >
>> https://github.com/norbertwnuk/maven-surefire/commit/d6a8af593fc03e12ecf2dc8047669472f7ca263b
>> >
>> > On Wed, Jan 28, 2015 at 3:10 AM, Norbert Wnuk <norbertw...@gmail.com
>> > <javascript:;>> wrote:
>> >
>> > > Hi Tibor / Andreas,
>> > > I found a time to address problem with unit test, will take a look at
>> > > integration test tomorrow.
>> > >
>> > >
>> >
>> https://github.com/norbertwnuk/maven-surefire/commit/44b6ffaddc93c34c3e76abd4ea5fd3b8d837a130
>> > >
>> > > NW
>> > >
>> > > On Sun, Jan 25, 2015 at 1:32 AM, Tibor Digana <tibordig...@apache.org
>> > <javascript:;>>
>> > > wrote:
>> > >
>> > >> Hi Norbert,
>> > >> I have updaated PR #82 with comment on GitHub.
>> > >> The Ubuntu builds fail.
>> > >> I would prefer keeping the test anyway.
>> > >> Try to find a solution for Ubuntu as well; otherwise use JUnit
>> > assumption
>> > >> statement
>> > >> assumeThat( os, anyOf( is( "Windows" ), is( "Ubuntu1" ) ) )
>> > >> in the particular IT method, possibly unit test.
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> View this message in context:
>> > >>
>> >
>> http://maven.40175.n5.nabble.com/Surefire-Plugin-does-not-handle-workingDirectory-in-fork-mode-properly-tp5824054p5824683.html
>> > >> Sent from the Maven Developers mailing list archive at Nabble.com.
>> > >>
>> > >> ---------------------------------------------------------------------
>> > >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>> <javascript:;>
>> > >> For additional commands, e-mail: dev-h...@maven.apache.org
>> > <javascript:;>
>> > >>
>> > >>
>> > >
>> >
>>
>
>

Reply via email to