generated from lengors/maven-java-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷 Rework project structure for proper javadoc generation
- Loading branch information
Showing
10 changed files
with
610 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,337 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.github.lengors</groupId> | ||
<artifactId>js2pets-parent</artifactId> | ||
<version>${revision}</version> | ||
</parent> | ||
|
||
<groupId>io.github.lengors</groupId> | ||
<artifactId>js2pets</artifactId> | ||
<version>${revision}</version> | ||
<name>js2pets</name> | ||
<url>https://github.com/lengors/js2pets</url> | ||
<description>Set of extensions and extra functionality for jsonschema2pojos library and plugins.</description> | ||
|
||
<developers> | ||
<developer> | ||
<name>lengors</name> | ||
<email>[email protected]</email> | ||
</developer> | ||
</developers> | ||
|
||
<scm> | ||
<url>https://github.com/lengors/js2pets</url> | ||
</scm> | ||
|
||
<licenses> | ||
<license> | ||
<name>The Unlicense</name> | ||
<url>https://unlicense.org/UNLICENSE</url> | ||
</license> | ||
</licenses> | ||
|
||
<properties> | ||
<!-- Configure maven plugins --> | ||
<maven.install.skip>false</maven.install.skip> | ||
<maven.deploy.skip>false</maven.deploy.skip> | ||
|
||
<!-- Dependency and plugins versions --> | ||
<maven.central-publishing.version>0.5.0</maven.central-publishing.version> | ||
<maven.build-helper.version>3.6.0</maven.build-helper.version> | ||
<maven.checkstyle.version>3.4.0</maven.checkstyle.version> | ||
<maven.compiler.version>3.13.0</maven.compiler.version> | ||
<maven.jacoco.version>0.8.12</maven.jacoco.version> | ||
<maven.source.version>3.3.1</maven.source.version> | ||
<maven.gpg.version>3.2.4</maven.gpg.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-plugin-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jsonschema2pojo</groupId> | ||
<artifactId>jsonschema2pojo-core</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-collections4</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.checkerframework</groupId> | ||
<artifactId>checker-qual</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-junit-jupiter</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
|
||
<!-- Default checkstyle configuration is fine --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<version>${maven.checkstyle.version}</version> | ||
<configuration> | ||
<includeTestSourceDirectory>true</includeTestSourceDirectory> | ||
<configLocation>checkstyle.xml</configLocation> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>${maven.source.version}</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>${maven.build-helper.version}</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.github.lengors</groupId> | ||
<artifactId>js2pets-javadoc</artifactId> | ||
<version>${revision}</version> | ||
</dependency> | ||
</dependencies> | ||
<executions> | ||
<execution> | ||
<id>attach-javadoc</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>attach-artifact</goal> | ||
</goals> | ||
<configuration> | ||
<artifacts> | ||
<artifact> | ||
<file>${project.basedir}/../javadoc/target/js2pets-${revision}-javadoc.jar</file> | ||
<type>jar</type> | ||
<classifier>javadoc</classifier> | ||
</artifact> | ||
</artifacts> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>${maven.gpg.version}</version> | ||
<configuration> | ||
<keyname>${MAVEN_GPG_KEYNAME}</keyname> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.sonatype.central</groupId> | ||
<artifactId>central-publishing-maven-plugin</artifactId> | ||
<version>${maven.central-publishing.version}</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<publishingServerId>central</publishingServerId> | ||
<autoPublish>true</autoPublish> | ||
<waitUntil>published</waitUntil> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
<version>${maven.jacoco.version}</version> | ||
<executions> | ||
<execution> | ||
<id>prepare-agent</id> | ||
<goals> | ||
<goal>prepare-agent</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>report</id> | ||
<goals> | ||
<goal>report</goal> | ||
</goals> | ||
<configuration> | ||
<formats> | ||
<format>XML</format> | ||
</formats> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>checkerframework</id> | ||
<activation> | ||
<jdk>[1.8,)</jdk> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${maven.compiler.version}</version> | ||
<configuration> | ||
<fork>true</fork> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>${maven.lombok.version}</version> | ||
</path> | ||
<path> | ||
<groupId>org.checkerframework</groupId> | ||
<artifactId>checker</artifactId> | ||
<version>${maven.checkerframework.version}</version> | ||
</path> | ||
</annotationProcessorPaths> | ||
<annotationProcessors> | ||
<annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor> | ||
<annotationProcessor>org.checkerframework.checker.resourceleak.ResourceLeakChecker</annotationProcessor> | ||
<annotationProcessor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor</annotationProcessor> | ||
<annotationProcessor>lombok.launch.AnnotationProcessorHider$ClaimingProcessor</annotationProcessor> | ||
</annotationProcessors> | ||
<compilerArgs> | ||
<arg>-Xmaxerrs</arg> | ||
<arg>10000</arg> | ||
<arg>-Xmaxwarns</arg> | ||
<arg>10000</arg> | ||
</compilerArgs> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
|
||
<profile> | ||
<id>checkerframework-jdk8</id> | ||
<activation> | ||
<jdk>1.8</jdk> | ||
</activation> | ||
<!-- using github.com/google/error-prone-javac is required when running on JDK 8 --> | ||
<properties> | ||
<javac.version>9+181-r4173-1</javac.version> | ||
</properties> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<!-- This plugin execution will copy the com.google.errorprone:javac jar file to your | ||
project’s output directory without adding that jar as an explicit dependency. --> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
<phase>process-sources</phase> | ||
<configuration> | ||
<artifact>com.google.errorprone:javac:${javac.version}:jar</artifact> | ||
<outputDirectory>${project.build.directory}/javac</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<compilerArgs combine.children="append"> | ||
<arg>-J-Xbootclasspath/p:${project.build.directory}/javac/javac-${javac.version}.jar</arg> | ||
</compilerArgs> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
|
||
<profile> | ||
<id>checkerframework-jdk9orlater</id> | ||
<activation> | ||
<jdk>[9,)</jdk> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<compilerArgs combine.children="append"> | ||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg> | ||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg> | ||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg> | ||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg> | ||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg> | ||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg> | ||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg> | ||
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg> | ||
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg> | ||
</compilerArgs> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
19 changes: 19 additions & 0 deletions
19
core/src/main/java/io/github/lengors/js2pets/annotators/Js2petsAnnotator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.github.lengors.js2pets.annotators; | ||
|
||
import com.sun.codemodel.JMethod; | ||
|
||
/** | ||
* Extension for jsonschema2pojo's annotator that allows to listen to | ||
* constructor generation and annotate it. | ||
* | ||
* @author lengors | ||
*/ | ||
public interface Js2petsAnnotator extends org.jsonschema2pojo.Annotator { | ||
|
||
/** | ||
* Listener to constructor generation for annotations. | ||
* | ||
* @param constructor The generated constructor. | ||
*/ | ||
void constructor(JMethod constructor); | ||
} |
6 changes: 6 additions & 0 deletions
6
core/src/main/java/io/github/lengors/js2pets/annotators/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* Set of annotators for jsonschema2pojo with added functionality. | ||
* | ||
* @author lengors | ||
*/ | ||
package io.github.lengors.js2pets.annotators; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lombok.addLombokGeneratedAnnotation = true |
Oops, something went wrong.