You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Sundling, Paul" <Pa...@smss.sony.com> on 2009/01/10 04:29:34 UTC

aggregates (javadoc) break release

After spending 2 whole workdays on it (this time), it's clearly time for
help.  
 
Let's rewind to the core problem.  I want to run javadoc and jxr reports
with aggregates/non-aggregates and still be able to do release builds.
 
Back in 2007 I opened a bug and even provided a zip file so it could be
reproduced:
 
http://jira.codehaus.org/browse/MNG-3336
 
Fast forward to the present and with Maven 2.0.9 and all the latest
plugin versions.  So the site is generated and all works great until we
try to do an official release build for QA.  If we didn't use release
builds and versioning, which is at the core of Maven, all would be fine.

 
So my next approach was to take the reporting stuff out into a separate
pom that inherits from the main pom and use 
 
  mvn -f reporting.xml install site:site site:deploy
 
This mostly worked, but would always run into some strange error even on
pretty much identical configuration.  It's like there a bunch of
assumptions that fail when using the -f approach.  
 
I generated a pom using help:effective-pom to remove the complication of
inheriting a pom and still I got strange errors. 
  mvn -f reporting.xml help:effective-pom > orphan.xml    [and removing
the parent definition]
 
I had errors from PMD "Failure executing PMD ... Can't use enum as a
keyword in pre-JDK 1.5 target" which was really weird because I had
removed PMD completely from the pom I was using and using effective-pom
I verified that it had been removed.  It's like one of those horror
movies where the tv still comes on after it's unplugged.  I guess maybe
because the child projects inherit from the real parent pom, maybe
that's how PMD finds it way back into the mix.  
 
I've seen messages like "[INFO] Unable to load parent project from a
relative path: Could not find the model file", which is probably a
flashing red symptom of different behavior when using mvn -f!
 
Layout:
/pom.xml
/reporting.xml
/child/pom.xml
/child2/pom.xml
 
So clearly -f is not going to work.  The only idea I have left is that I
haven't tried using the new syntax for config with 2.5 javadoc plugin,
i.e
 
http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.
html
 
using "aggregate goal" instead of "aggregate parameter".  Any other
ideas?  It's kind of a big deal risking breaking release builds and it
may be a month before I can try again if it's not already too late.
 
Paul Sundling
 
 

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


RE: aggregates (javadoc) break release

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Maven won't be changing the permissions of your files or causing
permission problems. This is more likely an scm issue here. What scm do
you use?

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Tuesday, January 13, 2009 6:10 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release

One piece of the puzzle is that I have to run install before the
release:prepare.  Also tests can't be skipped with release plugin, so
I've removed the flag.  So here are the updated command lines:

  mvn -B -Dresume=false install release:prepare
  mvn -B release:perform

It seemed like if I don't do a release:cleanup after release:perform,
then I got "Access is denied" error if I try to do a second cycle of
creating another release immediately afterward.  In the end it was
non-deterministic that I would have the permission problems.  With the
way windows works, locking files used by a program, instead of using
copy on write (like Linux, UNIX, OSX) causes these sorts of problems.
The working directory could be some arbitrary place you happened to have
clicked on windows explorer.  After moving to Linux "Access is denied"
wasn't an issue the rest of the day.

Then the next day I updated the pom with the the next thing to try.  Now
I get permission denied errors no matter what, even after reverting to
the version that worked yesterday and advancing the version number.
Seriously, another day or two of this and I'll end up going from a
proponent of maven who has done presntations on Maven to hating maven.
All this to get javadocs working and still be able to release software.
It shouldn't be this hard.  I don't even know which way is up at this
point.  I even tried making the file writable which it shouldn't need to
be (checkout out the file would make it writable, which the release
plugin did just fine yesterday).  I even tried relogging into source
control (perforce).  I also tried removing my repository.  Tried, mvn
clean, mvn release:clean, praying, deleting all files and get from
source control, ...

[psundling@hh-dsp-tc01 minimal]$ mvn -B -e -Dresume=false install
release:prepare
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   TEST OF RELEASE
[INFO]   myjar
[INFO]   mywebapp Maven Webapp
[INFO] Searching repository for plugin with prefix: 'release'.
[INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/pom.xml to
/home/psundling/.m2/repository/playground/minimal/parent/1.0.51-SNAPSHOT
/parent-1.0.51-SNAPSHOT.pom
[INFO]
------------------------------------------------------------------------
[INFO] Building myjar
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/main/resources
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/test/resources
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/test-classe
s
[INFO] [surefire:test]
[INFO] Surefire report directory:
/home/psundling/ddi/branches/playground/minimal/myjar/target/surefire-re
ports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running release.minimal.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088
sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar]
[INFO] Building jar:
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar to
/home/psundling/.m2/repository/playground/minimal/myjar/1.0.51-SNAPSHOT/
myjar-1.0.51-SNAPSHOT.jar
[INFO]
------------------------------------------------------------------------
[INFO] Building mywebapp Maven Webapp
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/main/resour
ces
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/test/resour
ces
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[mywebapp] in
[/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebap
p]
[INFO] Processing war project
[INFO] Webapp assembled in[119 msecs]
[INFO] Building war:
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war to
/home/psundling/.m2/repository/playground/minimal/mywebapp/1.0.51-SNAPSH
OT/mywebapp-1.0.51-SNAPSHOT.war
[INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [release:prepare] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [release:prepare]
[INFO] Verifying that there are no local modifications...
[INFO] Checking dependencies and plugins for snapshots ...
[INFO] Transforming 'TEST OF RELEASE'...
[INFO] Updating myjar to 1.0.51
[INFO] Ignoring artifact version update for expression:
${project.version}
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:583)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:512)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:227)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:140)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:558)
        ... 16 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException:
Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:692)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:638)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
Project(AbstractRewritePomsPhase.java:201)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
(AbstractRewritePomsPhase.java:117)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.execute(A
bstractRewritePomsPhase.java:100)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:194)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:131)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:94)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:136)
        ... 18 more
Caused by: java.io.FileNotFoundException:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:673)
        ... 26 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Wed Jan 14 01:36:11 GMT 2009
