Maven命令使用
评论(0) 浏览量(524)

maven中央库注册地址:https://issues.sonatype.org/secure/Signup!default.jspa

maven创建Issue地址:https://issues.sonatype.org/secure/CreateIssue.jspa?issuetype=21&pid=10134

maven中央库发布,查询地址:https://oss.sonatype.org/


tomcat插件运行:tomcat:run

创建引用依赖包:dependency:copy-dependencies

清空maven构建:maven clean

构建maven项目:maven install

生成源码包:maven source:jar

查看maven依赖结构:dependency:tree

生成bundle文件:mvn clean javadoc:jar source:jar repository:bundle-create  

需要加入两个插件:

<!-- Source -->
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-source-plugin</artifactId>
	<version>2.4</version>
	<executions>
		<execution>
			<phase>package</phase>
			<goals>
				<goal>jar-no-fork</goal>
			</goals>
		</execution>
	</executions>
</plugin>
<!-- Javadoc -->
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-javadoc-plugin</artifactId>
	<version>2.10.3</version>
	<executions>
		<execution>
			<phase>package</phase>
			<goals>
				<goal>jar</goal>
			</goals>
		</execution>
	</executions>
</plugin>


国内可以使用阿里云镜像库 

setting.xml修改

<mirror>
    <id>alimaven</id>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    <mirrorOf>central</mirrorOf>
</mirror>


没有登录不能评论