-
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.
- Loading branch information
0 parents
commit ebdf59a
Showing
17 changed files
with
557 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | ||
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path | ||
|
||
name: Maven Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | ||
settings-path: ${{ github.workspace }} # location for the settings.xml file | ||
|
||
- name: Publish to GitHub Packages Apache Maven | ||
run: mvn clean deploy -DdeployAtEnd -Dsha1=${GITHUB_REF##*/v} -Dchangelist= -s $GITHUB_WORKSPACE/settings.xml | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |
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,24 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Java CI with Maven | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Build with Maven | ||
run: mvn -B package -Dsha1=${GITHUB_REF##*/} --file pom.xml |
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,4 @@ | ||
target | ||
.idea | ||
*.iml | ||
.flattened-pom.xml |
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,153 @@ | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.advanova.maven.plugins</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
<packaging>maven-plugin</packaging> | ||
<version>${sha1}-${revision}${changelist}</version> | ||
<name>jacoco-maven-plugin Maven Mojo</name> | ||
<url>http://maven.apache.org</url> | ||
<properties> | ||
<!-- This is the jacoco version we are based of.--> | ||
<revision>0.8.6</revision> | ||
<!-- this will be set to the tag/branch by CI--> | ||
<sha1>local</sha1> | ||
<!-- this will be set to empty for tags by CI --> | ||
<changelist>-SNAPSHOT</changelist> | ||
<jacoco.version>${revision}</jacoco.version> | ||
</properties> | ||
|
||
<prerequisites> | ||
<!-- Keep in sync with jacoco--> | ||
<maven>3.0</maven> | ||
</prerequisites> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.maven.plugin-tools</groupId> | ||
<artifactId>maven-plugin-annotations</artifactId> | ||
<version>3.4</version> | ||
<!-- annotations are needed only to build the plugin: --> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-plugin-api</artifactId> | ||
<version>2.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
<version>${jacoco.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>3.8.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-plugin-plugin</artifactId> | ||
<version>3.6.0</version> | ||
<dependencies> | ||
<dependency> | ||
<!-- Workaround to be able to compile into Java 13 bytecode --> | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm</artifactId> | ||
<version>7.1</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-plugin-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>default-descriptor</id> | ||
<phase>process-classes</phase> | ||
</execution> | ||
<execution> | ||
<id>help-goal</id> | ||
<goals> | ||
<goal>helpmojo</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>report</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>report</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>flatten-maven-plugin</artifactId> | ||
<version>1.1.0</version> | ||
<configuration> | ||
<updatePomFile>true</updatePomFile> | ||
<flattenMode>resolveCiFriendliesOnly</flattenMode> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>flatten</id> | ||
<phase>process-resources</phase> | ||
<goals> | ||
<goal>flatten</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>flatten.clean</id> | ||
<phase>clean</phase> | ||
<goals> | ||
<goal>clean</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>3.2.0</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<distributionManagement> | ||
<repository> | ||
<id>github</id> | ||
<name>GitHub Apache Maven Packages</name> | ||
<url>https://maven.pkg.github.com/advanova/jacoco-maven-plugin</url> | ||
</repository> | ||
</distributionManagement> | ||
</project> |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/advanova/maven/plugins/jacoco/AgentITMojo.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,9 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.LifecyclePhase; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
import org.apache.maven.plugins.annotations.ResolutionScope; | ||
|
||
@Mojo(name = "prepare-agent-integration", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST, requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true) | ||
public class AgentITMojo extends org.jacoco.maven.AgentITMojo { | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/advanova/maven/plugins/jacoco/AgentMojo.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,9 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.LifecyclePhase; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
import org.apache.maven.plugins.annotations.ResolutionScope; | ||
|
||
@Mojo(name = "prepare-agent", defaultPhase = LifecyclePhase.INITIALIZE, requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true) | ||
public class AgentMojo extends org.jacoco.maven.AgentMojo { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/advanova/maven/plugins/jacoco/CheckMojo.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,8 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.LifecyclePhase; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
|
||
@Mojo(name = "check", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true) | ||
public class CheckMojo extends org.jacoco.maven.CheckMojo { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/advanova/maven/plugins/jacoco/DumpMojo.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,8 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.LifecyclePhase; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
|
||
@Mojo(name = "dump", defaultPhase = LifecyclePhase.POST_INTEGRATION_TEST, threadSafe = true) | ||
public class DumpMojo extends org.jacoco.maven.DumpMojo { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/advanova/maven/plugins/jacoco/InstrumentMojo.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,8 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.LifecyclePhase; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
|
||
@Mojo(name = "instrument", defaultPhase = LifecyclePhase.PROCESS_CLASSES, threadSafe = true) | ||
public class InstrumentMojo extends org.jacoco.maven.InstrumentMojo { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/advanova/maven/plugins/jacoco/MergeMojo.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,8 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.LifecyclePhase; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
|
||
@Mojo(name = "merge", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, threadSafe = true) | ||
public class MergeMojo extends org.jacoco.maven.MergeMojo { | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/com/advanova/maven/plugins/jacoco/ReportAggregateAllMojo.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,22 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.Mojo; | ||
import org.apache.maven.plugins.annotations.Parameter; | ||
import org.apache.maven.plugins.annotations.ResolutionScope; | ||
import org.jacoco.maven.AbstractReportAggregateAllMojo; | ||
|
||
@Mojo(name = "report-aggregate-all", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true, aggregator = true) | ||
public class ReportAggregateAllMojo extends AbstractReportAggregateAllMojo { | ||
@Parameter(defaultValue = "true") | ||
private boolean runInExecutionRootOnly; | ||
|
||
@Override | ||
public boolean canGenerateReport() { | ||
if (runInExecutionRootOnly && !getProject().isExecutionRoot()) { | ||
getLog().info( | ||
"Skipping JaCoCo execution because this is not the execution root."); | ||
return false; | ||
} | ||
return super.canGenerateReport(); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/advanova/maven/plugins/jacoco/ReportAggregateMojo.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,8 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.Mojo; | ||
import org.apache.maven.plugins.annotations.ResolutionScope; | ||
|
||
@Mojo(name = "report-aggregate", threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST) | ||
public class ReportAggregateMojo extends org.jacoco.maven.AbstractReportAggregateMojo { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/advanova/maven/plugins/jacoco/ReportITMojo.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,8 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.LifecyclePhase; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
|
||
@Mojo(name = "report-integration", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true) | ||
public class ReportITMojo extends org.jacoco.maven.ReportITMojo { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/advanova/maven/plugins/jacoco/ReportMojo.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,8 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.LifecyclePhase; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
|
||
@Mojo(name = "report", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true) | ||
public class ReportMojo extends org.jacoco.maven.ReportMojo { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/advanova/maven/plugins/jacoco/RestoreMojo.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,8 @@ | ||
package com.advanova.maven.plugins.jacoco; | ||
|
||
import org.apache.maven.plugins.annotations.LifecyclePhase; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
|
||
@Mojo(name = "restore-instrumented-classes", defaultPhase = LifecyclePhase.PREPARE_PACKAGE, threadSafe = true) | ||
public class RestoreMojo extends org.jacoco.maven.RestoreMojo { | ||
} |
Oops, something went wrong.