File tree Expand file tree Collapse file tree 3 files changed +32
-5
lines changed
Expand file tree Collapse file tree 3 files changed +32
-5
lines changed Original file line number Diff line number Diff line change 1717 - name : Set up Java
1818 uses : actions/setup-java@v1
1919 with :
20- java-version : 1.8
20+ java-version : 11
2121
2222 - name : Cache
2323 uses : actions/cache@v2
2828 ${{ runner.os }}-maven-
2929
3030 - name : Build
31- run : mvn -B clean package --file pom.xml
31+ env :
32+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
34+ run : mvn -B -Dmaven.javadoc.skip=true -Dmaven.source.skip=true clean package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
Original file line number Diff line number Diff line change 1515 - name : Set up Java
1616 uses : actions/setup-java@v1
1717 with :
18- java-version : 1.8
18+ java-version : 11
1919 server-id : ossrh
2020 server-username : MAVEN_USERNAME
2121 server-password : MAVEN_PASSWORD
@@ -32,10 +32,10 @@ jobs:
3232 run : cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
3333
3434 - name : Build
35- run : mvn -B package --file pom.xml
35+ run : mvn -B clean package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
3636
3737 - name : Publish
38- run : mvn -B -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} clean deploy
38+ run : mvn -B -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy
3939 env :
4040 MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
4141 MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
Original file line number Diff line number Diff line change 4848 <maven-javadoc-plugin .version>3.2.0</maven-javadoc-plugin .version>
4949 <maven-gpg-plugin .version>1.6</maven-gpg-plugin .version>
5050 <nexus-staging-maven-plugin .version>1.6.8</nexus-staging-maven-plugin .version>
51+ <jacoco-maven-plugin .version>0.8.6</jacoco-maven-plugin .version>
52+ <sonar .projectKey>HectorBst_jsonschema2pojo-spring-data-couchbase</sonar .projectKey>
53+ <sonar .organization>hectorbst</sonar .organization>
54+ <sonar .host.url>https://sonarcloud.io</sonar .host.url>
5155 </properties >
5256
5357 <dependencies >
107111
108112 <build >
109113 <plugins >
114+ <plugin >
115+ <groupId >org.jacoco</groupId >
116+ <artifactId >jacoco-maven-plugin</artifactId >
117+ <version >${jacoco-maven-plugin.version} </version >
118+ <executions >
119+ <execution >
120+ <id >prepare-agent</id >
121+ <goals >
122+ <goal >prepare-agent</goal >
123+ </goals >
124+ </execution >
125+ <execution >
126+ <id >report</id >
127+ <phase >prepare-package</phase >
128+ <goals >
129+ <goal >report</goal >
130+ </goals >
131+ </execution >
132+ </executions >
133+ </plugin >
110134 <plugin >
111135 <groupId >org.jsonschema2pojo</groupId >
112136 <artifactId >jsonschema2pojo-maven-plugin</artifactId >
You can’t perform that action at this time.
0 commit comments