• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

fizzed/maven-plugins: Collection of Maven plugins useful for gettin 'er done ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

fizzed/maven-plugins

开源软件地址(OpenSource Url):

https://github.com/fizzed/maven-plugins

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

Maven Plugins by Fizzed Build Status

Overview

Collection of Maven plugins useful for gettin 'er done.

Watcher (fizzed-watcher-maven-plugin)

Ever wish Maven could run a specific command if any files in your project change? Some IDEs have their own features to do X if a file changes, but they usually don't take your full Maven project file into account. Problem finally solved with the Watcher Plugin for Maven. Add to your Maven project file and fire it up in a new shell. Maven will continuously and recursively watch any number of configured directories and then execute a series of goals if a file change is detected. Just like if you typed it on the command-line! We use it at Fizzed across a bunch of projects, but mainly our web projects -- where we want a full compile run any time our Java code, resources, or templates change. Works especially well from a project parent to watch any of your sub modules too.

To assist in using this plugin to trigger other workflow/plugins, v1.0.6 added a feature to "touch" a file upon successful execution of the maven goal(s).

To use add the following to your POM:

<build>
    <plugins>
        ...
        <plugin>
            <groupId>com.fizzed</groupId>
            <artifactId>fizzed-watcher-maven-plugin</artifactId>
            <version>1.0.6</version>
            <configuration>
                <touchFile>target/classes/watcher.txt</touchFile>
                <watches>
                    <watch>
                        <directory>core/src/main/java</directory>
                    </watch>
                    <watch>
                        <directory>ninja/src/main/java</directory>
                    </watch>
                </watches>
                <goals>
                    <goal>compile</goal>
                    <goal>process-classes</goal>
                </goals>
                <profiles>
                    <profile>optional-profile-to-activate</profile>
                </profiles>
            </configuration>
        </plugin>
        ...
    </plugins>
</build>

Each watch entry may also contain include and exclude properties as well as enabling/disabling of recursively watching a directory. Here is an example of watching a directory, but excluding files with a suffix of *.html.

<watch>
    <directory>src/main/java</directory>
    <exclude>*.html</exclude>
</watch>

You may add any number of exclude and include entries. The recursive property can be set to true/false to disable/enable recursively watching a directory.

By default this maven plugin does NOT attach to a lifecycle -- since it is essentially a daemon that runs forever. Usually, you'll run this in a separate shell and run via:

mvn fizzed-watcher:run

Versionizer (fizzed-versionizer-maven-plugin)

Maven plugin that generates a Java source file containing artifact version info. This is compiled and included with the final artifact. An alternative to using Jar manifest files for extracting version info from a library. The directory the file is output to is also added to your project as a directory containing Java sources (and will be automatically picked up during the compile phase).

To use add the following to your POM:

<build>
    <plugins>
        ...
        <plugin>
            <groupId>com.fizzed</groupId>
            <artifactId>fizzed-versionizer-maven-plugin</artifactId>
            <version>1.0.6</version>
            <executions>
                <execution>
                    <id>generate-version-class</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <javaPackage>com.fizzed.examples.helloworld</javaPackage>
                    </configuration>
                </execution>
            </executions> 
        </plugin>
        ...
    </plugins>
</build>

By default this will generate a Version.java source file in:

${project.build.directory}/generated-sources/versionizer

Play (fizzed-play-maven-plugin)

Maven plugin that does a best-effort compile of PlayFramework 2.x templates (file.scala.html) into a Java source file. This plugin is primarily a hack to make Netbeans function to code complete PlayFramework projects using a pom.xml file.

Templates are generated to ${project.build.directory}/generated-sources/play-templates

To use add the following to your POM:

<build>
    <plugins>
        ...
        <plugin>
            <groupId>com.fizzed</groupId>
            <artifactId>fizzed-play-maven-plugin</artifactId>
            <version>1.0.6</version>
            <executions>
                <execution>
                    <id>best-effort-play-template-compiler</id>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>template-compile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        ...
    </plugins>
</build>

License

Copyright (C) 2015 Fizzed, Inc.

This work is licensed under the Apache License, Version 2.0. See LICENSE for details.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap