Executable jar 를 메이븐 exec:exec 로 실행 하기

Executable JAR 빌드 후 메이븐 exec:exec 로 실행하고 싶다면 exec-maven-plugin 을 사용할 수 있다. [code xml]<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.4.0</version>
  <executions>
    <execution>
      <id>default-cli</id>
      <goals>
          <goal>exec</goal>
      </goals>
      <configuration>
        <executable>java</executable>
        <!-- optional -->
        <workingDirectory>/tmp</workingDirectory>
        <arguments>
          <argument>-jar</argument>
          <argument>${basedir}/target/${project.artifactId}-${project.version}.jar</argument>
        </arguments>
      </configuration>                        
    </execution>
  </executions>
</plugin>[/code]

mvn exec:exec 가 아닌 mvn exec:java 로 컴파일 output 디렉토리에서 main class를 바로 실행하고 싶다면 다음과 같이 설정한다.
[code xml]<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.4.0</version>
  <executions>
    <executions>
      <execution>
        <goals>
            <goal>java</goal>
        </goals>
      </execution>
      <configuration>
        <mainClass>com.app.MainClass</mainClass>
        <arguments></arguments>
      </configuration>
    </executions>
  </executions>
</plugin> [/code]
2016/02/18 14:35 2016/02/18 14:35
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다

메이븐으로 원격 디플로이하기

메이븐 플러그인을 통한 빌드 후 원격 디플로이
Tomcat 6
http://stove99.tistory.com/71


Tomcat 7
http://dasida.tistory.com/1055951

2012/06/08 16:30 2012/06/08 16:30
Trackback Address:이 글에는 트랙백을 보낼 수 없습니다