Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] m2eclipse 1.0 : NullPointerException when lifecycle-mapping is missing version info


Hello,

I have the attached pom.xml.

When you don't specify version information, you get a dialog box with the following error :
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'pag'.
java.lang.NullPointerException

When you specify <version>1.0.0</version> everything works fine.

This forbids me to put version information in a parent pom.

Shoud i raise an issue ?



-------------------------------------

Here's a pom sample :
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>tmp.pag</groupId>
<artifactId>pag</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>pag</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!-- suppression avertissement m2eclipse 1.0 (indigo) -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-parameters</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.natixis.framework</groupId>
<artifactId>framework-parameter</artifactId>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>
${project.build.outputDirectory}/archetype-resources/__rootArtifactId__-parameter/src
</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>


Back to the top