Maven 1

make POM inheritence behave like RC1

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-rc2
  • Fix Version/s: 1.0-rc2
  • Component/s: inheritance
  • Labels:
    None
  • Number of attachments :
    1

Description

several lists are being merged that weren't before. Best to make it behave like RC1.

Activity

Hide
Joerg Schaible added a comment -

So what shall we now expect for RC2? If I build the current branch, all my elements are still inherited ...

Not that I complain about it, but I would like to know if this stays now for RC2 or not ???

Show
Joerg Schaible added a comment - So what shall we now expect for RC2? If I build the current branch, all my elements are still inherited ... Not that I complain about it, but I would like to know if this stays now for RC2 or not ???
Hide
Brett Porter added a comment -

I'll reopen. Please provide a small test case if you have one.

In general if an issue is closed and you are still seeing it, please reopen with a small test case.

Show
Brett Porter added a comment - I'll reopen. Please provide a small test case if you have one. In general if an issue is closed and you are still seeing it, please reopen with a small test case.
Hide
Joerg Schaible added a comment -

Archive to demonstrate the inheritance of any POM element.
The enclosed archive containes a project layout of:

+ p1
+ p2
+ root

With root as the top project. Maven was started with "maven
multiproject:site | tee ../inherit.log" from within root. The
reports of the subproject demonstrate, that the developers were
inherited, the build element and the reports element (I have a
dashboard for all subprojects ...).

Maven was build from CVS (1.0-branch) with current plugins (sources
from 1st March). Just in case of interest: I am building on Windows
XP Prof. using Cygwin environment and have Sun's JDK 1.4.2 installed.

Regards,
Jörg

Show
Joerg Schaible added a comment - Archive to demonstrate the inheritance of any POM element. The enclosed archive containes a project layout of: + p1 + p2 + root With root as the top project. Maven was started with "maven multiproject:site | tee ../inherit.log" from within root. The reports of the subproject demonstrate, that the developers were inherited, the build element and the reports element (I have a dashboard for all subprojects ...). Maven was build from CVS (1.0-branch) with current plugins (sources from 1st March). Just in case of interest: I am building on Windows XP Prof. using Cygwin environment and have Sun's JDK 1.4.2 installed. Regards, Jörg
Hide
Joerg Schaible added a comment -

Just as additional note: The subprojects are nearly unmodified genapp default template projects ... so nothing strange.

Show
Joerg Schaible added a comment - Just as additional note: The subprojects are nearly unmodified genapp default template projects ... so nothing strange.
Hide
Joerg Schaible added a comment -

Next real world example just detected: The build of commons-digester fails also with RC2 because of this issue.

cvs -d:pserver:anoncvs@cvs.apache.org:/home/cvspublic login
cvs -d:pserver:anoncvs@cvs.apache.org:/home/cvspublic co jakarta-commons/digester
cd jakarta-commons
cvs update -l
cvs update commons-build
cd digester
maven jar:install

...

BUILD FAILED
File...... file:/C:/Dokumente und Einstellungen/jos/.maven/plugins/maven-jar-plugin-1.4/plugin.jelly
Element... ant:copy
Line...... 223
Column.... 7
Warning: Could not find file C:\Work\Apps\Jakarta\jakarta-commons\digester\target\commons-digester-1.6-dev.jar to copy.
Total time: 15 seconds
Finished at: Thu Mar 04 13:34:21 CET 2004

$ ls target/
classes jakarta-commons-1.0.jar test-classes test-reports

See? id tag of digester/project.xml was overwritten by included ../commons-build/project-xml !!

Regards,
Jörg

Show
Joerg Schaible added a comment - Next real world example just detected: The build of commons-digester fails also with RC2 because of this issue. cvs -d:pserver:anoncvs@cvs.apache.org:/home/cvspublic login cvs -d:pserver:anoncvs@cvs.apache.org:/home/cvspublic co jakarta-commons/digester cd jakarta-commons cvs update -l cvs update commons-build cd digester maven jar:install ... BUILD FAILED File...... file:/C:/Dokumente und Einstellungen/jos/.maven/plugins/maven-jar-plugin-1.4/plugin.jelly Element... ant:copy Line...... 223 Column.... 7 Warning: Could not find file C:\Work\Apps\Jakarta\jakarta-commons\digester\target\commons-digester-1.6-dev.jar to copy. Total time: 15 seconds Finished at: Thu Mar 04 13:34:21 CET 2004 $ ls target/ classes jakarta-commons-1.0.jar test-classes test-reports See? id tag of digester/project.xml was overwritten by included ../commons-build/project-xml !! Regards, Jörg
Hide
Brett Porter added a comment -

I noticed this - it is because commons overrides jar:jar in common-build.

It is not the pom inheritence but the maven.xml inheritence to blame here.

I'll take a look.

Show
Brett Porter added a comment - I noticed this - it is because commons overrides jar:jar in common-build. It is not the pom inheritence but the maven.xml inheritence to blame here. I'll take a look.
Hide
Brett Porter added a comment -

I fixed the commons problem.

Developers are inherited if they are empty in the subproject. I will propose the current rules to the list and reopen if there is a problem with it.

Show
Brett Porter added a comment - I fixed the commons problem. Developers are inherited if they are empty in the subproject. I will propose the current rules to the list and reopen if there is a problem with it.
Hide
Joerg Schaible added a comment -

Yes, but it's not only the developers, but also anything else. If a subproject does not define its own items for reports, build, contributors, etc. they will be inherited.

Regards,
Jörg

Show
Joerg Schaible added a comment - Yes, but it's not only the developers, but also anything else. If a subproject does not define its own items for reports, build, contributors, etc. they will be inherited. Regards, Jörg
Hide
Brett Porter added a comment -

and isn't this exactly what is meant to happen? What is the point of extending a base project if you don't want to inherit <build/> ?

Show
Brett Porter added a comment - and isn't this exactly what is meant to happen? What is the point of extending a base project if you don't want to inherit <build/> ?
Hide
Joerg Schaible added a comment -

Hi Brett,

I don't know. It is you (well - you comitters) that define the inheritance. I just want to rely on one point on the behaviour.
If it stays now as it is, I will have to redefine my reports section, since inheritance does not make sense if e.g. dashbord is also present in the subprojects. I can live with it and use another mechanism to share my default reports section for the subprojects.

Regards,
Jörg

Show
Joerg Schaible added a comment - Hi Brett, I don't know. It is you (well - you comitters) that define the inheritance. I just want to rely on one point on the behaviour. If it stays now as it is, I will have to redefine my reports section, since inheritance does not make sense if e.g. dashbord is also present in the subprojects. I can live with it and use another mechanism to share my default reports section for the subprojects. Regards, Jörg
Hide
Brett Porter added a comment -

ok - I've tracked down the original code and it wasn't copying any lists. Will change that back too.

Show
Brett Porter added a comment - ok - I've tracked down the original code and it wasn't copying any lists. Will change that back too.
Hide
Brett Porter added a comment -

bah... back to where I was...

It was copying lists in RC1, but not merging them (except for deps), which is what I now have.

So this was fixed after all.

Show
Brett Porter added a comment - bah... back to where I was... It was copying lists in RC1, but not merging them (except for deps), which is what I now have. So this was fixed after all.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: