Merge pull request #98 from kemitix/extract-tiles

Extract tiles
This commit is contained in:
Paul Campbell 2017-12-30 17:56:55 +00:00 committed by GitHub
commit fc65352e57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 1480 additions and 384 deletions

View file

@ -1,6 +1,12 @@
CHANGELOG CHANGELOG
========= =========
5.0.0
-----
* [BREAKING] Split most configuration out into `kemitix-maven-tiles`
* [BREAKING] No longer provide lombok as a dependency
4.0.0 4.0.0
----- -----

266
README.md
View file

@ -1,54 +1,129 @@
KEMITIX-PARENT KEMITIX-PARENT
============== ==============
This Maven Parent POM several preconfigured plugins. * `kemitix-parent`
* `kemitix-maven-tiles`
## Parent
A parent POM for my own personal projects.
### Usage ### Usage
#### Maven ```xml
<project>
<parent> <parent>
<groupId>net.kemitix</groupId> <groupId>net.kemitix</groupId>
<artifactId>kemitix-parent</artifactId> <artifactId>kemitix-parent</artifactId>
<version>RELEASE</version> <version>RELEASE</version>
</parent> </parent>
```
## Versions ### Contents
If you want to override the version or configuration values of any of the The POM defines the following items:
plugins configured by this parent, you can set the following properties to the
desired value.
* project.build.sourceEncoding * `issueManagement`
* project.reporting.outputEncoding * `scm`
* kemitix.build.directory * `url`
* kemitix-quality-maven-plugin.version * `inceptionYear`
* lombok.version * `licenses`
* maven-javadoc-plugin.version * `developers`
* maven-source-plugin.version * `distributionManagement`
* maven-gpg-plugin.version
* maven-deploy-plugin.version
* maven-compiler-plugin.version
* maven-surefire-plugin.version
* maven-failsafe-plugin.version
* maven-jxr-plugin.version
* java.version
* versions.version
* coveralls-maven-plugin.version
## Kemitix Quality The POM sets the following properties:
The [kemitix-quality-maven-plugin](https://github.com/kemitix/kemitix-quality-maven-plugin) * `project.reporting.outputEncoding` as `UTF-8`
provides several preconfigured quality related plugins. * `java.version` as `1.8`
N.B. The Kemitix Quality plugin required 100% code instruction coverage and mutation ratio. See the project page for details of adjusting these levels if needed. ## Tiles
## Maven Compiler Plugin Maven Tiles for preconfigured plugins. These can be used independently of the `kemitix-parent` POM.
The [Maven Compiler Plugin](https://maven.apache.org/plugins/maven-compiler-plugin/) ### Usage
compiles your sources.
### Configuration ```xml
<project>
<properties>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<kemitix-tiles.version>0.1.0-SNAPSHOT</kemitix-tiles.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<tiles>
<tile>net.kemitix.tiles:all-tiles:${kemitix-tiles.version}</tile>
<!-- or -->
<tile>net.kemitix.tiles:maven-plugins-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:enforcer-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:compiler-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:checkstyle-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:huntbugs-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:pmd-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:digraph-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:testing-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:coverage-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:pitest-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:release-tile:${kemitix-tiles.version}</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
```
### Properties
If you want to override the version or configuration values of any of the plugins configured by the tiles, you can set the following properties to the desired value.
* `project.build.sourceEncoding`
* `maven-javadoc-plugin.version`
* `maven-source-plugin.version`
* `maven-gpg-plugin.version`
* `maven-deploy-plugin.version`
* `maven-compiler-plugin.version`
* `maven-surefire-plugin.version`
* `maven-failsafe-plugin.version`
* `maven-jxr-plugin.version`
* `java.version`
* `versions.version`
* `coveralls-maven-plugin.version`
### Maven Plugins Tile
Sets updated versions for the following `org.apache.maven.plugins`:
* `maven-clean-plugin`
* `maven-install-plugin`
* `maven-site-plugin`
Adds an updated version of the `org.codehaus.mojo:versions-maven-plugin` plugin.
#### Maven JXR Plugin
The [Maven JXR Plugin](http://maven.apache.org/jxr/maven-jxr-plugin/index.html) produces cross-referenced HTML pages of your source code as part of the `compile` phase in `target/site/xref/`.
### Enforcer Tile
Provides the `maven-enforcer-plugin`, performing the `display-info` and `enforce` goals during the `validate` phase.
Required Maven Version is set by the `required-maven.version` property.
Required Java Version is set by the `java.version` property.
### Compiler Tile
#### Maven Compiler Plugin
The [Maven Compiler Plugin](https://maven.apache.org/plugins/maven-compiler-plugin/) compiles your sources.
Ref: [compile:compile](https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html) Ref: [compile:compile](https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html)
@ -58,101 +133,114 @@ Ref: [compile:compile](https://maven.apache.org/plugins/maven-compiler-plugin/co
* target: ${java.version} * target: ${java.version}
* encoding: ${project.build.sourceEncoding} * encoding: ${project.build.sourceEncoding}
## Maven Surefire Plugin ### Checkstyle Tile
The [Maven Surefire Plugin](http://maven.apache.org/surefire/maven-surefire-plugin/index.html) The [Maven Checkstyle Plugin](https://maven.apache.org/plugins/maven-checkstyle-plugin/) verifies the source code against a Checkstyle ruleset file.
runs your Unit Tests.
### Configuration The default ruleset is the level `5-complexity` ruleset from [`kemitix-checkstyle-ruleset`](https://github.com/kemitix/kemitix-checkstyle-ruleset).
No configuration applied beyond the defaults. To use another level within `kemitix-checkstyle-ruleset`, set the `ruleset.level` property. e.g. `4-tweaks`.
## Maven Failsafe Plugin To use a different checkstyle ruleset completely, set the `checkstyle.ruleset.location` property.
The [Maven Failsafe Plugin](http://maven.apache.org/surefire/maven-failsafe-plugin/index.html)
runs your Integration Tests.
Runs its [integration-test](http://maven.apache.org/surefire/maven-failsafe-plugin/integration-test-mojo.html) ### Huntbugs Tile
goal during the `verify` phase.
### Configuration The [Huntbugs Maven Plugin](https://github.com/amaembo/huntbugs) performs a static analysis of the compiled bytecode for common bug patterns during the `verify` phase.
No configuration applied beyond the defaults. ### PMD Tile
## Maven Source Plugin The [PMD Maven Plugin](https://maven.apache.org/plugins/maven-pmd-plugin/) performs the PMD static code analysis during the `verify` phase.
The [Maven Source Plugin](https://maven.apache.org/plugins/maven-source-plugin/) Has a transitive dependency upon the `maven-plugins-tile` and includes it automatically.
bundles your sources into a jar file ready for deployment.
Runs its [jar-no-fork](https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html) ### Digraph Tile
goal during the `verify` phase.
### Configuration The [Digraph Maven Plugin](https://github.com/kemitix/digraph-dependency-maven-plugin/) creates a graphviz diagram of the package dependencies within the source code during the `verify` phase.
No configuration applied beyond the defaults. Set the property `digraph-dependency.basePackage` to the base of the project to be graphed. The default value is `net.kemitix`.
## Maven Javadoc Plugin ### Testing Tile
The [Maven Javadoc Plugin](https://maven.apache.org/plugins/maven-javadoc-plugin/) #### Maven Surefire Plugin
generates your html javadocs and bundles them into a jar file ready for
deployment.
Runs its [jar](https://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html) The [Maven Surefire Plugin](http://maven.apache.org/surefire/maven-surefire-plugin/index.html) runs your Unit Tests during the `test` phase.
goal during the `verify` phase.
### Configuration ### Maven Failsafe Plugin
No configuration applied beyond the defaults. The [Maven Failsafe Plugin](http://maven.apache.org/surefire/maven-failsafe-plugin/index.html) runs your Integration Tests during the `verify` phase.
## Maven Deploy Plugin ### Coverage Tile
The [Maven Deploy Plugin](https://maven.apache.org/plugins/maven-deploy-plugin/) #### Jacoco
uploads your artifacts to a remote repository.
### Configuration The [Jacoco Maven Plugin](http://www.eclemma.org/jacoco/trunk/doc/maven.html) verifies that the test suite meets the required coverage ratios.
No configuration applied beyond the defaults. The defaults require that all classes, lines and branches be covered by tests. i.e. 100% code coverage.
## Maven JXR Plugin Set the following properties to set less strict targets:
The [Maven JXR Plugin](http://maven.apache.org/jxr/maven-jxr-plugin/index.html) * `jacoco-class-line-covered-ratio` - default = 1 (i.e. 100%)
produces cross-referenced HTML pages of your source code. * `jacoco-class-instruction-covered-ratio` - default = 1 (i.e. 100%)
* `jacoco-class-missed-count-maximum` - default = 0 (i.e. #classes with no tests <= 0)
### Configuration Classes with names that end in the following are excluded from these limits:
No configuration applied beyond the defaults. * `Test`
* `IT`
* `Main`
* `Application`
* `Configuration`
* `Immutable`
## Coveralls #### Coveralls
The [Coveralls Maven Plugin](https://github.com/trautonen/coveralls-maven-plugin) The [Coveralls Maven Plugin](https://github.com/trautonen/coveralls-maven-plugin) publishes coverage data to coveralls.io.
publishes coverage data to coveralls.io.
### Configuration The plugin is not configured to run automatically. It must be initiated manually, and requires the `release` profile to be enabled:
The plugin is not configured to run automatically. It must be initiated manually:
```shell ```shell
mvn -P release test jacoco:report coveralls:report mvn -P release test jacoco:report coveralls:report
``` ```
#### Requirements This runs the tests, creates the jacoco report from the tests then uploads the results to http://coveralls.io.
In order to use the plugin: ### Pitest Tile
* *must* enable the `release` profile #### Mutation Testing
# Distribution Management The [Pitest Maven Plugin](http://pitest.org/quickstart/maven/) perform mutation test coverage checks during the `verify` phase.
Remote repositories are provided for the Sonatype Nexus Snapshots and Nexus Release Code coverage must by 100% and all mutations must result in a test from the test suite failing.
Repositories. See the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html)
for information on how to deploy your artifact the Maven Central through
Sonatype.
### Changing the Build Directory Set `pitest.skip` to avoid running the mutation test.
If you want to change the build directory, e.g. from your settings.xml to an SSD Set `pitest.coverage` to a value between 0 and 1 to set the allowed ratio of uncovered code. i.e. 0 = 100% code coverage, 0.2 = 80% code coverage
or ram drive, then set the value of the `kemitix.build.directory` to your required
locations. e.g. Set `pitest.mutation` to a value between 0 and 1 to set the allowed mutations to survive the test suite. i.e. 0 = 100% mutations caught, 0.2 = 80% mutations caught
`<properties>
<kemitix.build.directory>/mnt/ramdrive/${project.groupId}/${project.artifactId}</kemitix.build.directory> #### Highwheel Cyclic Analysis
</properties>`
The [Highwheel Maven Plugin](https://github.com/hcoles/highwheel) detects and visualises class and package cyclic dependencies during the `verify` phase. It also reports on tests that appear to have been orphaned during refactoring.
The generated report is created in `target/highwheel/`.
### Release Tile
The plugins in this Tile are only activated when the `release` profile is enabled.
#### Maven Source Plugin
The [Maven Source Plugin](https://maven.apache.org/plugins/maven-source-plugin/) bundles your sources into a jar file ready for deployment.
Runs its [jar-no-fork](https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html) goal during the `verify` phase.
#### Maven Javadoc Plugin
The [Maven Javadoc Plugin](https://maven.apache.org/plugins/maven-javadoc-plugin/) generates your html javadocs and bundles them into a jar file ready for deployment.
Runs its [jar](https://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html) goal during the `verify` phase.
#### Maven Deploy Plugin
The [Maven Deploy Plugin](https://maven.apache.org/plugins/maven-deploy-plugin/) uploads your artifacts to a remote repository.

299
pom.xml
View file

@ -5,12 +5,9 @@
<groupId>net.kemitix</groupId> <groupId>net.kemitix</groupId>
<artifactId>kemitix-parent</artifactId> <artifactId>kemitix-parent</artifactId>
<version>4.1.0-SNAPSHOT</version> <version>5.0.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Kemitix Parent</name>
<description>Common Parent with preconfigured plugins.</description>
<issueManagement> <issueManagement>
<url>https://github.com/kemitix/kemitix-parent/issues</url> <url>https://github.com/kemitix/kemitix-parent/issues</url>
<system>GitHub Issues</system> <system>GitHub Issues</system>
@ -34,33 +31,8 @@
</licenses> </licenses>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<kemitix.build.directory>target</kemitix.build.directory>
<kemitix-quality-maven-plugin.version>0.2.1</kemitix-quality-maven-plugin.version>
<digraphBasePackage>net.kemitix</digraphBasePackage>
<lombok.version>1.16.18</lombok.version>
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
<maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-site-plugin.version>3.6</maven-site-plugin.version>
<maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
<maven-dependency-plugin.version>3.0.2</maven-dependency-plugin.version>
<maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
<maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>2.20.1</maven-failsafe-plugin.version>
<maven-jxr-plugin.version>2.5</maven-jxr-plugin.version>
<maven-project-info-reports-plugin.version>2.9</maven-project-info-reports-plugin.version>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<versions.version>2.4</versions.version>
<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
</properties> </properties>
<developers> <developers>
@ -72,272 +44,9 @@
</developer> </developer>
</developers> </developers>
<dependencies> <modules>
<dependency> <module>tiles</module>
<groupId>org.projectlombok</groupId> </modules>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!-- plugin sequence: javadoc, sources, gpg, deploy -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-javadoc-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-source-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-gpg-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
</plugin><!-- maven deploy-plugin -->
</plugins>
</build>
</profile><!-- release -->
</profiles>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<build>
<directory>${kemitix.build.directory}</directory>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
</plugin><!-- maven-javadoc-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
</plugin><!-- maven-source-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
</plugin><!-- maven-gpg-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin><!-- maven deploy-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
</plugin><!-- maven-clean-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
</plugin><!-- maven-antrun-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${maven-install-plugin.version}</version>
</plugin><!-- maven-install-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven-site-plugin.version}</version>
</plugin><!-- maven-site-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin><!-- maven-compiler-plugin -->
<plugin>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-quality-maven-plugin</artifactId>
<version>${kemitix-quality-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>validate</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
</plugin><!-- maven-dependency-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
</plugin><!-- maven-assembly-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
</plugin><!-- maven-release-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin><!-- maven-surefire-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-failsafe-plugin -->
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>${coveralls-maven-plugin.version}</version>
</plugin><!-- coveralls-maven-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions.version}</version>
</plugin><!-- versions-maven-plugin -->
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-quality-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${maven-project-info-reports-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin><!-- maven-surefire-report-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>${maven-jxr-plugin.version}</version>
</plugin><!-- maven-jxr-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions.version}</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
<report>property-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin><!-- versions-maven-plugin -->
</plugins>
</reporting>
<distributionManagement> <distributionManagement>
<snapshotRepository> <snapshotRepository>

36
tiles/.gitignore vendored Normal file
View file

@ -0,0 +1,36 @@
# Package Files #
*.jar
*.war
*.ear
*.zip
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# maven build outputs
target/
# netbeans legacy
nbproject/
nbactions.xml
# eclipse legacy
.project
# intellij
.idea/
*.iml
# Spring
spring.log
logs/
/application.properties
/bootstrap.properties
# Composer-style
vendor
# Git and temp files
*.orig
*.patch
*~

1
tiles/.mvn/wrapper/maven-wrapper.properties vendored Executable file
View file

@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip

0
tiles/LICENSE.txt Normal file
View file

43
tiles/README.md Normal file
View file

@ -0,0 +1,43 @@
# Kemitix Maven Tiles
## Usage
```xml
<project>
<properties>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<kemitix-tiles.version>0.1.0-SNAPSHOT</kemitix-tiles.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<tiles>
<tile>net.kemitix.tiles:all-tiles:${kemitix-tiles.version}</tile>
<!-- or -->
<tile>net.kemitix.tiles:maven-plugins-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:enforcer-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:compiler-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:checkstyle-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:huntbugs-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:pmd-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:digraph-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:testing-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:coverage-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:pitest-tile:${kemitix-tiles.version}</tile>
<tile>net.kemitix.tiles:release-tile:${kemitix-tiles.version}</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
```
Enabling the plugins in the `release-tile` requires the `release` profile to be active.

16
tiles/all/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>all-tiles</artifactId>
<packaging>tile</packaging>
</project>

27
tiles/all/tile.xml Normal file
View file

@ -0,0 +1,27 @@
<project>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<tiles>
<tile>net.kemitix.tiles:maven-plugins-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:enforcer-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:compiler-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:checkstyle-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:huntbugs-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:pmd-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:digraph-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:testing-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:coverage-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:pitest-tile:0.1.0-SNAPSHOT</tile>
<tile>net.kemitix.tiles:release-tile:0.1.0-SNAPSHOT</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
</project>

16
tiles/checkstyle/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>checkstyle-tile</artifactId>
<packaging>tile</packaging>
</project>

47
tiles/checkstyle/tile.xml Normal file
View file

@ -0,0 +1,47 @@
<project>
<properties>
<maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
<checkstyle.version>8.0</checkstyle.version>
<sevntu.version>1.24.1</sevntu.version>
<ruleset.version>3.3.0</ruleset.version>
<ruleset.level>5-complexity</ruleset.level>
<checkstyle.ruleset.location>net/kemitix/checkstyle-${ruleset.level}.xml</checkstyle.ruleset.location>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
<dependency>
<groupId>com.github.sevntu-checkstyle</groupId>
<artifactId>sevntu-checkstyle-maven-plugin</artifactId>
<version>${sevntu.version}</version>
</dependency>
<dependency>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset</artifactId>
<version>${ruleset.version}</version>
</dependency>
</dependencies>
<configuration>
<configLocation>${checkstyle.ruleset.location}</configLocation>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

16
tiles/compiler/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>compiler-tile</artifactId>
<packaging>tile</packaging>
</project>

26
tiles/compiler/tile.xml Normal file
View file

@ -0,0 +1,26 @@
<project>
<properties>
<java.version>1.8</java.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin><!-- maven-compiler-plugin -->
</plugins>
</build>
</project>

16
tiles/coverage/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>coverage-tile</artifactId>
<packaging>tile</packaging>
</project>

85
tiles/coverage/tile.xml Normal file
View file

@ -0,0 +1,85 @@
<project>
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
<jacoco-class-line-covered-ratio>1</jacoco-class-line-covered-ratio>
<jacoco-class-instruction-covered-ratio>1</jacoco-class-instruction-covered-ratio>
<jacoco-class-missed-count-maximum>0</jacoco-class-missed-count-maximum>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<rule>
<element>CLASS</element>
<excludes>
<exclude>*Test</exclude>
<exclude>*IT</exclude>
<exclude>*Main</exclude>
<exclude>*Application</exclude>
<exclude>*Configuration</exclude>
<exclude>*Immutable*</exclude>
</excludes>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-class-line-covered-ratio}</minimum>
</limit>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-class-instruction-covered-ratio}</minimum>
</limit>
<limit>
<counter>CLASS</counter>
<value>MISSEDCOUNT</value>
<maximum>${jacoco-class-missed-count-maximum}</maximum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</plugin><!-- jacoco-maven-plugin -->
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>${coveralls-maven-plugin.version}</version>
</plugin><!-- coveralls-maven-plugin -->
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
</plugin><!-- jacoco-maven-plugin -->
</plugins>
</reporting>
</project>

16
tiles/digraph/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>digraph-tile</artifactId>
<packaging>tile</packaging>
</project>

26
tiles/digraph/tile.xml Normal file
View file

@ -0,0 +1,26 @@
<project>
<properties>
<digraph-dependency.version>0.9.0</digraph-dependency.version>
<digraph-dependency.basePackage>net.kemitix</digraph-dependency.basePackage>
</properties>
<build>
<plugins>
<plugin>
<groupId>net.kemitix</groupId>
<artifactId>digraph-dependency-maven-plugin</artifactId>
<version>${digraph-dependency.version}</version>
<configuration>
<basePackage>${digraph-dependency.basePackage}</basePackage>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>digraph</goal>
</goals>
</execution>
</executions>
</plugin><!-- digraph-dependency-maven-plugin -->
</plugins>
</build>
</project>

16
tiles/enforcer/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>enforcer-tile</artifactId>
<packaging>tile</packaging>
</project>

36
tiles/enforcer/tile.xml Normal file
View file

@ -0,0 +1,36 @@
<project>
<properties>
<maven-enforcer-plugin.version>1.4.1</maven-enforcer-plugin.version>
<required-maven.version>3.0.4</required-maven.version>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
<executions>
<execution>
<id>enforce-maven</id>
<phase>validate</phase>
<goals>
<goal>display-info</goal>
<goal>enforce</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<requireMavenVersion>
<version>${required-maven.version}</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${java.version}</version>
</requireJavaVersion>
</rules>
</configuration>
</plugin><!-- maven-enforcer-plugin -->
</plugins>
</build>
</project>

16
tiles/huntbugs/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>huntbugs-tile</artifactId>
<packaging>tile</packaging>
</project>

22
tiles/huntbugs/tile.xml Normal file
View file

@ -0,0 +1,22 @@
<project>
<properties>
<huntbugs.version>0.0.11</huntbugs.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>one.util</groupId>
<artifactId>huntbugs-maven-plugin</artifactId>
<version>${huntbugs.version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>huntbugs</goal>
</goals>
</execution>
</executions>
</plugin><!-- huntbugs-maven-plugin -->
</plugins>
</build>
</project>

View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-plugins-tile</artifactId>
<packaging>tile</packaging>
</project>

View file

@ -0,0 +1,70 @@
<project>
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
<maven-site-plugin.version>3.6</maven-site-plugin.version>
<maven-jxr-plugin.version>2.5</maven-jxr-plugin.version>
<versions.version>2.4</versions.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
</plugin><!-- maven-clean-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${maven-install-plugin.version}</version>
</plugin><!-- maven-install-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven-site-plugin.version}</version>
</plugin><!-- maven-site-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions.version}</version>
</plugin><!-- versions-maven-plugin-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>${maven-jxr-plugin.version}</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jxr</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-jxr-plugin -->
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>${maven-jxr-plugin.version}</version>
</plugin><!-- maven-jxr-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions.version}</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
<report>property-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin><!-- versions-maven-plugin -->
</plugins>
</reporting>
</project>

227
tiles/mvnw vendored Executable file
View file

@ -0,0 +1,227 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi
if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
saveddir=`pwd`
M2_HOME=`dirname "$PRG"`/..
# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`
cd "$saveddir"
# echo Using m2 at $M2_HOME
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
# TODO classpath?
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`which java`"
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi
if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
fi
}
BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