[INFO] Final Memory: 27M/216M
[INFO]
------------------------------------------------------------------------




-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Friday, January 09, 2009 7:40 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


Hi Paul,
Have you tried with javadoc 2.4? I raised this on the dev list last
week, that I think the way 2.4 works is the most correct and consider
the change to 2.5 a regression.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Friday, January 09, 2009 10:30 PM
To: dev@maven.apache.org
Subject: aggregates (javadoc) break release

After spending 2 whole workdays on it (this time), it's clearly time for
help.  
 
Let's rewind to the core problem.  I want to run javadoc and jxr reports
with aggregates/non-aggregates and still be able to do release builds.
 
Back in 2007 I opened a bug and even provided a zip file so it could be
reproduced:
 
http://jira.codehaus.org/browse/MNG-3336
 
Fast forward to the present and with Maven 2.0.9 and all the latest
plugin versions.  So the site is generated and all works great until we
try to do an official release build for QA.  If we didn't use release
builds and versioning, which is at the core of Maven, all would be fine.

 
So my next approach was to take the reporting stuff out into a separate
pom that inherits from the main pom and use 
 
  mvn -f reporting.xml install site:site site:deploy
 
This mostly worked, but would always run into some strange error even on
pretty much identical configuration.  It's like there a bunch of
assumptions that fail when using the -f approach.  
 
I generated a pom using help:effective-pom to remove the complication of
inheriting a pom and still I got strange errors. 
  mvn -f reporting.xml help:effective-pom > orphan.xml    [and removing
the parent definition]
 
I had errors from PMD "Failure executing PMD ... Can't use enum as a
keyword in pre-JDK 1.5 target" which was really weird because I had
removed PMD completely from the pom I was using and using effective-pom
I verified that it had been removed.  It's like one of those horror
movies where the tv still comes on after it's unplugged.  I guess maybe
because the child projects inherit from the real parent pom, maybe
that's how PMD finds it way back into the mix.  
 
I've seen messages like "[INFO] Unable to load parent project from a
relative path: Could not find the model file", which is probably a
flashing red symptom of different behavior when using mvn -f!
 
Layout:
/pom.xml
/reporting.xml
/child/pom.xml
/child2/pom.xml
 
So clearly -f is not going to work.  The only idea I have left is that I
haven't tried using the new syntax for config with 2.5 javadoc plugin,
i.e
 
http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.
html
 
using "aggregate goal" instead of "aggregate parameter".  Any other
ideas?  It's kind of a big deal risking breaking release builds and it
may be a month before I can try again if it's not already too late.
 
Paul Sundling
 
 

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


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



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


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


RE: aggregates (javadoc) break release

Posted by "Sundling, Paul" <Pa...@smss.sony.com>.
I've uploaded a version with javadoc aggregates that worked for me at
http://jira.codehaus.org/browse/MNG-3336 . It's not really fixed, but I
guess I have what I need.  

I also created a new issue for the PMD issue as they requested with a
test case:  http://jira.codehaus.org/browse/MPMD-92  and crosslinked it
back to the original bug on a previous version
(http://jira.codehaus.org/browse/MPMD-67) with links in the comments,
since I don't think I have access to do anything further than that.

Paul Sundling

-----Original Message-----
From: Sundling, Paul 
Sent: Wednesday, January 14, 2009 2:09 PM
To: 'Maven Developers List'
Subject: RE: aggregates (javadoc) break release


Yep, here's the full rundown of the fun I've had in search of aggregate
javadocs:

The javadoc bug that requires an install before release (116).

PMD 2.4 bug where it complains about annotation if you don't set
targetJdk to 1.5 (1.6 or anything else blows up during site, but works
for pmd:pmd!).

Windows locking/perm issues that drove me to use Linux.

Perforce/SCM plugin issues (must have been transitively upgraded or
something): now instead of whatever mechanism, perforce expects P4PASSWD
to be your clear text password.  So probably perforce issue mostly, just
a weird coincidence.

In the end I found some combination that works, I'll upload a working
example to my bug and try to reproduce the PMD bug.  116 bug still
exists.  I did end up using javadoc 2.4 in the working version.

Paul Sundling

-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Tuesday, January 13, 2009 9:06 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


Ah, I was going to say this sounds like perforce with the read only
flags etc. Regarding javadoc, set it to 2.4 and it should hopefully fix
the problem (if it's the one I'm thinking of)....but perforce is going
to be more entertaining imo.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Tuesday, January 13, 2009 6:28 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release

Well I found this one is something to do with the perforce plugin.  I'll
investigate further, but I at least have a lead.  Ugh, all I want for
Christmas is aggregated javadocs without breaking release builds.  

Also this seems to be a related to
http://jira.codehaus.org/browse/MJAVADOC-111 and
http://jira.codehaus.org/browse/MJAVADOC-116 and probably others.  As
per 116, thus the need to do an install or deploy.

Paul Sundling

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Tuesday, January 13, 2009 6:10 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


One piece of the puzzle is that I have to run install before the
release:prepare.  Also tests can't be skipped with release plugin, so
I've removed the flag.  So here are the updated command lines:

  mvn -B -Dresume=false install release:prepare
  mvn -B release:perform

It seemed like if I don't do a release:cleanup after release:perform,
then I got "Access is denied" error if I try to do a second cycle of
creating another release immediately afterward.  In the end it was
non-deterministic that I would have the permission problems.  With the
way windows works, locking files used by a program, instead of using
copy on write (like Linux, UNIX, OSX) causes these sorts of problems.
The working directory could be some arbitrary place you happened to have
clicked on windows explorer.  After moving to Linux "Access is denied"
wasn't an issue the rest of the day.

Then the next day I updated the pom with the the next thing to try.  Now
I get permission denied errors no matter what, even after reverting to
the version that worked yesterday and advancing the version number.
Seriously, another day or two of this and I'll end up going from a
proponent of maven who has done presntations on Maven to hating maven.
All this to get javadocs working and still be able to release software.
It shouldn't be this hard.  I don't even know which way is up at this
point.  I even tried making the file writable which it shouldn't need to
be (checkout out the file would make it writable, which the release
plugin did just fine yesterday).  I even tried relogging into source
control (perforce).  I also tried removing my repository.  Tried, mvn
clean, mvn release:clean, praying, deleting all files and get from
source control, ...

[psundling@hh-dsp-tc01 minimal]$ mvn -B -e -Dresume=false install
release:prepare
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   TEST OF RELEASE
[INFO]   myjar
[INFO]   mywebapp Maven Webapp
[INFO] Searching repository for plugin with prefix: 'release'. [INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/pom.xml to
/home/psundling/.m2/repository/playground/minimal/parent/1.0.51-SNAPSHOT
/parent-1.0.51-SNAPSHOT.pom
[INFO]
------------------------------------------------------------------------
[INFO] Building myjar
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/main/resources
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/test/resources
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/test-classe
s
[INFO] [surefire:test]
[INFO] Surefire report directory:
/home/psundling/ddi/branches/playground/minimal/myjar/target/surefire-re
ports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running release.minimal.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088
sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar]
[INFO] Building jar:
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar to
/home/psundling/.m2/repository/playground/minimal/myjar/1.0.51-SNAPSHOT/
myjar-1.0.51-SNAPSHOT.jar
[INFO]
------------------------------------------------------------------------
[INFO] Building mywebapp Maven Webapp
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/main/resour
ces
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/test/resour
ces
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[mywebapp] in
[/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebap
p]
[INFO] Processing war project
[INFO] Webapp assembled in[119 msecs]
[INFO] Building war:
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war to
/home/psundling/.m2/repository/playground/minimal/mywebapp/1.0.51-SNAPSH
OT/mywebapp-1.0.51-SNAPSHOT.war
[INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [release:prepare] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [release:prepare]
[INFO] Verifying that there are no local modifications... [INFO]
Checking dependencies and plugins for snapshots ... [INFO] Transforming
'TEST OF RELEASE'... [INFO] Updating myjar to 1.0.51 [INFO] Ignoring
artifact version update for expression: ${project.version} [INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:583)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:512)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:227)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:140)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:558)
        ... 16 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException:
Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:692)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:638)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
Project(AbstractRewritePomsPhase.java:201)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
(AbstractRewritePomsPhase.java:117)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.execute(A
bstractRewritePomsPhase.java:100)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:194)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:131)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:94)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:136)
        ... 18 more
