anselm
anselm

Reputation: 852

Automatically build maven plugins

Can Maven automatically build the required plugins from my source? Instead of having to build and upload them manually before I build the application, I would like to build everything from scratch in one go without a repository server.

Guess I could make a dependency to the plugin artifact and add it as module, so it would be build like any other module. But I would have to specify it as dependency for any other module to make sure it is built first.

Upvotes: 2

Views: 77

Answers (2)

Puce
Puce

Reputation: 38132

Listing the plugin as a module in a multi-module project should be enough.

Upvotes: 1

Guess I could make a dependency to the plugin artifact and add it as module, so it would be build like any other module. But I would have to specify it as dependency for any other module to make sure it is built first.

There is no real other way to achieve this to guarantee the order of compilation (which is necessary for your code). The solution you are suggesting is the right way to proceed considering your automation objectives.

During the building process, the first artifacts will be installed in your local repository and become available for other modules to compile.

Upvotes: 1

Related Questions