You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ossi petz <os...@gmail.com> on 2009/01/21 11:26:49 UTC

release:perform fails to compile test classes

hallo

i encounter a very strange situation with the maven release plugin. we
have done quite some releases but for some reason a release:perform
fails to compile test classes depending on another module.

the setup looks like this:

pom.xml (parent pom)
 - module1
 - module2 (with test2.jar)
 - module3
 - module4 (with test4.jar depending on test2.jar and module 2)
 - module5

a "maven clean install" runs fine on both parent pom and module4 pom
level. also the mvn release:prepareruns well.

when release:perform is executed there are compile errors for the
test-classes in module4:

[INFO] Uploading: ./wagon38229.zip to
scp://host/data/mvn/repositories/core-modules/2008.1.25-rc-1/module3
[INFO]
[INFO] ##################################################################
[INFO] Transfer finished. 9780019 bytes copied in 2.61 seconds
[...]
[INFO] [INFO]
------------------------------------------------------------------------
[INFO] [INFO] Building module4
[INFO] [INFO]    task-segment: [deploy, site-deploy]
[INFO] [INFO]
------------------------------------------------------------------------
[INFO] [INFO] [edoras-banner-echo:echo {execution: default}]
[INFO] [INFO] [resources:resources]
[INFO] [INFO] Using encoding: 'UTF-8' to copy filtered resources.
[INFO] [INFO] [compiler:compile]
[INFO] [INFO] Compiling 14 source files to
/home/mvn5/releases/svn-trunk-core-modules/target/checkout/module5/target/classes
[INFO] [INFO] [resources:testResources]
[INFO] [INFO] Using encoding: 'UTF-8' to copy filtered resources.
[INFO] [INFO] [compiler:testCompile]
[INFO] [INFO] Compiling 2 source files to
/home/mvn5/releases/svn-trunk-core-modules/target/checkout/module5/target/test-classes
[INFO] [INFO]
------------------------------------------------------------------------
[INFO] [ERROR] BUILD FAILURE
[INFO] [INFO]
------------------------------------------------------------------------
[INFO] [INFO] Compilation failure
[INFO]
[INFO]
/home/mvn5/releases/svn-trunk-core-modules/target/checkout/module5/src/test/java/ch/module5/server/sync/ProfileSynchronizerTest.java:[16,36]
cannot find symbol
[INFO] symbol  : class ConfigurationException
[INFO] location: package ch.edoras.core.configuration
[INFO]
[...]


if i change the path to (the working copy of the created tag in the
release:prepare step)
/home/mvn5/releases/svn-trunk-core-modules/target/checkout/ or
/home/mvn5/releases/svn-trunk-core-modules/target/checkout/module5
and execute "mvn clean install" it runs just fine.

i have this problem out of nowhere in two projects. I tried different
release plugin versions already (the two latest ones) but that did not help.

Does anyone have an idea what is causing the release plugin to have a
different classpath for test executions compared to install?

Or any other thought may help!


Thanks a lot
ossi



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: release:perform fails to compile test classes

Posted by ossi petz <os...@gmail.com>.
hallo

i've been able to narrow the problem down to the compiler plugin.

it seems the compiler plugin executes:
mvn compiler:compile
mvn compiler:testCompile

if a manually execute 'mvn compiler:testCompile' i get the same compiler
errors. a 'mvn test-compile' does both goals and no compile errors occur.

is there a way to configure the compile plugin to behave correctly?
the release:prepare executes both compiler:compile and
compiler:testCompile but it seems as the first step is 'forgotten' when
it comes to the test classes.

any hints or ideas would be great!

regards

ossi


ossi petz schrieb:
> hallo
> 
> i encounter a very strange situation with the maven release plugin. we
> have done quite some releases but for some reason a release:perform
> fails to compile test classes depending on another module.
> 
> the setup looks like this:
> 
> pom.xml (parent pom)
>  - module1
>  - module2 (with test2.jar)
>  - module3
>  - module4 (with test4.jar depending on test2.jar and module 2)
>  - module5
> 
> a "maven clean install" runs fine on both parent pom and module4 pom
> level. also the mvn release:prepareruns well.
> 
> when release:perform is executed there are compile errors for the
> test-classes in module4:
> 
> [INFO] Uploading: ./wagon38229.zip to
> scp://host/data/mvn/repositories/core-modules/2008.1.25-rc-1/module3
> [INFO]
> [INFO] ##################################################################
> [INFO] Transfer finished. 9780019 bytes copied in 2.61 seconds
> [...]
> [INFO] [INFO]
> ------------------------------------------------------------------------
> [INFO] [INFO] Building module4
> [INFO] [INFO]    task-segment: [deploy, site-deploy]
> [INFO] [INFO]
> ------------------------------------------------------------------------
> [INFO] [INFO] [edoras-banner-echo:echo {execution: default}]
> [INFO] [INFO] [resources:resources]
> [INFO] [INFO] Using encoding: 'UTF-8' to copy filtered resources.
> [INFO] [INFO] [compiler:compile]
> [INFO] [INFO] Compiling 14 source files to
> /home/mvn5/releases/svn-trunk-core-modules/target/checkout/module5/target/classes
> [INFO] [INFO] [resources:testResources]
> [INFO] [INFO] Using encoding: 'UTF-8' to copy filtered resources.
> [INFO] [INFO] [compiler:testCompile]
> [INFO] [INFO] Compiling 2 source files to
> /home/mvn5/releases/svn-trunk-core-modules/target/checkout/module5/target/test-classes
> [INFO] [INFO]
> ------------------------------------------------------------------------
> [INFO] [ERROR] BUILD FAILURE
> [INFO] [INFO]
> ------------------------------------------------------------------------
> [INFO] [INFO] Compilation failure
> [INFO]
> [INFO]
> /home/mvn5/releases/svn-trunk-core-modules/target/checkout/module5/src/test/java/ch/module5/server/sync/ProfileSynchronizerTest.java:[16,36]
> cannot find symbol
> [INFO] symbol  : class ConfigurationException
> [INFO] location: package ch.edoras.core.configuration
> [INFO]
> [...]
> 
> 
> if i change the path to (the working copy of the created tag in the
> release:prepare step)
> /home/mvn5/releases/svn-trunk-core-modules/target/checkout/ or
> /home/mvn5/releases/svn-trunk-core-modules/target/checkout/module5
> and execute "mvn clean install" it runs just fine.
> 
> i have this problem out of nowhere in two projects. I tried different
> release plugin versions already (the two latest ones) but that did not help.
> 
> Does anyone have an idea what is causing the release plugin to have a
> different classpath for test executions compared to install?
> 
> Or any other thought may help!
> 
> 
> Thanks a lot
> ossi


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org