143
tiles/mvnw.cmd vendored Executable file
View file

@ -0,0 +1,143 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%

16
tiles/pitest/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pitest-tile</artifactId>
<packaging>tile</packaging>
</project>

64
tiles/pitest/tile.xml Normal file
View file

@ -0,0 +1,64 @@
<project>
<properties>
<highwheel-maven.version>1.2</highwheel-maven.version>
<pitest.version>1.2.0</pitest.version>
<pitest.coverage>0</pitest.coverage>
<pitest.mutation>0</pitest.mutation>
<pitest.skip>false</pitest.skip>
<pitest.failWhenNoMutations>true</pitest.failWhenNoMutations>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>highwheel-maven</artifactId>
<version>${highwheel-maven.version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>analyse</goal>
</goals>
</execution>
</executions>
</plugin><!-- highwheel-maven -->
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>${pitest.version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>mutationCoverage</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>${pitest.skip}</skip>
<timestampedReports>false</timestampedReports>
<excludedClasses>*.Immutable*</excludedClasses>
<coverageThreshold>${pitest.coverage}</coverageThreshold>
<mutationThreshold>${pitest.mutation}</mutationThreshold>
<failWhenNoMutations>${pitest.failWhenNoMutations}</failWhenNoMutations>
</configuration>
</plugin><!-- pitest-maven -->
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>${pitest.version}</version>
<reportSets>
<reportSet>
<reports>
<report>report</report>
</reports>
</reportSet>
</reportSets>
</plugin><!-- pitest-maven -->
</plugins>
</reporting>
</project>

16
tiles/pmd/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pmd-tile</artifactId>
<packaging>tile</packaging>
</project>

58
tiles/pmd/tile.xml Normal file
View file

@ -0,0 +1,58 @@
<project>
<properties>
<maven-pmd-plugin.version>3.8</maven-pmd-plugin.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin.version}</version>
<configuration>
<failOnViolation>true</failOnViolation>
<printFailingErrors>true</printFailingErrors>
<skipEmptyReport>false</skipEmptyReport>
</configuration>
<executions>
<execution>
<id>pmd</id>
<phase>verify</phase>
<goals>
<goal>pmd</goal>
</goals>
</execution>
<execution>
<id>cpd</id>
<phase>verify</phase>
<goals>
<goal>cpd</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-pmd-plugin -->
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<tiles>
<tile>net.kemitix.tiles:maven-plugins-tile:${kemitix-tiles.version}</tile>
</tiles>
</configuration>
</plugin><!-- tiles-maven-plugin -->
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin.version}</version>
<configuration>
<linkXRef>true</linkXRef>
</configuration>
</plugin><!-- maven-pmd-plugin -->
</plugins>
</reporting>
</project>

