Java Merger Maven Plugin

Merger of Java classes or interfaces

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

ch.cern.eam
ArtifactId

ArtifactId

javamerger-maven-plugin
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Java Merger Maven Plugin
Merger of Java classes or interfaces
Project URL

Project URL

https://github.com/cern-eam/javamerger-maven-plugin
Project Organization

Project Organization

CERN European Organization for Nuclear Research
Source Code Management

Source Code Management

https://github.com/cern-eam/javamerger-maven-plugin

Download javamerger-maven-plugin

How to add to project

<plugin>
    <groupId>ch.cern.eam</groupId>
    <artifactId>javamerger-maven-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

Dependencies

provided (4)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.3.9
org.apache.maven : maven-core jar 3.3.9
org.apache.maven : maven-artifact jar 3.3.9
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5.1

test (3)

Group / Artifact Type Version
org.apache.maven : maven-compat jar 3.3.9
junit : junit jar 4.12
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 3.3.0

Project Modules

There are no modules declared in this project.

Java Merger

This project is a Maven Plugin that allows you to merge Java classes/interfaces during your project build.

This project was initially created to merge several JAX-WS generated classes into a single one, for performance reasons. Yet, it is generic and could be reused for other purposes.

Usage

<plugin>
    <groupId>ch.cern.eam</groupId>
    <artifactId>javamerger-maven-plugin</artifactId>
    <version>1.0.0</version>
    <executions>
        <execution>
            <phase>generate-sources</phase>
            <goals>
                <goal>merge</goal>
            </goals>
            <configuration>
                <sourceFiles>
                    <sourceFile>${project.build.directory}/generated-sources/wsimport/ch/cern/eam/example/Class1.java</sourceFile>
                    <sourceFile>${project.build.directory}/generated-sources/wsimport/ch/cern/eam/example/Class2.java</sourceFile>
                </sourceFiles>
                <destinationPackage>ch.cern.eam.example</destinationPackage>
                <classAnnotations>
                    <classAnnotation>@WebService(name = "InforWS", targetNamespace = "http://wsdls.datastream.net/WS")</classAnnotation>
                    <classAnnotation>@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)</classAnnotation>
                </classAnnotations>
                <additionalImports>
                    <additionalImport>import javax.jws.WebService;</additionalImport>
                    <additionalImport>import javax.jws.soap.SOAPBinding;</additionalImport>
                </additionalImports>
                <className>MergedClass</className>
                <type>class</type>
            </configuration>
        </execution>
    </executions>
</plugin>

Options

Option Description
sourceFiles List of source files to be merged
destinationPackage Package of the generated class/interface
className Name of the generated class/interface
classAnnotations Annotations to add to the generated class/interface
additionalImports Imports to add to the generated class/interface
type Type of the generated file. Can be "class" or "interface"

License

This software is published under the GNU General Public License v3.0 or later.

ch.cern.eam

CERN EAM

CERN Open Source Components for Infor EAM

Versions

Version
1.0.0