2013-05-16 6 views

답변

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에 대한 자세한 정보를 찾을 수 있습니다.