fragment-maven-plugin

Plugin for split pom.xml to other xml for plugin executed by mojo-executer

License

License

Categories

Categories

Maven Build Tools Net
GroupId

GroupId

com.github.yracnet.maven
ArtifactId

ArtifactId

fragment-maven-plugin
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

fragment-maven-plugin
Plugin for split pom.xml to other xml for plugin executed by mojo-executer
Project URL

Project URL

https://github.com/yracnet/fragment-maven-plugin
Source Code Management

Source Code Management

http://github.com/yracnet/fragment-maven-plugin/tree/master

Download fragment-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.yracnet.maven</groupId>
    <artifactId>fragment-maven-plugin</artifactId>
    <version>0.1.1</version>
</plugin>

Dependencies

compile (2)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.3.9
org.twdata.maven : mojo-executor jar 2.2.0

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5

Project Modules

There are no modules declared in this project.

Fragment Maven Plugin

You can split the pom.xml in other xml (plugin-fragment) each plugin that used in your project.

The fragment-maven-plugin execute of configuration declared. The xml is like to "project>build>plugins>plugin"

Configuration

Include the fragment-maven-plugin in your project and declare another fragment (xml file) for the plugin you want to run

pom.xml

<build>
 ...
 <plugins>
  ...
  <plugin>
    <groupId>com.github.yracnet.maven</groupId>
    <artifactId>fragment-maven-plugin</artifactId>
    <version>0.1.1-SNAPSHOT</version>
    <executions>
     <execution>
      <phase>process-resources</phase>
      <goals>
       <goal>process</goal>       
      </goals>
     </execution>
    </executions>
    <configuration>
     <skip>false</skip>
     <fragments>
      <fragment>${basedir}/plugin/formatter.xml</fragment>
      .... More xml
     </fragments>
    </configuration>
   </plugin>
      ...
  </plugins>
    ...
 </build>

plugin/formatter.xml

<?xml version="1.0" encoding="UTF-8"?>
<plugin>
 <groupId>net.revelc.code</groupId>
 <artifactId>formatter-maven-plugin</artifactId>
 <version>0.5.2</version>
 <executions>
  <execution>
   <goals>
    <goal>format</goal>
   </goals>
  </execution>
 </executions>
 <configuration>
  <lineEnding>CRLF</lineEnding>
  <encoding>UTF-8</encoding>
 </configuration>
</plugin>

Contact

If you have any question, send a email to [email protected].

Versions

Version
0.1.1