Skip to main content

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

Hello,

I just want to pin lifecycle version in parent pom to 1.0.0.
Something like 
<pluginManagement>
  <plugins>
   <plugin>
     <groupId>org.eclipse.m2e</groupId>
     <artifactId>lifecycle-mapping</artifactId>

     <version>1.0.0</version>
   </plugin>
  </plugin>
</pluginManagement>

Afterwards, I want to put the following declaration in child pom (without version number) - and this is where I get my NPE :
<pluginManagement>
  <plugins>
    <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>


De : Igor Fedorenko <igor@xxxxxxxxxxxxxx>
À : m2e-users@xxxxxxxxxxx
Envoyé le : Jeudi 30 Juin 2011 17h55
Objet : Re: [m2e-users] m2eclipse 1.0 : NullPointerException when lifecycle-mapping is missing version info

I am not following. Why does version=1.0.0 forbid specifying lifecycle
mapping in parent pom?

--
Regards,
Igor

On 11-06-30 6:03 PM, Adrian Gonzalez wrote:
>
> 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>
>
>
>
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users



Back to the top