Caused by: java.io.FileNotFoundException:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:673)
        ... 26 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Wed Jan 14 01:36:11 GMT 2009
[INFO] Final Memory: 27M/216M
[INFO]
------------------------------------------------------------------------




-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Friday, January 09, 2009 7:40 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


Hi Paul,
Have you tried with javadoc 2.4? I raised this on the dev list last
week, that I think the way 2.4 works is the most correct and consider
the change to 2.5 a regression.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Friday, January 09, 2009 10:30 PM
To: dev@maven.apache.org
Subject: aggregates (javadoc) break release

After spending 2 whole workdays on it (this time), it's clearly time for
help.  
 
Let's rewind to the core problem.  I want to run javadoc and jxr reports
with aggregates/non-aggregates and still be able to do release builds.
 
Back in 2007 I opened a bug and even provided a zip file so it could be
reproduced:
 
http://jira.codehaus.org/browse/MNG-3336
 
Fast forward to the present and with Maven 2.0.9 and all the latest
plugin versions.  So the site is generated and all works great until we
try to do an official release build for QA.  If we didn't use release
builds and versioning, which is at the core of Maven, all would be fine.

 
So my next approach was to take the reporting stuff out into a separate
pom that inherits from the main pom and use 
 
  mvn -f reporting.xml install site:site site:deploy
 
This mostly worked, but would always run into some strange error even on
pretty much identical configuration.  It's like there a bunch of
assumptions that fail when using the -f approach.  
 
I generated a pom using help:effective-pom to remove the complication of
inheriting a pom and still I got strange errors. 
  mvn -f reporting.xml help:effective-pom > orphan.xml    [and removing
the parent definition]
 
I had errors from PMD "Failure executing PMD ... Can't use enum as a
keyword in pre-JDK 1.5 target" which was really weird because I had
removed PMD completely from the pom I was using and using effective-pom
I verified that it had been removed.  It's like one of those horror
movies where the tv still comes on after it's unplugged.  I guess maybe
because the child projects inherit from the real parent pom, maybe
that's how PMD finds it way back into the mix.  
 
I've seen messages like "[INFO] Unable to load parent project from a
relative path: Could not find the model file", which is probably a
flashing red symptom of different behavior when using mvn -f!
 
Layout:
/pom.xml
/reporting.xml
/child/pom.xml
/child2/pom.xml
 
So clearly -f is not going to work.  The only idea I have left is that I
haven't tried using the new syntax for config with 2.5 javadoc plugin,
i.e
 
http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.
html
 
using "aggregate goal" instead of "aggregate parameter".  Any other
ideas?  It's kind of a big deal risking breaking release builds and it
may be a month before I can try again if it's not already too late.
 
Paul Sundling
 
 

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


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



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



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


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



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


RE: aggregates (javadoc) break release

Posted by "Sundling, Paul" <Pa...@smss.sony.com>.
Yep, here's the full rundown of the fun I've had in search of aggregate
javadocs:

The javadoc bug that requires an install before release (116).

PMD 2.4 bug where it complains about annotation if you don't set
targetJdk to 1.5 (1.6 or anything else blows up during site, but works
for pmd:pmd!).

Windows locking/perm issues that drove me to use Linux.

Perforce/SCM plugin issues (must have been transitively upgraded or
something): now instead of whatever mechanism, perforce expects P4PASSWD
to be your clear text password.  So probably perforce issue mostly, just
a weird coincidence.

In the end I found some combination that works, I'll upload a working
example to my bug and try to reproduce the PMD bug.  116 bug still
exists.  I did end up using javadoc 2.4 in the working version.

Paul Sundling

-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Tuesday, January 13, 2009 9:06 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


