Skip to content

A maven plugin that enables the usage of spring libraries in the development of other maven plugins

Notifications You must be signed in to change notification settings

HomeOfTheWizard/spring-bridge-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central Reproducible Builds CI Passing

Spring Bridge Maven Plugin

A plugin that helps other plugins/extensions to use spring libraries.
It builds the spring context for you at compile time and inject your beans into maven at runtime so you can use them in your Mojos.

Documentation

You need to add this plugin in the pom.xml of your 'under development' plugin. Like so:

<dependencies>
    <!-- HERE -->
    <dependency>
        <groupId>com.homeofthewizard</groupId>
        <artifactId>spring-bridge-maven-plugin</artifactId>
        <version>1.0.0-alpha</version>
    </dependency>
    
    <!-- some spring library I want to use in my plugin's mojo -->
    <dependency>
        <groupId>org.springframework.foo</groupId>
        <artifactId>spring-bar-lib</artifactId>
        <version>x.x.x</version>
    </dependency>
</dependencies>

...

<build>
    <plugins>
        <!-- HERE -->
        <plugin>
            <groupId>com.homeofthewizard</groupId>
            <artifactId>spring-bridge-maven-plugin</artifactId>
            <version>1.0.0-alpha</version>
            <executions>
                <execution>
                    <id>generate</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <contextConfigClasses>
                    <contextConfigClass>org.springframework.foo.bar.config.SomeBeansConfiguration</contextConfigClass>
                </contextConfigClasses>
            </configuration>
        </plugin>
    </plugins>
</build>

You can now use the beans created directly in your Mojo !
More information can be found here.

Quick building

You will need Java 17+. Then simply run:
mvnw clean package

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

About

A maven plugin that enables the usage of spring libraries in the development of other maven plugins

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages