<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的海域 閱讀(1289) 評論(0)  編輯  收藏 所屬分類: JavaSkills
    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>

    主站蜘蛛池模板: 亚洲美女精品视频| 亚洲国产精品自在在线观看| 国产成+人+综合+亚洲专| 91老湿机福利免费体验| 综合自拍亚洲综合图不卡区| 91精品免费在线观看| 亚洲综合偷自成人网第页色| 成年人免费的视频| 亚洲精品综合在线影院| 精品国产免费观看一区| 未满十八私人高清免费影院| 国产精品亚洲mnbav网站| a视频在线免费观看| 午夜影视日本亚洲欧洲精品一区| 在线观看免费视频资源| 亚洲中文字幕无码中文字| 无码人妻精品一二三区免费| 久久久久亚洲精品无码网址色欲 | 亚洲国产精品毛片av不卡在线| 国产精品亚洲精品久久精品 | 国产亚洲A∨片在线观看| 98精品全国免费观看视频| 精品亚洲AV无码一区二区| 精品国产免费一区二区| 91免费国产视频| 亚洲春黄在线观看| 国产男女猛烈无遮挡免费视频网站| xvideos永久免费入口| 亚洲AV日韩AV永久无码绿巨人| 国产成人免费在线| 国产产在线精品亚洲AAVV| 国产亚洲高清不卡在线观看| 91精品免费在线观看| 免费大片av手机看片| 久久亚洲国产伦理| 性一交一乱一视频免费看| 美女被免费网站91色| 亚洲第一男人天堂| 亚洲人成人网站色www| 在线视频免费观看高清| 可以免费看黄视频的网站|