assembly文件
<assembly> <id>bin</id> <formats> <format>dir</format> </formats> <dependencySets> <dependencySet> <useProjectArtifact>false</useProjectArtifact> <outputDirectory>/lib</outputDirectory> </dependencySet> </dependencySets> <fileSets> <fileSet> <directory>data</directory> <outputDirectory>/data</outputDirectory> </fileSet> <fileSet> <directory>config</directory> <outputDirectory>/config</outputDirectory> </fileSet> <fileSet> <directory>driver</directory> <outputDirectory>/driver</outputDirectory> </fileSet> <fileSet> <directory>target/</directory> <outputDirectory>/</outputDirectory> <includes> <include>*.jar</include> </includes> </fileSet> <fileSet> <outputDirectory>/</outputDirectory> <includes> <include>*.bat</include> </includes> </fileSet> </fileSets> </assembly>
pom文件
<build> <finalName>${project.artifactId}</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.10.4</version> <configuration> <reportOutputDirectory>./WorkInfo</reportOutputDirectory> <destDir>SeleniumJavaDoc</destDir> <doctitle>MDC Selenium APIs</doctitle> <subpackages>com.moodys.atom.common:com.moodys.atom.constant:com.moodys.atom.entity:com.moodys.atom.enums:com.moodys.atom.event:com.moodys.atom.exception:com.moodys.atom.lib</subpackages> <tags> <tag> <name>author</name> <placement>a</placement> <head>author: </head> </tag> </tags> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.3.2</version> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass>com.moodys.atom.main.App</mainClass> </manifest> </archive> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.2.1</version> <configuration> <finalName>${artifactId}</finalName> <descriptors> <descriptor>config/assembly.xml</descriptor> </descriptors> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.14.1</version> <configuration> <encoding>UTF-8</encoding> <inputEncoding>UTF-8</inputEncoding> <outputEncoding>UTF-8</outputEncoding> <argLine>-Xms256m -Xmx512m -XX:MaxPermSize=128m -ea -Dfile.encoding=UTF-8</argLine> </configuration> </plugin> </plugins> <resources> <resource> <targetPath>.</targetPath> <directory>src/main/resources</directory> </resource> </resources> </build>