大漠驼铃

置身浩瀚的沙漠,方向最为重要,希望此blog能向大漠驼铃一样,给我方向和指引。
Java,Php,Shell,Python,服务器运维,大数据,SEO, 网站开发、运维,云服务技术支持,IM服务供应商, FreeSwitch搭建,技术支持等. 技术讨论QQ群:428622099
随笔 - 238, 文章 - 3, 评论 - 117, 引用 - 0
数据加载中……

MAVEN命令不断完善中。。。

MAVEN命令
http://www.mvnrepository.com  #中央仓库

mvn eclipse:eclipse  #生成eclipse配置文件
mvn clean package #打包项目
mvn clean install #安装成本地库
mvn clean install -DoutputDirectory=lib -Dsilent=true -Pmodules
mvn clean install -Pmodules #安装指定的模块到本地仓库
mvn jetty:run #运行jetty
mvn tomcat7:run #运行tomcat




mvn compile #编译
mvn test #运行测试




下载源码和文档
mvn -DdownloadJavadocs=true eclipse:eclipse
mvn -DdownloadSources=true eclipse:eclipse
mvn archetype:generate -DgroupId=cn.ourwill.maven -DartifactId=hello-world -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false   #mvn 创建项目

mvn install -Dmaven.test.skip=true#不执行测试




环境分离
<profiles>
        <profile>
            <id>mine</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <filters>
                    <filter>src/main/filters/filter-mine.properties</filter>
                </filters>
            </build>
        </profile>
        <profile>
            <id>test</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <filters>
                    <filter>src/main/filters/filter-test.properties</filter>
                </filters>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <filters>
                    <filter>src/main/filters/filter-release.properties</filter>
                </filters>
            </build>
        </profile>
    </profiles>

mvn install -Denvironment.type=prod  #使用不同的环境,生产环境,开发环境,测试环境  

mvn install:install-file -Dfile=Sample.jar -DgroupId=uniquesample -DartifactId=sample_jar -Dversion=2.1.3b2 -Dpackaging=jar -DgeneratePom=true  #安装到本地

mvn dependency:tree #依赖树
mvn dependencies: copy-dependency #复制依赖的jar包



生成java-doc
mvn javadoc:javadoc
mvn javadoc:jar
mvn javadoc:aggregate
mvn javadoc:aggregate-jar
mvn javadoc:test-javadoc
mvn javadoc:test-jar
mvn javadoc:test-aggregate
mvn javadoc:test-aggregate-jar



生成jar
mvn jar:jar
mvn jar:test-jar



说明文档
1. mvn help:describe -Dplugin=eclipse -Dfull > eclipse-help.txt
2. mvn help:describe -Dplugin=help -Dfull > help-help.txt
3. mvn help:describe -Dplugin=dependency -Dfull > dependency-help.txt
4. mvn help:describe -Dcmd=compiler:compile –Ddetail
5. mvn help:describe -Dplugin=org.apache.maven.plugins:maven-compiler-plugin

GRADLE命令

posted on 2016-02-15 17:13 草原上的骆驼 阅读(1131) 评论(0)  编辑  收藏 所属分类: JAVA框架


只有注册用户登录后才能发表评论。


网站导航: