나는 Maven 프로젝트를 가지고 있으며 webstart-maven-plugin을 통합했다. jnlp가 생성되고 그것을 jetty에 배치하여 테스트하고 싶지만이를 달성하기위한 부두의 목표를 찾지 못했습니다. jnlp를 테스트하는 자동화 된 방법이 있습니까?Maven 및 Webstart 프로젝트 부두를 사용하여 테스트하는 방법?
1
A
답변
1
나는 단지 jnlp 템플릿을 채우고 jar 파일을 복사 할 때까지 잠시 동안 webstart-maven-plugin
을 사용했습니다.
지금, 나는 단지 (들)을 복사하는 정적 (src/main/webapp/applet
에 저장) JNLP 및 maven-dependency-plugin
을 사용하고 있습니다 :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>applet-copy</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>applet.group.id</groupId>
<artifactId>applet-artifact-id</artifactId>
<version>x.y.z</version>
<type>jar</type>
<destFileName>applet.jar</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/web-resources/applet</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
그것은 실제로 복사 애플릿을 target/web-resources/applet
로.
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.9.v20130131</version>
<configuration>
<stopKey>STOP</stopKey>
<stopPort>9999</stopPort>
<scanIntervalSeconds>5</scanIntervalSeconds>
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
<resourceBases>
<resourceBase>${project.build.directory}/web-resources</resourceBase>
</resourceBases>
</webAppConfig>
</configuration>
</plugin>
을 그리고 전쟁에 추가 : 그럼 난 그냥 jetty-maven-plugin
에서 웹 자원으로이 디렉토리를 추가 할 필요가
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<webResources>
<resource>
<directory>${project.build.directory}/web-resources</directory>
</resource>
</webResources>
</configuration>
</plugin>
는 도움이되기를 바랍니다.
그런데 jetty-maven-plugin
구성 on this page에 대한 자세한 정보를 찾을 수 있습니다.