#yeoman-maven-plugin
Use this plugin to integrate the yeoman build into your maven build.
- npm, bower, grunt and npm-cache(only needed if useNpmCache parameter enabled)
- maven 3
npm install
bower install --no-color
grunt test --no-color
grunt build --no-color
Yeoman application is placed into the yo directory at the top of the project hierarchy.
pom.xml
- src
- main
- java
- webapp
- …
- test
- ..
- yo
package.json
component.json
Gruntfile.js
- app
index.html
...
- test
...
- dist
...
Plugin declaration :
<plugin>
<groupId>com.github.trecloux</groupId>
<artifactId>yeoman-maven-plugin</artifactId>
<version>0.5</version>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
Add the yeoman dist directory to the war file
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webResources>
<resource>
<directory>yo/dist</directory>
</resource>
</webResources>
</configuration>
</plugin>
Configure the clean plugin in order to delete generated directories
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>yo/dist</directory>
</fileset>
<fileset>
<directory>yo/.tmp</directory>
</fileset>
<fileset>
<directory>yo/app/components</directory>
</fileset>
<fileset>
<directory>yo/node_modules</directory>
</fileset>
</filesets>
</configuration>
</plugin>
- Add
bowerVariant
parameter to be able to use an alternative to bower : bower-act (Thanks Thorsten Pohl )
- Add
buildTool
parameter to be able to use an alternative to grunt : gulp thegruntTestArgs
andgruntInstallArgs
were renamed totestArgs
andbuildArgs
. Previous parameters are still usable but deprecated (Thanks Lukas Peleska)
- Add
skipBuild
parameter to skip the grunt build (yo.build.skip
system propery) (Thanks Pete Johanson)
- Execute
grunt test
beforegrunt build
. Tests can be skipped withskipTests
parameter (yo.test.skip
system property) - Rename
gruntInstallArgs
parameter togruntBuildArgs
- Logging executed commands
- Add
skip
parameter to skip the plugin execution (yo.skip
system property) to skip the build (Thanks Brad Sneade) - Add new parameters :
npmInstallArgs
for npm arguments(default value :install
)bowerInstallArgs
for bower arguments (default value :install --no-color
)gruntTestArgs
for grunt build arguments (default value :test --no-color
)gruntInstallArgs
for grunt test arguments (default value :build --no-color
)
- Initial version
This project is licensed under Apache 2.0 License