• Maven 打包


    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>
    

      

  • 相关阅读:
    为什么大家都说 SELECT * 效率低?
    一个 Java 方法,最多能定义多少参数?
    牛逼哄哄的布隆过滤器,到底有什么用?
    10w+ Excel 数据导入,怎么优化?
    为什么 wait 方法要在 synchronized 中调用?
    使用Redis存储聊天数据的一种方案(使用lua解决原子性问题)
    Linux下安装redis
    Django Rest Framework组件:解析器JSONParser、FormParser、MultiPartParser、FileUploadParser
    API测试之Postman使用全指南(转载)
    Django Rest Framework组件:序列化与反序列化模块Serializer
  • 原文地址:https://www.cnblogs.com/hylinux/p/8591091.html
Copyright © 2020-2023  润新知