Skip to content

chore: cleanup spotbugs maven profiles #1236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven
run: mvn -Pbuild-without-spotbugs -B install --file pom.xml
run: mvn -B install --file pom.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # 3.1.1
if: ${{ matrix.java == '11' }} # publish results once
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
- name: Publish package
run: mvn -P sign,build-without-spotbugs clean deploy -DskipTests
run: mvn -Prelease clean deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_TO_ASSUME }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Run e2e test with Maven
run: mvn -Pbuild-without-spotbugs -DskipTests install --file pom.xml && mvn -Pe2e -B verify --file powertools-e2e-tests/pom.xml
run: mvn -DskipTests install --file pom.xml && mvn -Pe2e -B verify --file powertools-e2e-tests/pom.xml
59 changes: 12 additions & 47 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@

<profiles>
<profile>
<id>sign</id>
<id>release</id>
<build>
<plugins>
<plugin>
Expand All @@ -445,33 +445,6 @@
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>build-with-spotbugs</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.7.3.5</version>
<executions>
<execution>
<id>test</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>../spotbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down Expand Up @@ -504,36 +477,28 @@
</build>
</profile>
<profile>
<id>build-without-spotbugs</id>
<id>build-with-spotbugs</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.7.3.5</version>
<executions>
<execution>
<id>attach-sources</id>
<id>test</id>
<goals>
<goal>jar-no-fork</goal>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>none</doclint>
<detectJavaApiLink>false</detectJavaApiLink>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>../spotbugs-exclude.xml</excludeFilterFile>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down