You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Arik Kfir (JIRA)" <ji...@codehaus.org> on 2005/11/12 13:05:07 UTC
[jira] Created: (MNG-1529) NPE when inheriting report sets
NPE when inheriting report sets
-------------------------------
Key: MNG-1529
URL: http://jira.codehaus.org/browse/MNG-1529
Project: Maven 2
Type: Bug
Components: maven-project
Versions: 2.0
Environment: JDK 1.5.0_05, Kubuntu linux 5.1
Reporter: Arik Kfir
I have three POMs:
A: serves as a template for new projects
B: Extends A - the root POM of a multi-module project
C: Extends B - a module in the B project
One of the things project A defines is the <reporting> element. However, when I try to build project B, I get the following exception:
arik@corleon:~/projects/swinger$ mvn clean
[INFO] Scanning for projects...
[INFO] snapshot org.corleon:parent:1.1-SNAPSHOT: checking for updates from corleon
[INFO] ----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] null
[INFO] ----------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at java.util.TreeMap.compare(TreeMap.java:1093)
at java.util.TreeMap.getEntry(TreeMap.java:347)
at java.util.TreeMap.containsKey(TreeMap.java:204)
at org.apache.maven.project.ModelUtils.mergeReportPluginDefinitions(ModelUtils.java:324)
at org.apache.maven.project.ModelUtils.mergeReportPluginLists(ModelUtils.java:156)
at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleReportingInheritance(DefaultModelInheritanceAssembler.java:277)
at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:170)
at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:56)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:605)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:298)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:485)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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)
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Nov 12 13:45:14 IST 2005
[INFO] Final Memory: 1M/2M
[INFO] ----------------------------------------------------------------------------
I tracked down the problem to the <reporting> element in project A, because when I remove it, things work again. I believe there's a problem in the way maven merges reporting info from parent POMs (well..duh).
Here is the reporting data in project A:
<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>dependencies</report>
<report>project-team</report>
<report>license</report>
<report>scm</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>changes-maven-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>changes-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>surefire-report-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
It appears it is not a specific plugin, but rather the appearance of the <reportSet> element. I've tried with both the javadoc and the project-info plugins - both cause the NPE when they have atleast one <reportSet> element. Having an empty <reportSets> (with no <reportSet> elements) does not cause the exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-1529) NPE when inheriting report sets
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1529?page=all ]
John Casey updated MNG-1529:
----------------------------
Fix Version: (was: 2.0.1)
2.0.2
> NPE when inheriting report sets
> -------------------------------
>
> Key: MNG-1529
> URL: http://jira.codehaus.org/browse/MNG-1529
> Project: Maven 2
> Type: Bug
> Components: Inheritence and Interpolation
> Versions: 2.0
> Environment: JDK 1.5.0_05, Kubuntu linux 5.1
> Reporter: Arik Kfir
> Fix For: 2.0.2
> Attachments: MNG-1539-test-case.tar.bz2
>
>
> I have three POMs:
> A: serves as a template for new projects
> B: Extends A - the root POM of a multi-module project
> C: Extends B - a module in the B project
> One of the things project A defines is the <reporting> element. However, when I try to build project B, I get the following exception:
> arik@corleon:~/projects/swinger$ mvn clean
> [INFO] Scanning for projects...
> [INFO] snapshot org.corleon:parent:1.1-SNAPSHOT: checking for updates from corleon
> [INFO] ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] null
> [INFO] ----------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.TreeMap.compare(TreeMap.java:1093)
> at java.util.TreeMap.getEntry(TreeMap.java:347)
> at java.util.TreeMap.containsKey(TreeMap.java:204)
> at org.apache.maven.project.ModelUtils.mergeReportPluginDefinitions(ModelUtils.java:324)
> at org.apache.maven.project.ModelUtils.mergeReportPluginLists(ModelUtils.java:156)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleReportingInheritance(DefaultModelInheritanceAssembler.java:277)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:170)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:56)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:605)
> at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:298)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
> at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:485)
> at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> 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)
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat Nov 12 13:45:14 IST 2005
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> I tracked down the problem to the <reporting> element in project A, because when I remove it, things work again. I believe there's a problem in the way maven merges reporting info from parent POMs (well..duh).
> Here is the reporting data in project A:
> <reporting>
> <plugins>
> <plugin>
> <artifactId>maven-javadoc-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>javadoc</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <artifactId>maven-project-info-reports-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>dependencies</report>
> <report>project-team</report>
> <report>license</report>
> <report>scm</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>changes-maven-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>changes-report</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>surefire-report-maven-plugin</artifactId>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>taglist-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </reporting>
> It appears it is not a specific plugin, but rather the appearance of the <reportSet> element. I've tried with both the javadoc and the project-info plugins - both cause the NPE when they have atleast one <reportSet> element. Having an empty <reportSets> (with no <reportSet> elements) does not cause the exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-1529) NPE when inheriting report sets
Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1529?page=all ]
Joakim Erdfelt updated MNG-1529:
--------------------------------
Attachment: MNG-1539-test-case.tar.bz2
I have been experiencing this NPE also.
I have attached a small sample project/test case to demonstrate
this bug.
Note: I still use maven 2.0 final (not 2.0.1).
> NPE when inheriting report sets
> -------------------------------
>
> Key: MNG-1529
> URL: http://jira.codehaus.org/browse/MNG-1529
> Project: Maven 2
> Type: Bug
> Components: Inheritence and Interpolation
> Versions: 2.0
> Environment: JDK 1.5.0_05, Kubuntu linux 5.1
> Reporter: Arik Kfir
> Fix For: 2.0.1
> Attachments: MNG-1539-test-case.tar.bz2
>
>
> I have three POMs:
> A: serves as a template for new projects
> B: Extends A - the root POM of a multi-module project
> C: Extends B - a module in the B project
> One of the things project A defines is the <reporting> element. However, when I try to build project B, I get the following exception:
> arik@corleon:~/projects/swinger$ mvn clean
> [INFO] Scanning for projects...
> [INFO] snapshot org.corleon:parent:1.1-SNAPSHOT: checking for updates from corleon
> [INFO] ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] null
> [INFO] ----------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.TreeMap.compare(TreeMap.java:1093)
> at java.util.TreeMap.getEntry(TreeMap.java:347)
> at java.util.TreeMap.containsKey(TreeMap.java:204)
> at org.apache.maven.project.ModelUtils.mergeReportPluginDefinitions(ModelUtils.java:324)
> at org.apache.maven.project.ModelUtils.mergeReportPluginLists(ModelUtils.java:156)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleReportingInheritance(DefaultModelInheritanceAssembler.java:277)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:170)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:56)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:605)
> at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:298)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
> at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:485)
> at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> 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)
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat Nov 12 13:45:14 IST 2005
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> I tracked down the problem to the <reporting> element in project A, because when I remove it, things work again. I believe there's a problem in the way maven merges reporting info from parent POMs (well..duh).
> Here is the reporting data in project A:
> <reporting>
> <plugins>
> <plugin>
> <artifactId>maven-javadoc-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>javadoc</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <artifactId>maven-project-info-reports-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>dependencies</report>
> <report>project-team</report>
> <report>license</report>
> <report>scm</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>changes-maven-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>changes-report</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>surefire-report-maven-plugin</artifactId>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>taglist-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </reporting>
> It appears it is not a specific plugin, but rather the appearance of the <reportSet> element. I've tried with both the javadoc and the project-info plugins - both cause the NPE when they have atleast one <reportSet> element. Having an empty <reportSets> (with no <reportSet> elements) does not cause the exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Closed: (MNG-1529) NPE when inheriting report sets
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1529?page=all ]
John Casey closed MNG-1529:
---------------------------
Assign To: John Casey
Resolution: Fixed
Fix Version: (was: 2.0.3)
2.0.1
forgot to close earlier....
> NPE when inheriting report sets
> -------------------------------
>
> Key: MNG-1529
> URL: http://jira.codehaus.org/browse/MNG-1529
> Project: Maven 2
> Type: Bug
> Components: Inheritence and Interpolation
> Versions: 2.0
> Environment: JDK 1.5.0_05, Kubuntu linux 5.1
> Reporter: Arik Kfir
> Assignee: John Casey
> Fix For: 2.0.1
> Attachments: MNG-1539-test-case.tar.bz2
>
>
> I have three POMs:
> A: serves as a template for new projects
> B: Extends A - the root POM of a multi-module project
> C: Extends B - a module in the B project
> One of the things project A defines is the <reporting> element. However, when I try to build project B, I get the following exception:
> arik@corleon:~/projects/swinger$ mvn clean
> [INFO] Scanning for projects...
> [INFO] snapshot org.corleon:parent:1.1-SNAPSHOT: checking for updates from corleon
> [INFO] ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] null
> [INFO] ----------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.TreeMap.compare(TreeMap.java:1093)
> at java.util.TreeMap.getEntry(TreeMap.java:347)
> at java.util.TreeMap.containsKey(TreeMap.java:204)
> at org.apache.maven.project.ModelUtils.mergeReportPluginDefinitions(ModelUtils.java:324)
> at org.apache.maven.project.ModelUtils.mergeReportPluginLists(ModelUtils.java:156)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleReportingInheritance(DefaultModelInheritanceAssembler.java:277)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:170)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:56)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:605)
> at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:298)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
> at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:485)
> at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> 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)
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat Nov 12 13:45:14 IST 2005
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> I tracked down the problem to the <reporting> element in project A, because when I remove it, things work again. I believe there's a problem in the way maven merges reporting info from parent POMs (well..duh).
> Here is the reporting data in project A:
> <reporting>
> <plugins>
> <plugin>
> <artifactId>maven-javadoc-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>javadoc</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <artifactId>maven-project-info-reports-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>dependencies</report>
> <report>project-team</report>
> <report>license</report>
> <report>scm</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>changes-maven-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>changes-report</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>surefire-report-maven-plugin</artifactId>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>taglist-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </reporting>
> It appears it is not a specific plugin, but rather the appearance of the <reportSet> element. I've tried with both the javadoc and the project-info plugins - both cause the NPE when they have atleast one <reportSet> element. Having an empty <reportSets> (with no <reportSet> elements) does not cause the exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MNG-1529) NPE when inheriting report sets
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1529?page=all ]
Brett Porter updated MNG-1529:
------------------------------
Fix Version: 2.0.1
> NPE when inheriting report sets
> -------------------------------
>
> Key: MNG-1529
> URL: http://jira.codehaus.org/browse/MNG-1529
> Project: Maven 2
> Type: Bug
> Components: maven-project
> Versions: 2.0
> Environment: JDK 1.5.0_05, Kubuntu linux 5.1
> Reporter: Arik Kfir
> Fix For: 2.0.1
>
>
> I have three POMs:
> A: serves as a template for new projects
> B: Extends A - the root POM of a multi-module project
> C: Extends B - a module in the B project
> One of the things project A defines is the <reporting> element. However, when I try to build project B, I get the following exception:
> arik@corleon:~/projects/swinger$ mvn clean
> [INFO] Scanning for projects...
> [INFO] snapshot org.corleon:parent:1.1-SNAPSHOT: checking for updates from corleon
> [INFO] ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] null
> [INFO] ----------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.TreeMap.compare(TreeMap.java:1093)
> at java.util.TreeMap.getEntry(TreeMap.java:347)
> at java.util.TreeMap.containsKey(TreeMap.java:204)
> at org.apache.maven.project.ModelUtils.mergeReportPluginDefinitions(ModelUtils.java:324)
> at org.apache.maven.project.ModelUtils.mergeReportPluginLists(ModelUtils.java:156)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleReportingInheritance(DefaultModelInheritanceAssembler.java:277)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:170)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:56)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:605)
> at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:298)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
> at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:485)
> at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> 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)
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat Nov 12 13:45:14 IST 2005
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> I tracked down the problem to the <reporting> element in project A, because when I remove it, things work again. I believe there's a problem in the way maven merges reporting info from parent POMs (well..duh).
> Here is the reporting data in project A:
> <reporting>
> <plugins>
> <plugin>
> <artifactId>maven-javadoc-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>javadoc</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <artifactId>maven-project-info-reports-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>dependencies</report>
> <report>project-team</report>
> <report>license</report>
> <report>scm</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>changes-maven-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>changes-report</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>surefire-report-maven-plugin</artifactId>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>taglist-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </reporting>
> It appears it is not a specific plugin, but rather the appearance of the <reportSet> element. I've tried with both the javadoc and the project-info plugins - both cause the NPE when they have atleast one <reportSet> element. Having an empty <reportSets> (with no <reportSet> elements) does not cause the exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Commented: (MNG-1529) NPE when inheriting report sets
Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-1529?page=comments#action_52663 ]
Joakim Erdfelt commented on MNG-1529:
-------------------------------------
Pardon the fat-fingered, incorrectly labeled filename.
The attachment is for this jira - MNG-1529.
The filename is wrong in saying (MNG-1539). sorry.
> NPE when inheriting report sets
> -------------------------------
>
> Key: MNG-1529
> URL: http://jira.codehaus.org/browse/MNG-1529
> Project: Maven 2
> Type: Bug
> Components: Inheritence and Interpolation
> Versions: 2.0
> Environment: JDK 1.5.0_05, Kubuntu linux 5.1
> Reporter: Arik Kfir
> Fix For: 2.0.1
> Attachments: MNG-1539-test-case.tar.bz2
>
>
> I have three POMs:
> A: serves as a template for new projects
> B: Extends A - the root POM of a multi-module project
> C: Extends B - a module in the B project
> One of the things project A defines is the <reporting> element. However, when I try to build project B, I get the following exception:
> arik@corleon:~/projects/swinger$ mvn clean
> [INFO] Scanning for projects...
> [INFO] snapshot org.corleon:parent:1.1-SNAPSHOT: checking for updates from corleon
> [INFO] ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] null
> [INFO] ----------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at java.util.TreeMap.compare(TreeMap.java:1093)
> at java.util.TreeMap.getEntry(TreeMap.java:347)
> at java.util.TreeMap.containsKey(TreeMap.java:204)
> at org.apache.maven.project.ModelUtils.mergeReportPluginDefinitions(ModelUtils.java:324)
> at org.apache.maven.project.ModelUtils.mergeReportPluginLists(ModelUtils.java:156)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleReportingInheritance(DefaultModelInheritanceAssembler.java:277)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:170)
> at org.apache.maven.project.inheritance.DefaultModelInheritanceAssembler.assembleModelInheritance(DefaultModelInheritanceAssembler.java:56)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:605)
> at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:298)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:276)
> at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:485)
> at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> 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)
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat Nov 12 13:45:14 IST 2005
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> I tracked down the problem to the <reporting> element in project A, because when I remove it, things work again. I believe there's a problem in the way maven merges reporting info from parent POMs (well..duh).
> Here is the reporting data in project A:
> <reporting>
> <plugins>
> <plugin>
> <artifactId>maven-javadoc-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>javadoc</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <artifactId>maven-project-info-reports-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>dependencies</report>
> <report>project-team</report>
> <report>license</report>
> <report>scm</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>changes-maven-plugin</artifactId>
> <reportSets>
> <reportSet>
> <reports>
> <report>changes-report</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>surefire-report-maven-plugin</artifactId>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>taglist-maven-plugin</artifactId>
> </plugin>
> </plugins>
> </reporting>
> It appears it is not a specific plugin, but rather the appearance of the <reportSet> element. I've tried with both the javadoc and the project-info plugins - both cause the NPE when they have atleast one <reportSet> element. Having an empty <reportSets> (with no <reportSet> elements) does not cause the exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org