You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Drew Hite <hi...@gmail.com> on 2005/11/16 03:40:19 UTC

[M2] Invoke install:install-file from the pom.xml

Hello,
I would like to install jars on the local file system to the local m2
repository, but I'd like to do so from within the pom.xml rather than
through mvn install:install-file. I've tried the following:

<plugin>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<artifactId>upload</artifactId>
<file>WEB-INF/lib/upload.jar</file>
<groupId>upload</groupId>
<version>1.0</version>
</configuration>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>

However, I get an error about writing to the read-only property artifactId,
which seems funny given you specify that property when invoking the plugin
from the command line. I want to make the maven project as simple as
possible for new users to use, and I'd like to avoid intermediate steps
prior to mvn test. Is there a way to do this?

Thanks,
Drew

Re: [M2] Invoke install:install-file from the pom.xml

Posted by Brett Porter <br...@gmail.com>.
This seems like a bug in the metadata - please file this one in JIRA.

- Brett

On 11/16/05, Drew Hite <hi...@gmail.com> wrote:
> Hello,
> I would like to install jars on the local file system to the local m2
> repository, but I'd like to do so from within the pom.xml rather than
> through mvn install:install-file. I've tried the following:
>
> <plugin>
> <artifactId>maven-install-plugin</artifactId>
> <executions>
> <execution>
> <phase>generate-sources</phase>
> <configuration>
> <artifactId>upload</artifactId>
> <file>WEB-INF/lib/upload.jar</file>
> <groupId>upload</groupId>
> <version>1.0</version>
> </configuration>
> <goals>
> <goal>install-file</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> However, I get an error about writing to the read-only property artifactId,
> which seems funny given you specify that property when invoking the plugin
> from the command line. I want to make the maven project as simple as
> possible for new users to use, and I'd like to avoid intermediate steps
> prior to mvn test. Is there a way to do this?
>
> Thanks,
> Drew
>
>

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