Ah, I was going to say this sounds like perforce with the read only
flags etc. Regarding javadoc, set it to 2.4 and it should hopefully fix
the problem (if it's the one I'm thinking of)....but perforce is going
to be more entertaining imo.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Tuesday, January 13, 2009 6:28 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release

Well I found this one is something to do with the perforce plugin.  I'll
investigate further, but I at least have a lead.  Ugh, all I want for
Christmas is aggregated javadocs without breaking release builds.  

Also this seems to be a related to
http://jira.codehaus.org/browse/MJAVADOC-111 and
http://jira.codehaus.org/browse/MJAVADOC-116 and probably others.  As
per 116, thus the need to do an install or deploy.

Paul Sundling

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Tuesday, January 13, 2009 6:10 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


One piece of the puzzle is that I have to run install before the
release:prepare.  Also tests can't be skipped with release plugin, so
I've removed the flag.  So here are the updated command lines:

  mvn -B -Dresume=false install release:prepare
  mvn -B release:perform

It seemed like if I don't do a release:cleanup after release:perform,
then I got "Access is denied" error if I try to do a second cycle of
creating another release immediately afterward.  In the end it was
non-deterministic that I would have the permission problems.  With the
way windows works, locking files used by a program, instead of using
copy on write (like Linux, UNIX, OSX) causes these sorts of problems.
The working directory could be some arbitrary place you happened to have
clicked on windows explorer.  After moving to Linux "Access is denied"
wasn't an issue the rest of the day.

Then the next day I updated the pom with the the next thing to try.  Now
I get permission denied errors no matter what, even after reverting to
the version that worked yesterday and advancing the version number.
Seriously, another day or two of this and I'll end up going from a
proponent of maven who has done presntations on Maven to hating maven.
All this to get javadocs working and still be able to release software.
It shouldn't be this hard.  I don't even know which way is up at this
point.  I even tried making the file writable which it shouldn't need to
be (checkout out the file would make it writable, which the release
plugin did just fine yesterday).  I even tried relogging into source
control (perforce).  I also tried removing my repository.  Tried, mvn
clean, mvn release:clean, praying, deleting all files and get from
source control, ...

[psundling@hh-dsp-tc01 minimal]$ mvn -B -e -Dresume=false install
release:prepare
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   TEST OF RELEASE
[INFO]   myjar
[INFO]   mywebapp Maven Webapp
[INFO] Searching repository for plugin with prefix: 'release'. [INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/pom.xml to
/home/psundling/.m2/repository/playground/minimal/parent/1.0.51-SNAPSHOT
/parent-1.0.51-SNAPSHOT.pom
[INFO]
------------------------------------------------------------------------
[INFO] Building myjar
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/main/resources
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/test/resources
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/test-classe
s
[INFO] [surefire:test]
[INFO] Surefire report directory:
/home/psundling/ddi/branches/playground/minimal/myjar/target/surefire-re
ports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running release.minimal.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088
sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar]
[INFO] Building jar:
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar to
/home/psundling/.m2/repository/playground/minimal/myjar/1.0.51-SNAPSHOT/
myjar-1.0.51-SNAPSHOT.jar
[INFO]
------------------------------------------------------------------------
[INFO] Building mywebapp Maven Webapp
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/main/resour
ces
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/test/resour
ces
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[mywebapp] in
[/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebap
p]
[INFO] Processing war project
[INFO] Webapp assembled in[119 msecs]
[INFO] Building war:
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war to
/home/psundling/.m2/repository/playground/minimal/mywebapp/1.0.51-SNAPSH
OT/mywebapp-1.0.51-SNAPSHOT.war
[INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [release:prepare] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [release:prepare]
[INFO] Verifying that there are no local modifications... [INFO]
Checking dependencies and plugins for snapshots ... [INFO] Transforming
'TEST OF RELEASE'... [INFO] Updating myjar to 1.0.51 [INFO] Ignoring
artifact version update for expression: ${project.version} [INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:583)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:512)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:227)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:140)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:558)
        ... 16 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException:
Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:692)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:638)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
Project(AbstractRewritePomsPhase.java:201)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
(AbstractRewritePomsPhase.java:117)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.execute(A
bstractRewritePomsPhase.java:100)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:194)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:131)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:94)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:136)
        ... 18 more
Caused by: java.io.FileNotFoundException:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:673)
        ... 26 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Wed Jan 14 01:36:11 GMT 2009
[INFO] Final Memory: 27M/216M
[INFO]
------------------------------------------------------------------------




-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Friday, January 09, 2009 7:40 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


Hi Paul,
Have you tried with javadoc 2.4? I raised this on the dev list last
week, that I think the way 2.4 works is the most correct and consider
the change to 2.5 a regression.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Friday, January 09, 2009 10:30 PM
To: dev@maven.apache.org
Subject: aggregates (javadoc) break release

After spending 2 whole workdays on it (this time), it's clearly time for
help.  
 
Let's rewind to the core problem.  I want to run javadoc and jxr reports
with aggregates/non-aggregates and still be able to do release builds.
 
Back in 2007 I opened a bug and even provided a zip file so it could be
reproduced:
 
http://jira.codehaus.org/browse/MNG-3336
 
Fast forward to the present and with Maven 2.0.9 and all the latest
plugin versions.  So the site is generated and all works great until we
try to do an official release build for QA.  If we didn't use release
builds and versioning, which is at the core of Maven, all would be fine.

 
So my next approach was to take the reporting stuff out into a separate
pom that inherits from the main pom and use 
 
  mvn -f reporting.xml install site:site site:deploy
 
This mostly worked, but would always run into some strange error even on
pretty much identical configuration.  It's like there a bunch of
assumptions that fail when using the -f approach.  
 
I generated a pom using help:effective-pom to remove the complication of
inheriting a pom and still I got strange errors. 
  mvn -f reporting.xml help:effective-pom > orphan.xml    [and removing
the parent definition]
 
I had errors from PMD "Failure executing PMD ... Can't use enum as a
keyword in pre-JDK 1.5 target" which was really weird because I had
removed PMD completely from the pom I was using and using effective-pom
I verified that it had been removed.  It's like one of those horror
movies where the tv still comes on after it's unplugged.  I guess maybe
because the child projects inherit from the real parent pom, maybe
that's how PMD finds it way back into the mix.  
 
