You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eugeny N Dzhurinsky <bo...@redwerk.com> on 2006/06/02 18:31:00 UTC
specifying plugin parameters in POM
Is it possible to alter some plugin parameters in POM?
For example, if project consists of several modules, I would like to provide
some module-specific parameters (for instance - for dependency plugin I need
to provide different target directory to place dependencies into, and for
packaging plugin i need to provide custom placement of resulting JAR file,
instead of target/ directory).
--
Eugene N Dzhurinsky
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: specifying plugin parameters in POM
Posted by Charlie Groves <gr...@seis.sc.edu>.
Hmm, I actually assumed you'd be able to set the basedir property on
the jar plugin, but I just tried it and apparently basedir is read
only. It's the one that controls what directory the jar goes. Since
its value comes from ${project.build.directory} that means you could
add
<build>
<directory>WEB-INF/lib</directory>
</build>
to your pom, but that would put the classes directory and everything
else into there. I'm going to have to defer to a more expert user of
maven on this one.
Charlie
On 6/5/06, Eugeny N Dzhurinsky <bo...@redwerk.com> wrote:
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
>
> <artifactId>maven-jar-plugin</artifactId>
>
> <executions>
> <execution>
> <id>jar</id>
>
> <phase>package</phase>
>
> <goals>
> <goal>jar</goal>
> </goals>
>
> <configuration>
> <outputDirectory>WEB-INF/lib</outputDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> For some reason that configuration does not force maven to store JAR in
> WEB-INF/lib directory.
>
> --
> Eugene N Dzhurinsky
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: specifying plugin parameters in POM
Posted by Eugeny N Dzhurinsky <bo...@redwerk.com>.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<outputDirectory>WEB-INF/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
For some reason that configuration does not force maven to store JAR in
WEB-INF/lib directory.
--
Eugene N Dzhurinsky
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: specifying plugin parameters in POM
Posted by Eugeny N Dzhurinsky <bo...@redwerk.com>.
On Mon, Jun 05, 2006 at 08:30:50AM -0400, Charlie Groves wrote:
> Jars are created with maven-jar-plugin, so you'd change the output
> directory by setting its basedir in your plugin configuration in
> build. You can see the jar plugin docs at
> http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html and
> about configuring plugins from pom.xml at
> http://maven.apache.org/guides/mini/guide-configuring-plugins.html
You mean I can alter configuration for jar:jar somehow in a POM file for
project, so when jar:jar target will be executed in a lifecycle for 'package'
- JAR file will be placed in a directory I specify in plugin configuration?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<outputDirectory>WEB-INF/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Something like this? And what about valid group ID for the plugin?
--
Eugene N Dzhurinsky
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: specifying plugin parameters in POM
Posted by Charlie Groves <ch...@gmail.com>.
Jars are created with maven-jar-plugin, so you'd change the output
directory by setting its basedir in your plugin configuration in
build. You can see the jar plugin docs at
http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html and
about configuring plugins from pom.xml at
http://maven.apache.org/guides/mini/guide-configuring-plugins.html
Charlie
On 6/5/06, Eugeny N Dzhurinsky <bo...@redwerk.com> wrote:
> On Fri, Jun 02, 2006 at 07:45:53PM +0300, Eugeny N Dzhurinsky wrote:
> > But still wandering how I can specify different directory for placing JAR file
> > produced with "package" goal?
>
> Is it not possible at all with maven?
>
> --
> Eugene N Dzhurinsky
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: specifying plugin parameters in POM
Posted by Eugeny N Dzhurinsky <bo...@redwerk.com>.
On Fri, Jun 02, 2006 at 07:45:53PM +0300, Eugeny N Dzhurinsky wrote:
> But still wandering how I can specify different directory for placing JAR file
> produced with "package" goal?
Is it not possible at all with maven?
--
Eugene N Dzhurinsky
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: specifying plugin parameters in POM
Posted by Eugeny N Dzhurinsky <bo...@redwerk.com>.
On Fri, Jun 02, 2006 at 07:31:00PM +0300, Eugeny N Dzhurinsky wrote:
> Is it possible to alter some plugin parameters in POM?
>
> For example, if project consists of several modules, I would like to provide
> some module-specific parameters (for instance - for dependency plugin I need
> to provide different target directory to place dependencies into, and for
> packaging plugin i need to provide custom placement of resulting JAR file,
> instead of target/ directory).
I found how to work with dependencies at
http://mojo.codehaus.org/dependency-maven-plugin/howto.html
But still wandering how I can specify different directory for placing JAR file
produced with "package" goal?
--
Eugene N Dzhurinsky
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org