Git Product home page Git Product logo

yeoman-maven-plugin's Introduction

#yeoman-maven-plugin

Use this plugin to integrate the yeoman build into your maven build.

Prerequisites

  • npm, bower, grunt and npm-cache(only needed if useNpmCache parameter enabled)
  • maven 3

Launched commands (default setup)

  • npm install
  • bower install --no-color
  • grunt test --no-color
  • grunt build --no-color

Default layout

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
     ...

Usage

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>

Changelog

V0.5 2015-08-19

  • Add bowerVariant parameter to be able to use an alternative to bower : bower-act (Thanks Thorsten Pohl )

V0.4 2015-02-15

  • Add buildTool parameter to be able to use an alternative to grunt : gulp the gruntTestArgs and gruntInstallArgs were renamed to testArgs and buildArgs. Previous parameters are still usable but deprecated (Thanks Lukas Peleska)

V0.3 2015-02-03

  • Add skipBuild parameter to skip the grunt build (yo.build.skip system propery) (Thanks Pete Johanson)

V0.2 2014-03-17

  • Execute grunt test before grunt build. Tests can be skipped with skipTests parameter (yo.test.skip system property)
  • Rename gruntInstallArgs parameter to gruntBuildArgs
  • 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)

V0.1 2013-04-25

  • Initial version

License

This project is licensed under Apache 2.0 License

yeoman-maven-plugin's People

Contributors

c0nscience avatar jpjcjbr avatar luaks avatar mscpetejohanson avatar rko1980 avatar tpohl avatar trecloux avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.