I've seen messages like "[INFO] Unable to load parent project from a
relative path: Could not find the model file", which is probably a
flashing red symptom of different behavior when using mvn -f!
 
Layout:
/pom.xml
/reporting.xml
/child/pom.xml
/child2/pom.xml
 
So clearly -f is not going to work.  The only idea I have left is that I
haven't tried using the new syntax for config with 2.5 javadoc plugin,
i.e
 
http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.
html
 
using "aggregate goal" instead of "aggregate parameter".  Any other
ideas?  It's kind of a big deal risking breaking release builds and it
may be a month before I can try again if it's not already too late.
 
Paul Sundling
 
 

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


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



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



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


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



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


RE: aggregates (javadoc) break release

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Ah, I was going to say this sounds like perforce with the read only
flags etc. Regarding javadoc, set it to 2.4 and it should hopefully fix
the problem (if it's the one I'm thinking of)....but perforce is going
to be more entertaining imo.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Tuesday, January 13, 2009 6:28 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release

Well I found this one is something to do with the perforce plugin.  I'll
investigate further, but I at least have a lead.  Ugh, all I want for
Christmas is aggregated javadocs without breaking release builds.  

Also this seems to be a related to
http://jira.codehaus.org/browse/MJAVADOC-111 and
http://jira.codehaus.org/browse/MJAVADOC-116 and probably others.  As
per 116, thus the need to do an install or deploy.

Paul Sundling

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Tuesday, January 13, 2009 6:10 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


One piece of the puzzle is that I have to run install before the
release:prepare.  Also tests can't be skipped with release plugin, so
I've removed the flag.  So here are the updated command lines:

  mvn -B -Dresume=false install release:prepare
  mvn -B release:perform

It seemed like if I don't do a release:cleanup after release:perform,
then I got "Access is denied" error if I try to do a second cycle of
creating another release immediately afterward.  In the end it was
non-deterministic that I would have the permission problems.  With the
way windows works, locking files used by a program, instead of using
copy on write (like Linux, UNIX, OSX) causes these sorts of problems.
The working directory could be some arbitrary place you happened to have
clicked on windows explorer.  After moving to Linux "Access is denied"
wasn't an issue the rest of the day.

Then the next day I updated the pom with the the next thing to try.  Now
I get permission denied errors no matter what, even after reverting to
the version that worked yesterday and advancing the version number.
Seriously, another day or two of this and I'll end up going from a
proponent of maven who has done presntations on Maven to hating maven.
All this to get javadocs working and still be able to release software.
It shouldn't be this hard.  I don't even know which way is up at this
point.  I even tried making the file writable which it shouldn't need to
be (checkout out the file would make it writable, which the release
plugin did just fine yesterday).  I even tried relogging into source
control (perforce).  I also tried removing my repository.  Tried, mvn
clean, mvn release:clean, praying, deleting all files and get from
source control, ...

[psundling@hh-dsp-tc01 minimal]$ mvn -B -e -Dresume=false install
release:prepare
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   TEST OF RELEASE
[INFO]   myjar
[INFO]   mywebapp Maven Webapp
[INFO] Searching repository for plugin with prefix: 'release'. [INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/pom.xml to
/home/psundling/.m2/repository/playground/minimal/parent/1.0.51-SNAPSHOT
/parent-1.0.51-SNAPSHOT.pom
[INFO]
------------------------------------------------------------------------
[INFO] Building myjar
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/main/resources
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/test/resources
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/test-classe
s
[INFO] [surefire:test]
[INFO] Surefire report directory:
/home/psundling/ddi/branches/playground/minimal/myjar/target/surefire-re
ports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running release.minimal.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088
sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar]
[INFO] Building jar:
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar to
/home/psundling/.m2/repository/playground/minimal/myjar/1.0.51-SNAPSHOT/
myjar-1.0.51-SNAPSHOT.jar
[INFO]
------------------------------------------------------------------------
[INFO] Building mywebapp Maven Webapp
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/main/resour
ces
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/test/resour
ces
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[mywebapp] in
[/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebap
p]
[INFO] Processing war project
[INFO] Webapp assembled in[119 msecs]
[INFO] Building war:
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war to
/home/psundling/.m2/repository/playground/minimal/mywebapp/1.0.51-SNAPSH
OT/mywebapp-1.0.51-SNAPSHOT.war
[INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [release:prepare] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [release:prepare]
[INFO] Verifying that there are no local modifications... [INFO]
Checking dependencies and plugins for snapshots ... [INFO] Transforming
'TEST OF RELEASE'... [INFO] Updating myjar to 1.0.51 [INFO] Ignoring
artifact version update for expression: ${project.version} [INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:583)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:512)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:227)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:140)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:558)
        ... 16 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException:
Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:692)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:638)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
Project(AbstractRewritePomsPhase.java:201)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
(AbstractRewritePomsPhase.java:117)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.execute(A
bstractRewritePomsPhase.java:100)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:194)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:131)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:94)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:136)
        ... 18 more
Caused by: java.io.FileNotFoundException:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:673)
        ... 26 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Wed Jan 14 01:36:11 GMT 2009
[INFO] Final Memory: 27M/216M
[INFO]
------------------------------------------------------------------------




-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Friday, January 09, 2009 7:40 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


Hi Paul,
Have you tried with javadoc 2.4? I raised this on the dev list last
week, that I think the way 2.4 works is the most correct and consider
the change to 2.5 a regression.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Friday, January 09, 2009 10:30 PM
To: dev@maven.apache.org
Subject: aggregates (javadoc) break release

After spending 2 whole workdays on it (this time), it's clearly time for
help.  
 
Let's rewind to the core problem.  I want to run javadoc and jxr reports
with aggregates/non-aggregates and still be able to do release builds.
 
Back in 2007 I opened a bug and even provided a zip file so it could be
reproduced:
 
http://jira.codehaus.org/browse/MNG-3336
 
