org.fuin.srcgen4j:srcgen4j-maven-plugin

Source code generation for Java (Maven Plugin)

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

org.fuin.srcgen4j
ArtifactId

ArtifactId

srcgen4j-maven-plugin
Last Version

Last Version

0.4.2
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Source code generation for Java (Maven Plugin)
Project Organization

Project Organization

fuin.org (Germany)

Download srcgen4j-maven-plugin

How to add to project

<plugin>
    <groupId>org.fuin.srcgen4j</groupId>
    <artifactId>srcgen4j-maven-plugin</artifactId>
    <version>0.4.2</version>
</plugin>

Dependencies

compile (4)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.5.3
org.apache.maven : maven-project jar 3.0-alpha-2
org.fuin.srcgen4j : srcgen4j-core jar 0.4.2
org.slf4j : slf4j-api jar 1.7.25

Project Modules

There are no modules declared in this project.

srcgen4j-maven

Source code generation for Java (Maven Plugin)

Build Status Coverage Status Maven Central LGPLv3 License Java Development Kit 1.8

What is this?

The project provides a Maven plugin that executes a parse/generate workflow based on the srcgen4j-common/srcgen4j-core projects.

Usage

Simply add the plugin to your project's Maven POM and add configuration an dependencies.

<plugin>
    <groupId>org.fuin.srcgen4j</groupId>
    <artifactId>srcgen4j-maven-plugin</artifactId>
    <version>0.4.2</version>
    <configuration>
        <!-- Default XML config file name can be changed by adding the following:
        <configFile>srcgen4j-config.xml<configFile>
        -->
        <jaxbClassesToBeBound>
          <!-- JAX enabled configuration classes used in "srcgen4j-config.xml" -->
          <param>org.fuin.srcgen4j.core.velocity.VelocityGeneratorConfig</param>
          <param>org.fuin.srcgen4j.core.velocity.ParameterizedTemplateParserConfig</param>
          <param>org.fuin.srcgen4j.core.velocity.ParameterizedTemplateGeneratorConfig</param>
        </jaxbClassesToBeBound>
    </configuration>
    <dependencies>
        <!-- Libraries used for parsing or code generation that are 
             referenced in "srcgen4j-config.xml"-->    
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.7</version>
        </dependency>
    </dependencies>
</plugin>

Example

You can also find an example project here: test-project.

Debugging

To start the generation process in debug mode you can checkout the srcgen4j-maven-app project.

Snapshots

Snapshots can be found on the OSS Sonatype Snapshots Repository.

Add the following to your .m2/settings.xml (section "repositories") to enable snapshots in your Maven build:

<repository>
    <id>sonatype.oss.snapshots</id>
    <name>Sonatype OSS Snapshot Repository</name>
    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
    <releases>
        <enabled>false</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>

An additional entry to the "pluginRepositories" section is also required:

<pluginRepository>
    <id>sonatype.oss.snapshots</id>
    <name>Sonatype OSS Snapshot Repository</name>
    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
    <releases>
        <enabled>false</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</pluginRepository>
org.fuin.srcgen4j

fuin.org

Versions

Version
0.4.2
0.4.0
0.3.0