나는 Maven과 frontend-maven-plugin (com.github.eirslett)을 사용하는 프로젝트를 가지고있다.빌드 폴더에만 maven 실행을 대상으로 지정하는 방법은 무엇입니까?
나는 플러그인 실행에서 mvn install
모든 실행을 실행으로, 그들은 실제 프론트 엔드 코드 인 src/main/webapp
루트에서 node_modules
, bower_components
및 node
폴더를 만들 수 있습니다.
것은 내가 아니라 그것은 자바 라이브러리 않는 것처럼 아닌 버전 응용 프로그램 코드에서 build
디렉토리에 생성 된 패키지를 실행하고 war
사람들을 만들 mvn install
에 원이다.
달성 할 수있는 방법이 있습니까?
<build>
<directory>build</directory>
<outputDirectory>build/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>UTF-8</encoding>
<webResources>
<resource>
<filtering>true</filtering>
<directory>src/main/webapp</directory>
<includes>
<include>WEB-INF/weblogic.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
...
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>0.0.20</version>
<configuration>
<workingDirectory>src/main/webapp</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v0.10.34</nodeVersion>
<npmVersion>2.1.11</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>bower install</id>
<goals>
<goal>bower</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>grunt build</id>
<goals>
<goal>grunt</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
</build>
당신은 혼자이와 있습니다. 수락을 기다리는 풀 요청이있는 공개 문제 https://github.com/eirslett/frontend-maven-plugin/issues/18이 있습니다. https://github.com/cfmobile/frontend-maven-plugin/commit/52b7b28d1b8fd449f63ced3d0ed792fde22c041b – xverges
티켓이 [닫혀 있음] (https://github.com/eirslett/frontend-maven-plugin/issues/18#ref-commit- c6a01c1) witn [ 구성 매개 변수] (https://github.com/eirslett/frontend-maven-plugin/pull/234) –
chivorotkiv