[
https://jira.codehaus.org/browse/MENFORCER-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=302687#comment-302687
]
Barrie Treloar commented on MENFORCER-117:
------------------------------------------
Investigation shows:
Line 708 (was 702 prior to the start of hacking)
{noformat}
plugin.setArtifactId( tokens[1] );
{noformat}
Dumping out what tokens is and some surrounding variables:
{noformat}
[ERROR] entry =clean=org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean
[ERROR] value =org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean
[ERROR] tokens =[org.apache.maven.plugins, maven-clean-plugin, 2.4.1, clean]
[ERROR] entry =install=org.apache.maven.plugins:maven-install-plugin:install
[ERROR] value =org.apache.maven.plugins:maven-install-plugin:install
[ERROR] tokens =[org.apache.maven.plugins, maven-install-plugin, install]
[ERROR] entry =generate-sources=
{noformat}
Likewise for the other test project being added
{noformat}
[ERROR] entry =integration-test=
[ERROR] value =
[ERROR] tokens =[]
{noformat}
So RequirePluginVersions needs to handle empty lifecycles.
> Custom Packaging with executions fails with NullPointerException in
> RequirePluginVersions.java:702
> --------------------------------------------------------------------------------------------------
>
> Key: MENFORCER-117
> URL: https://jira.codehaus.org/browse/MENFORCER-117
> Project: Maven 2.x Enforcer Plugin
> Issue Type: Bug
> Components: Plugin
> Affects Versions: 1.0.1
> Environment: Windows XP
> Reporter: Barrie Treloar
> Assignee: Barrie Treloar
> Priority: Critical
> Attachments: pom.xml
>
>
> The pde-maven-plugin causes enforcer to NPE.
> I've attached an IT pom.xml.
> I haven't had time to investigate this any further than to get the IT to fail
> the same as my real build.
> {noformat}
> <packaging>zip</packaging>
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>pde-maven-plugin</artifactId>
> <version>1.0-alpha-1</version>
> <extensions>true</extensions>
> <configuration>
> <buildProperties>
> <pdeProductFilename>example.product</pdeProductFilename>
> </buildProperties>
> </configuration>
> <!-- Also bind to mvn clean -->
> <executions>
> <execution>
> <id>clean-pde</id>
> <phase>clean</phase>
> <goals>
> <goal>clean</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> ...
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira