Take a look at the maven appassembler plugin http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/
On Mon, Jan 18, 2010 at 1:16 PM, eyal edri <eyal.e...@gmail.com> wrote: > hi, > > how can i use mvn command line (i want to be able to run it via script), to > install (not maven install) a project to the file system? > > the fs will NOT have the pom file or the source code since it's the > production server. > it will only have the settings.xml configed to the maven repository. > > here's an example pom file to install : > > *<?xml version="1.0" encoding="utf-8"?> > <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/maven-v4_0_0.xsd > "> > <modelVersion>4.0.0</modelVersion> > <groupId>com.company.url.unknowns</groupId> > <artifactId>IncreasePriority</artifactId> > <packaging>jar</packaging> > <version>0.0.2</version> > <name>IncreasePriority</name> > <parent> > <groupId>com.company.maven.pom</groupId> > <artifactId>WebSecParent</artifactId> > <version>0.0.2</version> > </parent> > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-dependency-plugin</artifactId> > <executions> > <execution> > <id>copy-dependencies</id> > <phase>package</phase> > <goals> > <goal>copy-dependencies</goal> > </goals> > <configuration> > <outputDirectory>/usr/lib/ctch/java/</outputDirectory> > <overWriteReleases>true</overWriteReleases> > <overWriteSnapshots>true</overWriteSnapshots> > <overWriteIfNewer>true</overWriteIfNewer> > </configuration> > </execution> > </executions> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-resources-plugin</artifactId> > <executions> > <execution> > <id>copy-conf</id> > <phase>install</phase> > <goals> > <goal>copy-resources</goal> > </goals> > <configuration> > > <outputDirectory>/etc/ct-urlf-increase-priority/</outputDirectory> > <resources> > <resource> > <directory>src/main/resources</directory> > <filtering>true</filtering> > <includes> > <include>**/*.properties</include> > </includes> > </resource> > </resources> > </configuration> > </execution> > <execution> > <id>copy-cron</id> > <phase>install</phase> > <goals> > <goal>copy-resources</goal> > </goals> > <configuration> > <outputDirectory>/etc/cron.d/</outputDirectory> > <resources> > <resource> > <directory>src/main/resources</directory> > <filtering>true</filtering> > <includes> > <include>**/*.cron</include> > </includes> > </resource> > </resources> > </configuration> > </execution> > </executions> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-jar-plugin</artifactId> > <configuration> > > <outputDirectory>/usr/local/ct-urlf-increase-priority</outputDirectory> > <archive> > <manifest> > > <mainClass>com.company.url.unknowns.IncreasePriority</mainClass> > <addClasspath>true</addClasspath> > <classpathPrefix>/usr/lib/ctch/java/</classpathPrefix> > </manifest> > </archive> > </configuration> > </plugin> > </plugins> > </build> > <dependencies> > <dependency> > <groupId>javax.mail</groupId> > <artifactId>mail</artifactId> > <version>1.4.1</version> > </dependency> > <dependency> > <groupId>com.company.sql</groupId> > <artifactId>DbUtil</artifactId> > <version>0.0.4</version> > </dependency> > </dependencies> > </project> > > * > -- > Eyal Edri >