<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 88, comments - 3, trackbacks - 0, articles - 0
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    一些項目中用到的mvn例子

    Posted on 2013-01-10 13:33 Milo的海域 閱讀(1288) 評論(0)  編輯  收藏 所屬分類: Java 、Skills
    mvn 執行外部命令
    命令行模式
    mvn exec:exec -Dexec.executable=sh -Dexec.workingdir=./bin -Dexec.args=hello.sh

    配置文件形式
                            <plugin>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>exec-maven-plugin</artifactId>
                                    <executions>
                                            <execution>
                                                    <id>test-exec</id>
                                                    <phase>initialize</phase>
                                                    <configuration>
                                                            <executable>sh</executable>
                                                            <workingDirectory>./bin</workingDirectory>
                                                            <arguments>
                                                                    <argument>hello.sh</argument>
                                                            </arguments>
                                                    </configuration>
                                                    <goals>
                                                            <goal>exec</goal>
                                                    </goals>
                                            </execution>
                                    </executions>
                            </plugin>

    mvn 生成java項目
    生成骨架
    mvn archetype:generate -DgroupId=com.abc.product -DartifactId=product -DpackageName=com.abc.product -DarchetypeArtifactId=maven-archetype-quickstart

    轉成eclipse能識別的java 項目
    mvn eclipse:eclipse
    導入eclipse 然后coding

    mvn進行單元測試
                            <plugin>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-surefire-plugin</artifactId>
                                    <version>
    2.12.4</version>
                                    <configuration>
                                            <forkMode>pertest</forkMode>
                                            <excludes>
                                                    <exclude>**/perftest/*.java</exclude>
                                            </excludes>
                                            <systemProperties>
                                                    <property>
                                                            <name>log4j.configuration</name>
                                                            <value>target/test-classes/log4j.properties</value>
                                                    </property>
                                            </systemProperties>
                                    </configuration>
                            </plugin>

    mvn進行code coverage統計
      <reporting>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>emma-maven-plugin</artifactId>
            <version>1.0-alpha-3</version>
            <inherited>true</inherited>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>surefire-report-maven-plugin</artifactId>
            <inherited>true</inherited>
          </plugin>
        </plugins>
      </reporting>

    mvn生成javadoc
                            <plugin>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-javadoc-plugin</artifactId>
                                    <version>
    2.9</version>
                                    <configuration>
                                            <show>private</show>
                                    </configuration>
                                    <executions>
                                            <execution>
                                                    <id>attach-javadocs</id>
                                                    <goals>
                                                            <goal>javadoc</goal>
                                                            <goal>test-javadoc</goal>
                                                    </goals>
                                                    <phase>site</phase>
                                            </execution>
                                    </executions>
                            </plugin>

    主站蜘蛛池模板: 亚洲最大成人网色| 国产精品免费久久久久影院 | 中国在线观看免费的www| 理论亚洲区美一区二区三区| 亚洲性猛交xx乱| 亚洲精品美女久久久久9999| 亚洲一区免费观看| 久久综合九九亚洲一区| 久热综合在线亚洲精品| 久久久久亚洲精品美女| 亚洲AV人无码激艳猛片| 亚洲成AV人在线播放无码| 国产AV无码专区亚洲Av| 亚洲成AV人在线播放无码| 亚洲男人的天堂在线播放| 中文字幕亚洲精品资源网| 亚洲图片激情小说| 亚洲午夜精品一区二区麻豆| 日韩国产欧美亚洲v片| 日韩亚洲人成在线综合| 日韩精品无码免费视频| aaa毛片免费观看| 18禁超污无遮挡无码免费网站 | 色偷偷尼玛图亚洲综合| 成人a毛片视频免费看| 97国免费在线视频| 99国产精品视频免费观看| 亚洲一级毛片免费看| 永久免费毛片在线播放| 日韩激情淫片免费看| 国产一区二区三区免费视频| 国产成人毛片亚洲精品| 亚洲国产精品国自产电影| 亚洲五月综合网色九月色| 国产成人精品亚洲一区| 成av免费大片黄在线观看| 99久久免费精品视频| 成人男女网18免费视频| 亚洲精品第一国产综合境外资源| 亚洲av永久无码精品漫画| 亚洲一区二区三区在线网站|