Have you tried -
        -Dtest=false -DfailIfNoTests=false -Dmaven.test.execute=false

The above should still build the tests, but not run them (unless one of
the plugins you are using doesn't honor skipping the test phase...)


-Donald


On 4/9/10 5:53 AM, Jeremy Hughes wrote:
> Hi Donald, I had been trying -DskipTests=true and -Dmaven.test.skip=true. I
> didn't realise there was a difference until I read this:
> 
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/skipping-test.html
> 
> but unfortunately neither worked. I'll try adding that argument to the pom
> ... do you know if that is additive over the argument element supplied by
> the apache-release profile in the apache 7 pom:
> 
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-release-plugin</artifactId>
>           <version>2.0-beta-9</version>
>           <configuration>
>             <useReleaseProfile>false</useReleaseProfile>
>             <goals>deploy</goals>
>             <arguments>-Papache-release</arguments>
>           </configuration>
>         </plugin>
> 
> or should I duplicate the arguments specified there with the
> -DskipTests=true argument in the itest pom? I'm off to try a few things and
> what Lin suggested. Thanks to you both.
> 
> Thanks,
> Jeremy
> 
> On 9 April 2010 03:16, Donald Woods <[email protected]> wrote:
> 
>> Two things to try:
>> 1) On the mvn release:prepare step, add the following to your cmdline -
>>        -DskipTests=true
>> 2) In the parent pom.ml, try adding the below to the
>> maven-release-plugin configuration (add to any <arguments> you may
>> already have) -
>>        <arguments>-DskipTests=true</arguments>
>>
>> We use both of the above during our OpenJPA releases, as we ran into a
>> known bug with how tests.jar files are handled.
>>
>>
>> -Donald
>>
>>
>> On 4/8/10 10:01 PM, Jeremy Hughes wrote:
>>> I've hit a road block with the blueprint module. While executing mvn
>>> release:prepare when the blueprint-itests module is reached and executed
>> I
>>> get an exception:
>>>
>>> [INFO] [INFO] There are test failures.
>>> [INFO]
>>> [INFO] Please refer to
>>>
>> C:\cygwin\home\hughesj\oss\aries\trunk-again\blueprint\blueprint-itests\target\surefire-reports
>>> for the individual test results
>>>
>>> This happens before the surefire-reports directory is even created. Even
>>> running with -Dmaven.test.skip=true surefire still runs. I tried changing
>>> the configuration of surefire in the pom so that it doesn't fork a
>> process
>>> for each test. The only way I could get it to succeed is by commenting
>> out
>>> the <module>blueprint-itests</module> line in the blueprint/pom.xml ...
>> is
>>> this acceptable though for a release? I would have to check in that
>> change
>>> in order to release like that. Right now it's my only option.
>>>
>>> The exact error (using the -X flag for full verbosity) is below:
>>>
>>> [INFO] [INFO] Surefire report directory:
>>>
>> C:\cygwin\home\hughesj\oss\aries\trunk-again\blueprint\blueprint-itests\target\surefire-reports
>>> [INFO] Forking command line: cmd.exe /X /C "C:\inst\j2se160\jre\bin\java
>>> -Dorg.ops4j.pax.url.mvn.localRepository=C:\Documents and
>>> Settings\Administrat
>>> or\.m2\repository -jar
>>> C:\cygwin\tmp\mytmp\surefirebooter7571094216390397671.jar
>>> C:\cygwin\tmp\mytmp\surefire3450019939594901752tmp C:\cygwin\tmp\mytm
>>> p\surefire7725688157744438252tmp"
>>> [INFO] [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] [ERROR] BUILD FAILURE
>>> [INFO] [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] [INFO] There are test failures.
>>> [INFO]
>>> [INFO] Please refer to
>>>
>> C:\cygwin\home\hughesj\oss\aries\trunk-again\blueprint\blueprint-itests\target\surefire-reports
>>> for the individual test results
>>> .
>>> [INFO] [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] [DEBUG] Trace
>>> [INFO] org.apache.maven.BuildFailureException: There are test failures.
>>> [INFO]
>>> [INFO] Please refer to
>>>
>> C:\cygwin\home\hughesj\oss\aries\trunk-again\blueprint\blueprint-itests\target\surefire-reports
>>> for the individual test results
>>> .
>>> [INFO]  at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
>>> [INFO]  at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>>> [INFO]  at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>>> [INFO]  at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>>> [INFO]  at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>>> [INFO]  at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>>> [INFO]  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>>> [INFO]  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>>> [INFO]  at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>>> [INFO]  at
>>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>>> [INFO]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> [INFO]  at
>>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
>>> [INFO]  at
>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>>> [INFO]  at java.lang.reflect.Method.invoke(Method.java:600)
>>> [INFO]  at
>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>> [INFO]  at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>> [INFO]  at
>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>> [INFO]  at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>>> [INFO] Caused by: org.apache.maven.plugin.MojoFailureException: There are
>>> test failures.
>>> [INFO]
>>> [INFO] Please refer to
>>>
>> C:\cygwin\home\hughesj\oss\aries\trunk-again\blueprint\blueprint-itests\target\surefire-reports
>>> for the individual test results
>>> .
>>> [INFO]  at
>>>
>> org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:575)
>>> [INFO]  at
>>>
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>>> [INFO]  at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>>> [INFO]  ... 17 more
>>> [INFO] [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] [INFO] Total time: 1 minute 24 seconds
>>> [INFO] [INFO] Finished at: Fri Apr 09 02:55:28 BST 2010
>>> [INFO] [INFO] Final Memory: 99M/156M
>>> [INFO] [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Maven execution failed, exit code: '1'
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [DEBUG] Trace
>>> org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution
>>> failed, exit code: '1'
>>>        at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
>>>        at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
>>>        at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
>>>        at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>>>        at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
>>>        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(Native Method)
>>>        at
>>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
>>>        at
>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>>>        at java.lang.reflect.Method.invoke(Method.java:600)
>>>        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)
>>> Caused by: org.apache.maven.plugin.MojoExecutionException: Maven
>> execution
>>> failed, exit code: '1'
>>>        at
>>>
>> org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:186)
>>>        at
>>>
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>>>        at
>>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>>>        ... 17 more
>>> Caused by: org.apache.maven.shared.release.ReleaseExecutionException:
>> Maven
>>> execution failed, exit code: '1'
>>>        at
>>>
>> org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:89)
>>>        at
>>>
>> org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.execute(RunPrepareGoalsPhase.java:42)
>>>        at
>>>
>> org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.simulate(RunPrepareGoalsPhase.java:54)
>>>        at
>>>
>> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:192)
>>>        at
>>>
>> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:133)
>>>        at
>>>
>> org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:96)
>>>        at
>>>
>> org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:182)
>>>        ... 19 more
>>> Caused by: org.apache.maven.shared.release.exec.MavenExecutorException:
>>> Maven execution failed, exit code: '1'
>>>        at
>>>
>> org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:395)
>>>        at
>>>
>> org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:413)
>>>        at
>>>
>> org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:81)
>>>        ... 25 more
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 1 minute 37 seconds
>>> [INFO] Finished at: Fri Apr 09 02:55:29 BST 2010
>>> [INFO] Final Memory: 25M/94M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>>
>>> On 9 April 2010 01:44, Jeremy Hughes <[email protected]> wrote:
>>>> I've started to upload the release candidate artifacts to the staging
>>>> repo, this may take some time. I'd appreciate a lull in commits to the
>>>> modules below until I've sent out the vote email and preferably the
>>>> vote has closed. If this is a problem we should discuss.
>>>>
>>>> Thanks,
>>>> Jeremy
>>>>
>>>> On 8 April 2010 21:54, Jeremy Hughes <[email protected]> wrote:
>>>>> Just lately I've been carrying out a final push to get release
>>>>> candidates for the Aries top level modules onto the staging repo. If
>>>>> the maven release plugin is kind to me I hope to get that out in
>>>>> what's left of today or early tomorrow. The modules with RCs will be:
>>>>>
>>>>> parent
>>>>> eba-maven-plugin
>>>>> testsupport
>>>>> util
>>>>> blueprint
>>>>> jndi
>>>>> transaction
>>>>> web
>>>>> application
>>>>> jmx
>>>>> jpa
>>>>> samples (I'll be moving the transaction sample out into a
>>>>> samples-sandbox top level module as I don't think this works right
>>>>> now)
>>>>>
>>>>> Cheers,
>>>>> Jeremy
>>>>>
>>>>
>>>
>>
> 

Reply via email to