zoukankan      html  css  js  c++  java
  • (十三)exec-maven-plugin配置及使用

    原文链接:https://www.cnblogs.com/lianshan/p/7358966.html

    背景:

    如果你想在项maven生命周期内,运行一段java代码,或者一段独立的程序,或者说我们所指的预执行,初始化某些值,生成某些不能预先生成的文件。
    那么这样我们就可以使用exec-maven-plugin进行程序的预执行,生成相关文件。
    具体配置如下:

    <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.6.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>java</goal>            <!-- java还是exec-->
                            </goals>
                            <phase>compile</phase>              <!--生命周期-->
                        </execution>
                    </executions>
                    <configuration>
                        <mainClass>com.sf.ucmp2.doclet.Main</mainClass>        <!--程序入口,主类名称-->
                        <arguments>
                            <argument>-encoding</argument>                          <!--相关参数-->
                            <argument>utf-8</argument>
                        </arguments>
                        <classpathScope>compile</classpathScope>
                    </configuration>
                </plugin>
    

      

  • 相关阅读:
    ARC071 简要题解
    ARC070 简要题解
    ARC069 简要题解
    ARC068 简要题解
    ARC067 简要题解
    ARC066 简要题解
    ARC065 简要题解
    长链剖分优化dp三例题
    CF815D Karen and Cards 官方题解翻译
    [九省联考2018] IIIDX 线段树+贪心
  • 原文地址:https://www.cnblogs.com/lvchengda/p/13048237.html
Copyright © 2011-2022 走看看