maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marko Rantanen <markorantane...@yahoo.fi>
Subject Custom plugin, installation of pom.xml failing
Date Thu, 06 Feb 2014 09:44:22 GMT
Hi all,

We have implemented a custom Maven plugin (build_settings) which is supposed to be used in
the other project (base). The plugin has custom lifecycle. At first, a mojo generates resources.
That phase is working as expected. Second, we want to install pom.xml but this one is failing.

When trying  - mvn install

the following error is received:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install
(default-install) on project base: The packaging for this project did not assign a file to
the build artifact


How should installation of the pom file be handled? We are using Maven 3.0.5.

The following custom.xml is in plugins/build_settings/src/main/resources/META-INF/plexus:

<component-set>
    <components>
    <component>
          <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
         <role-hint>build_settings</role-hint>
         <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
         <configuration>
            <phases>
                  <generate-resources>proj.mvn.plugin:build_settings:generate-mvn</generate-resources>

                <install>org.apache.maven.plugins:maven-install-plugin:install</install>

                  <deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
            </phases>
         </configuration>
      </component>
      <component>

         <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
         <role-hint>build_settings</role-hint>
         <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
         <configuration>
            <type>build_settings</type>

            <packaging>build_settings</packaging>

         </configuration>

      </component>
    </components>

</component-set>

pom.xml in test/base:

<project xmlns="http://maven.apache.org/POM/4.0.0">
...
    <parent>

      <groupId>test</groupId>
      <artifactId>settings</artifactId>
      <version>DYNAMIC-SNAPSHOT</version>
      <relativePath>../settings/pom.xml</relativePath>
    </parent>
    <artifactId>base</artifactId>

    <packaging>build_settings</packaging>

</project>


pom.xml in test/settings:

<project xmlns="http://maven.apache.org/POM/4.0.0">

...
    <groupId>test</groupId>
    <artifactId>settings</artifactId>
    <version>DYNAMIC-SNAPSHOT</version>
    <packaging>pom</packaging>

...
    <build>

...
      <plugins>

         <plugin>
            <groupId>proj.mvn.plugin</groupId>
            <artifactId>build_settings</artifactId>
            <extensions>true</extensions>
         </plugin>
      </plugins>
    </build>
</project>


pom.xml in plugins/build_settings:

<project xmlns="http://maven.apache.org/POM/4.0.0" 
...
    <artifactId>build_settings</artifactId>

    <packaging>maven-plugin</packaging>

...
</project>


********************
Regards,

Marko

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message