Fast forward to the present and with Maven 2.0.9 and all the latest
plugin versions.  So the site is generated and all works great until we
try to do an official release build for QA.  If we didn't use release
builds and versioning, which is at the core of Maven, all would be fine.

 
So my next approach was to take the reporting stuff out into a separate
pom that inherits from the main pom and use 
 
  mvn -f reporting.xml install site:site site:deploy
 
This mostly worked, but would always run into some strange error even on
pretty much identical configuration.  It's like there a bunch of
assumptions that fail when using the -f approach.  
 
I generated a pom using help:effective-pom to remove the complication of
inheriting a pom and still I got strange errors. 
  mvn -f reporting.xml help:effective-pom > orphan.xml    [and removing
the parent definition]
 
I had errors from PMD "Failure executing PMD ... Can't use enum as a
keyword in pre-JDK 1.5 target" which was really weird because I had
removed PMD completely from the pom I was using and using effective-pom
I verified that it had been removed.  It's like one of those horror
movies where the tv still comes on after it's unplugged.  I guess maybe
because the child projects inherit from the real parent pom, maybe
that's how PMD finds it way back into the mix.  
 
I've seen messages like "[INFO] Unable to load parent project from a
relative path: Could not find the model file", which is probably a
flashing red symptom of different behavior when using mvn -f!
 
Layout:
/pom.xml
/reporting.xml
/child/pom.xml
/child2/pom.xml
 
So clearly -f is not going to work.  The only idea I have left is that I
haven't tried using the new syntax for config with 2.5 javadoc plugin,
i.e
 
http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.
html
 
using "aggregate goal" instead of "aggregate parameter".  Any other
ideas?  It's kind of a big deal risking breaking release builds and it
may be a month before I can try again if it's not already too late.
 
Paul Sundling
 
 

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


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



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



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


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


RE: aggregates (javadoc) break release

Posted by "Sundling, Paul" <Pa...@smss.sony.com>.
Well I found this one is something to do with the perforce plugin.  I'll
investigate further, but I at least have a lead.  Ugh, all I want for
Christmas is aggregated javadocs without breaking release builds.  

Also this seems to be a related to
http://jira.codehaus.org/browse/MJAVADOC-111 and
http://jira.codehaus.org/browse/MJAVADOC-116 and probably others.  As
per 116, thus the need to do an install or deploy.

Paul Sundling

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Tuesday, January 13, 2009 6:10 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


One piece of the puzzle is that I have to run install before the
release:prepare.  Also tests can't be skipped with release plugin, so
I've removed the flag.  So here are the updated command lines:

  mvn -B -Dresume=false install release:prepare
  mvn -B release:perform

It seemed like if I don't do a release:cleanup after release:perform,
then I got "Access is denied" error if I try to do a second cycle of
creating another release immediately afterward.  In the end it was
non-deterministic that I would have the permission problems.  With the
way windows works, locking files used by a program, instead of using
copy on write (like Linux, UNIX, OSX) causes these sorts of problems.
The working directory could be some arbitrary place you happened to have
clicked on windows explorer.  After moving to Linux "Access is denied"
wasn't an issue the rest of the day.

Then the next day I updated the pom with the the next thing to try.  Now
I get permission denied errors no matter what, even after reverting to
the version that worked yesterday and advancing the version number.
Seriously, another day or two of this and I'll end up going from a
proponent of maven who has done presntations on Maven to hating maven.
All this to get javadocs working and still be able to release software.
It shouldn't be this hard.  I don't even know which way is up at this
point.  I even tried making the file writable which it shouldn't need to
be (checkout out the file would make it writable, which the release
plugin did just fine yesterday).  I even tried relogging into source
control (perforce).  I also tried removing my repository.  Tried, mvn
clean, mvn release:clean, praying, deleting all files and get from
source control, ...

[psundling@hh-dsp-tc01 minimal]$ mvn -B -e -Dresume=false install
release:prepare
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   TEST OF RELEASE
[INFO]   myjar
[INFO]   mywebapp Maven Webapp
[INFO] Searching repository for plugin with prefix: 'release'. [INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/pom.xml to
/home/psundling/.m2/repository/playground/minimal/parent/1.0.51-SNAPSHOT
/parent-1.0.51-SNAPSHOT.pom
[INFO]
------------------------------------------------------------------------
[INFO] Building myjar
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/main/resources
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/test/resources
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/test-classe
s
[INFO] [surefire:test]
[INFO] Surefire report directory:
/home/psundling/ddi/branches/playground/minimal/myjar/target/surefire-re
ports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running release.minimal.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088
sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar]
[INFO] Building jar:
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar to
/home/psundling/.m2/repository/playground/minimal/myjar/1.0.51-SNAPSHOT/
myjar-1.0.51-SNAPSHOT.jar
[INFO]
------------------------------------------------------------------------
[INFO] Building mywebapp Maven Webapp
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/main/resour
ces
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! [INFO] skip non existing
resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/test/resour
ces
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[mywebapp] in
[/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebap
p]
[INFO] Processing war project
[INFO] Webapp assembled in[119 msecs]
[INFO] Building war:
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war to
/home/psundling/.m2/repository/playground/minimal/mywebapp/1.0.51-SNAPSH
OT/mywebapp-1.0.51-SNAPSHOT.war
[INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [release:prepare] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [release:prepare]
[INFO] Verifying that there are no local modifications... [INFO]
Checking dependencies and plugins for snapshots ... [INFO] Transforming
'TEST OF RELEASE'... [INFO] Updating myjar to 1.0.51 [INFO] Ignoring
artifact version update for expression: ${project.version} [INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:583)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:512)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:227)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:140)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:558)
        ... 16 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException:
Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:692)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:638)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
Project(AbstractRewritePomsPhase.java:201)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
(AbstractRewritePomsPhase.java:117)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.execute(A
bstractRewritePomsPhase.java:100)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:194)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:131)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:94)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:136)
        ... 18 more
Caused by: java.io.FileNotFoundException:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:673)
        ... 26 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Wed Jan 14 01:36:11 GMT 2009
[INFO] Final Memory: 27M/216M
[INFO]
------------------------------------------------------------------------




-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Friday, January 09, 2009 7:40 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


