标签:
<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.test</groupId> <artifactId>port</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>port</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.3.2</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> <showDeprecation>true</showDeprecation> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.5.4</version> <executions> <execution> <goals> <goal>attached</goal> </goals> <phase>package</phase> <configuration> <finalName>port</finalName> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>com.test.port.Launcher</mainClass> </manifest> </archive> </configuration> </execution> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <finalName>port-${maven.build.timestamp}</finalName> <appendAssemblyId>false</appendAssemblyId> <descriptors> <descriptor>assembly.xml</descriptor> </descriptors> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> <id>zip</id> <formats> <format>zip</format> </formats> <fileSets> <fileSet> <directory>${basedir}/bin</directory> <outputDirectory>/</outputDirectory> <includes> <include>**/*</include> </includes> </fileSet> <fileSet> <directory>${basedir}/target</directory> <outputDirectory>/</outputDirectory> <includes> <include>*-jar-with-dependencies.jar</include> </includes> </fileSet> </fileSets> </assembly>
port-yyyy-MM-dd.zip
|-- Furla.xlsx // bin目录下文件
|-- Instrument.txt // bin目录下文件
\-- port-jar-with-dependencies.jar
标签:
原文地址:http://my.oschina.net/dexterman/blog/530690