GithubHelp home page GithubHelp logo

rakesh-kanchalwar / reflections-maven Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ronmamo/reflections-maven

0.0 2.0 0.0 160 KB

Reflections Maven plugin

License: Do What The F*ck You Want To Public License

Java 100.00%

reflections-maven's Introduction

Reflections Maven plugin

#####This project is DISCONTINUED

It is MUCH MUCH easier (and sane) to integrate Reflections into your Maven build using gmavenplus-plugin. That is, using a simple Groovy script to instantiate Reflections as you need, without the hassle of using (and writing) a Maven plugin...

For example:

<plugin>
    <groupId>org.codehaus.gmavenplus</groupId>
    <artifactId>gmavenplus-plugin</artifactId>
    <version>1.5</version>
    <executions>
        <execution>
            <phase>generate-resources</phase>
            <goals>
                <goal>execute</goal>
            </goals>
            <configuration>
                <scripts>
                    <script><![CDATA[
                        new org.reflections.Reflections("f.q.n")
                            .save("${project.build.outputDirectory}/META-INF/reflections/${project.artifactId}-reflections.xml")
                    ]]></script>
                </scripts>
            </configuration>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <!-- use latest version of Reflections -->
            <version>0.9.10</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <!-- any version of Groovy \>= 1.5.0 should work here -->
            <version>2.4.3</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
</plugin>

Later on, when your project is bootstrapping you can let Reflections collect all those resources and re-create that metadata for you, making it available at runtime without re-scanning the classpath:

Reflections reflections =
        isProduction() ? Reflections.collect() : new Reflections("your.package.here");

reflections-maven's People

Contributors

ronmamo avatar

Watchers

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