Hi Paul,
Have you tried with javadoc 2.4? I raised this on the dev list last
week, that I think the way 2.4 works is the most correct and consider
the change to 2.5 a regression.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Friday, January 09, 2009 10:30 PM
To: dev@maven.apache.org
Subject: aggregates (javadoc) break release

After spending 2 whole workdays on it (this time), it's clearly time for
help.  
 
Let's rewind to the core problem.  I want to run javadoc and jxr reports
with aggregates/non-aggregates and still be able to do release builds.
 
Back in 2007 I opened a bug and even provided a zip file so it could be
reproduced:
 
http://jira.codehaus.org/browse/MNG-3336
 
Fast forward to the present and with Maven 2.0.9 and all the latest
plugin versions.  So the site is generated and all works great until we
try to do an official release build for QA.  If we didn't use release
builds and versioning, which is at the core of Maven, all would be fine.

 
So my next approach was to take the reporting stuff out into a separate
pom that inherits from the main pom and use 
 
  mvn -f reporting.xml install site:site site:deploy
 
This mostly worked, but would always run into some strange error even on
pretty much identical configuration.  It's like there a bunch of
assumptions that fail when using the -f approach.  
 
I generated a pom using help:effective-pom to remove the complication of
inheriting a pom and still I got strange errors. 
  mvn -f reporting.xml help:effective-pom > orphan.xml    [and removing
the parent definition]
 
I had errors from PMD "Failure executing PMD ... Can't use enum as a
keyword in pre-JDK 1.5 target" which was really weird because I had
removed PMD completely from the pom I was using and using effective-pom
I verified that it had been removed.  It's like one of those horror
movies where the tv still comes on after it's unplugged.  I guess maybe
because the child projects inherit from the real parent pom, maybe
that's how PMD finds it way back into the mix.  
 
I've seen messages like "[INFO] Unable to load parent project from a
relative path: Could not find the model file", which is probably a
flashing red symptom of different behavior when using mvn -f!
 
Layout:
/pom.xml
/reporting.xml
/child/pom.xml
/child2/pom.xml
 
So clearly -f is not going to work.  The only idea I have left is that I
haven't tried using the new syntax for config with 2.5 javadoc plugin,
i.e
 
http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.
html
 
using "aggregate goal" instead of "aggregate parameter".  Any other
ideas?  It's kind of a big deal risking breaking release builds and it
may be a month before I can try again if it's not already too late.
 
Paul Sundling
 
 

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


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



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



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


RE: aggregates (javadoc) break release

Posted by "Sundling, Paul" <Pa...@smss.sony.com>.
One piece of the puzzle is that I have to run install before the
release:prepare.  Also tests can't be skipped with release plugin, so
I've removed the flag.  So here are the updated command lines:

  mvn -B -Dresume=false install release:prepare
  mvn -B release:perform

It seemed like if I don't do a release:cleanup after release:perform,
then I got "Access is denied" error if I try to do a second cycle of
creating another release immediately afterward.  In the end it was
non-deterministic that I would have the permission problems.  With the
way windows works, locking files used by a program, instead of using
copy on write (like Linux, UNIX, OSX) causes these sorts of problems.
The working directory could be some arbitrary place you happened to have
clicked on windows explorer.  After moving to Linux "Access is denied"
wasn't an issue the rest of the day.

Then the next day I updated the pom with the the next thing to try.  Now
I get permission denied errors no matter what, even after reverting to
the version that worked yesterday and advancing the version number.
Seriously, another day or two of this and I'll end up going from a
proponent of maven who has done presntations on Maven to hating maven.
All this to get javadocs working and still be able to release software.
It shouldn't be this hard.  I don't even know which way is up at this
point.  I even tried making the file writable which it shouldn't need to
be (checkout out the file would make it writable, which the release
plugin did just fine yesterday).  I even tried relogging into source
control (perforce).  I also tried removing my repository.  Tried, mvn
clean, mvn release:clean, praying, deleting all files and get from
source control, ...

[psundling@hh-dsp-tc01 minimal]$ mvn -B -e -Dresume=false install
release:prepare
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   TEST OF RELEASE
[INFO]   myjar
[INFO]   mywebapp Maven Webapp
[INFO] Searching repository for plugin with prefix: 'release'.
[INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/pom.xml to
/home/psundling/.m2/repository/playground/minimal/parent/1.0.51-SNAPSHOT
/parent-1.0.51-SNAPSHOT.pom
[INFO]
------------------------------------------------------------------------
[INFO] Building myjar
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/main/resources
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/psundling/ddi/branches/playground/minimal/myjar/src/test/resources
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/myjar/target/test-classe
s
[INFO] [surefire:test]
[INFO] Surefire report directory:
/home/psundling/ddi/branches/playground/minimal/myjar/target/surefire-re
ports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running release.minimal.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088
sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar]
[INFO] Building jar:
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/myjar/target/myjar-1.0.5
1-SNAPSHOT.jar to
/home/psundling/.m2/repository/playground/minimal/myjar/1.0.51-SNAPSHOT/
myjar-1.0.51-SNAPSHOT.jar
[INFO]
------------------------------------------------------------------------
[INFO] Building mywebapp Maven Webapp
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/main/resour
ces
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/classes
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/home/psundling/ddi/branches/playground/minimal/mywebapp/src/test/resour
ces
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[mywebapp] in
[/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebap
p]
[INFO] Processing war project
[INFO] Webapp assembled in[119 msecs]
[INFO] Building war:
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war
[INFO] [install:install]
[INFO] Installing
/home/psundling/ddi/branches/playground/minimal/mywebapp/target/mywebapp
.war to
/home/psundling/.m2/repository/playground/minimal/mywebapp/1.0.51-SNAPSH
OT/mywebapp-1.0.51-SNAPSHOT.war
[INFO]
------------------------------------------------------------------------
[INFO] Building TEST OF RELEASE
[INFO]    task-segment: [release:prepare] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [release:prepare]
[INFO] Verifying that there are no local modifications...
[INFO] Checking dependencies and plugins for snapshots ...
[INFO] Transforming 'TEST OF RELEASE'...
[INFO] Updating myjar to 1.0.51
[INFO] Ignoring artifact version update for expression:
${project.version}
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:583)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:512)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:482)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:227)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:142)
        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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: Error writing
