You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by gc134728 <gc...@scarlet.be> on 2007/05/15 16:19:32 UTC

Error executing plugin only from reactor build not the declaring project

Hey Maven Users,

So I created a pom with a plugin configuration added to it.  And It builds no
proplem. So far so good and know I want to add this project to a modular
build.     Which means i add a reference to this pom in the parent pom (using
the module declaration) and add a parent tag in the pom (of the subproject). 
So I build the project (just the subproject) and all is well.  Now I want to
build the parent project with the reactor build and bamm an error occurs when
executing the plugin which is declared in the subproject.

In my case the plugin I am using is the maven-install-plugin. 
The pom I'm using you can find below.
The error that the top pom throws is the following : 

Error configuring: org.apache.maven.plugins:maven-install-plugin. Reason:
ERROR: Cannot override read-only parameter: artifactId in goal:
install:install-file

I'm thinking this is a bug but not sure.
Maven : 2.0.6
OS : Windows XP
Plugin version : 2.2-SNAPSHOT (out of subversion)

POM (the sub pom) in question :
<project>
...

<parent>
 <groupId>be.test</groupId>
 <artifactId>buginstall</artifactId>
 <version>1.0-SNAPSHOT</version>
</parent>

<groupId>be.test.buginstall</groupId>
<artifactId>lower</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Lower</name>

<build>
  <plugins>
    <plugin>
      <artifactId>maven-install-plugin</artifactId>
      <version>2.2-SNAPSHOT</version>
      <executions>
        <execution>
          <phase>install</phase>
          <goals>
            <goal>install-file</goal>
          </goals>
          <configuration>
            <artifactId>dude</artifactId>
            <groupId>dude</groupId>
            <version>1.5</version>
            <packaging>jar</packaging>
            <file>dude.jar</file>
            <generatePom>true</generatePom>
          </configuration>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

</project>


I also solved this error by placing in the top (or parent) pom a reference to
the plugin like so without any configuration but I have no idea why I should
do this.  Is this some kind of bug or am I missing some vital peace of
knowledge about maven. It can't have something to do with inheritance or can
It?  If anybode understands this error and solution please contact me
otherwise I'm just gonna post it as a bug on JIRA.

<build>
  <plugins>
    <plugin>
      <artifactId>maven-install-plugin</artifactId>
      <version>2.2-SNAPSHOT</version>
    </plugin>
  </plugins>
</build>

Thx for any assistance.
Y. Van Steen

---
Scarlet ADSL20, 20 Mbits down, 1 Mbits up, 60 GB volume, http://www.scarlet.be/

---
Scarlet ADSL20, 20 Mbits down, 1 Mbits up, 60 GB volume, http://www.scarlet.be/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org