34
tiles/pom.xml Normal file
View file

@ -0,0 +1,34 @@
<?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>net.kemitix</groupId>
<artifactId>kemitix-parent</artifactId>
<version>5.0.0-SNAPSHOT</version>
</parent>
<groupId>net.kemitix.tiles</groupId>
<artifactId>kemitix-maven-tiles</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>tiles-parent</module>
<module>checkstyle</module>
<module>compiler</module>
<module>release</module>
<module>digraph</module>
<module>enforcer</module>
<module>coverage</module>
<module>testing</module>
<module>maven-plugins</module>
<module>pitest</module>
<module>huntbugs</module>
<module>pmd</module>
<module>all</module>
</modules>
</project>

16
tiles/release/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>release-tile</artifactId>
<packaging>tile</packaging>
</project>

83
tiles/release/tile.xml Normal file
View file

@ -0,0 +1,83 @@
<project>
<properties>
<maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
</properties>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-javadoc-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-source-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-gpg-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin><!-- maven deploy-plugin -->
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
</project>

16
tiles/testing/pom.xml Normal file
View file

@ -0,0 +1,16 @@
<?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">
<parent>
<artifactId>tiles-parent</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../tiles-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>testing-tile</artifactId>
<packaging>tile</packaging>
</project>

44
tiles/testing/tile.xml Normal file
View file

@ -0,0 +1,44 @@
<project>
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>2.20.1</maven-failsafe-plugin.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin><!-- maven-surefire-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin><!-- maven-failsafe-plugin-->
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin><!-- maven-surefire-report-plugin -->
</plugins>
</reporting>
</project>

View file

@ -0,0 +1,29 @@
<?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">
<parent>
<artifactId>kemitix-maven-tiles</artifactId>
<groupId>net.kemitix.tiles</groupId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tiles-parent</artifactId>
<packaging>pom</packaging>
<properties>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>