POM: /home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:140)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:558)
        ... 16 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException:
Error writing POM:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:692)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:638)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
Project(AbstractRewritePomsPhase.java:201)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.transform
(AbstractRewritePomsPhase.java:117)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.execute(A
bstractRewritePomsPhase.java:100)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:194)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:131)
        at
org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultRel
easeManager.java:94)
        at
org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareRelea
seMojo.java:136)
        ... 18 more
Caused by: java.io.FileNotFoundException:
/home/psundling/ddi/branches/playground/minimal/pom.xml (Permission
denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.writePom(
AbstractRewritePomsPhase.java:673)
        ... 26 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Wed Jan 14 01:36:11 GMT 2009
[INFO] Final Memory: 27M/216M
[INFO]
------------------------------------------------------------------------




-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Friday, January 09, 2009 7:40 PM
To: Maven Developers List
Subject: RE: aggregates (javadoc) break release


Hi Paul,
Have you tried with javadoc 2.4? I raised this on the dev list last
week, that I think the way 2.4 works is the most correct and consider
the change to 2.5 a regression.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Friday, January 09, 2009 10:30 PM
To: dev@maven.apache.org
Subject: aggregates (javadoc) break release

After spending 2 whole workdays on it (this time), it's clearly time for
help.  
 
Let's rewind to the core problem.  I want to run javadoc and jxr reports
with aggregates/non-aggregates and still be able to do release builds.
 
Back in 2007 I opened a bug and even provided a zip file so it could be
reproduced:
 
http://jira.codehaus.org/browse/MNG-3336
 
Fast forward to the present and with Maven 2.0.9 and all the latest
plugin versions.  So the site is generated and all works great until we
try to do an official release build for QA.  If we didn't use release
builds and versioning, which is at the core of Maven, all would be fine.

 
So my next approach was to take the reporting stuff out into a separate
pom that inherits from the main pom and use 
 
  mvn -f reporting.xml install site:site site:deploy
 
This mostly worked, but would always run into some strange error even on
pretty much identical configuration.  It's like there a bunch of
assumptions that fail when using the -f approach.  
 
I generated a pom using help:effective-pom to remove the complication of
inheriting a pom and still I got strange errors. 
  mvn -f reporting.xml help:effective-pom > orphan.xml    [and removing
the parent definition]
 
I had errors from PMD "Failure executing PMD ... Can't use enum as a
keyword in pre-JDK 1.5 target" which was really weird because I had
removed PMD completely from the pom I was using and using effective-pom
I verified that it had been removed.  It's like one of those horror
movies where the tv still comes on after it's unplugged.  I guess maybe
because the child projects inherit from the real parent pom, maybe
that's how PMD finds it way back into the mix.  
 
I've seen messages like "[INFO] Unable to load parent project from a
relative path: Could not find the model file", which is probably a
flashing red symptom of different behavior when using mvn -f!
 
Layout:
/pom.xml
/reporting.xml
/child/pom.xml
/child2/pom.xml
 
So clearly -f is not going to work.  The only idea I have left is that I
haven't tried using the new syntax for config with 2.5 javadoc plugin,
i.e
 
http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.
html
 
using "aggregate goal" instead of "aggregate parameter".  Any other
ideas?  It's kind of a big deal risking breaking release builds and it
may be a month before I can try again if it's not already too late.
 
Paul Sundling
 
 

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


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



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


RE: aggregates (javadoc) break release

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Hi Paul,
Have you tried with javadoc 2.4? I raised this on the dev list last
week, that I think the way 2.4 works is the most correct and consider
the change to 2.5 a regression.

-----Original Message-----
From: Sundling, Paul [mailto:Paul.Sundling@smss.sony.com] 
Sent: Friday, January 09, 2009 10:30 PM
To: dev@maven.apache.org
Subject: aggregates (javadoc) break release

After spending 2 whole workdays on it (this time), it's clearly time for
help.  
 
Let's rewind to the core problem.  I want to run javadoc and jxr reports
with aggregates/non-aggregates and still be able to do release builds.
 
Back in 2007 I opened a bug and even provided a zip file so it could be
reproduced:
 
http://jira.codehaus.org/browse/MNG-3336
 
Fast forward to the present and with Maven 2.0.9 and all the latest
plugin versions.  So the site is generated and all works great until we
try to do an official release build for QA.  If we didn't use release
builds and versioning, which is at the core of Maven, all would be fine.

 
So my next approach was to take the reporting stuff out into a separate
pom that inherits from the main pom and use 
 
  mvn -f reporting.xml install site:site site:deploy
 
This mostly worked, but would always run into some strange error even on
pretty much identical configuration.  It's like there a bunch of
assumptions that fail when using the -f approach.  
 
I generated a pom using help:effective-pom to remove the complication of
inheriting a pom and still I got strange errors. 
  mvn -f reporting.xml help:effective-pom > orphan.xml    [and removing
the parent definition]
 
I had errors from PMD "Failure executing PMD ... Can't use enum as a
keyword in pre-JDK 1.5 target" which was really weird because I had
removed PMD completely from the pom I was using and using effective-pom
I verified that it had been removed.  It's like one of those horror
movies where the tv still comes on after it's unplugged.  I guess maybe
because the child projects inherit from the real parent pom, maybe
that's how PMD finds it way back into the mix.  
 
I've seen messages like "[INFO] Unable to load parent project from a
relative path: Could not find the model file", which is probably a
flashing red symptom of different behavior when using mvn -f!
 
Layout:
/pom.xml
/reporting.xml
/child/pom.xml
/child2/pom.xml
 
So clearly -f is not going to work.  The only idea I have left is that I
haven't tried using the new syntax for config with 2.5 javadoc plugin,
i.e
 
http://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.
html
 
using "aggregate goal" instead of "aggregate parameter".  Any other
ideas?  It's kind of a big deal risking breaking release builds and it
may be a month before I can try again if it's not already too late.
 
Paul Sundling
 
 

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


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