Skip to content

Commit

Permalink
Add japicmp (#192)
Browse files Browse the repository at this point in the history
Merge pull request #192 from adangel/add-japicmp
  • Loading branch information
adangel authored Apr 19, 2024
2 parents 411cdc5 + 63fe212 commit 33cfb4a
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ runs:
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
path: |
~/.m2/repository
net.sourceforge.pmd.eclipse.plugin/japicmp-data
# re-cache on changes in the pom and target files
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/*.target') }}
restore-keys: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ target/
.pmd
.ruleset
.pmdruleset.xml
net.sourceforge.pmd.eclipse.plugin/japicmp-data
1 change: 1 addition & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This is a minor release.
### New and noteworthy

### Fixed Issues
* [#192](https://github.com/pmd/pmd-eclipse-plugin/pull/192): Add japicmp

### API Changes

Expand Down
60 changes: 60 additions & 0 deletions net.sourceforge.pmd.eclipse.plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,66 @@
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>verify</phase>
<configuration>
<target description="Download previous plugin version for japicmp"
unless="japicmp.skip">
<property name="oldVersion" value="7.0.0.v20240322-0920-r"/>
<mkdir dir="${project.basedir}/japicmp-data/net.sourceforge.pmd.eclipse.p2updatesite-${oldVersion}"/>
<get src="https://github.com/pmd/pmd-eclipse-plugin/releases/download/${oldVersion}/net.sourceforge.pmd.eclipse.p2updatesite-${oldVersion}.zip"
dest="${project.basedir}/japicmp-data/" skipexisting="true"/>
<unzip src="${project.basedir}/japicmp-data/net.sourceforge.pmd.eclipse.p2updatesite-${oldVersion}.zip"
dest="${project.basedir}/japicmp-data/net.sourceforge.pmd.eclipse.p2updatesite-${oldVersion}/"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<configuration>
<oldVersion>
<file>
<path>${project.basedir}/japicmp-data/net.sourceforge.pmd.eclipse.p2updatesite-7.0.0.v20240322-0920-r/plugins/net.sourceforge.pmd.eclipse.plugin_7.0.0.v20240322-0920-r.jar</path>
</file>
</oldVersion>
<newVersion>
<file>
<path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
</file>
</newVersion>
<parameter>
<breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
<onlyModified>true</onlyModified>
<excludes>
<exclude>net.sourceforge.pmd.eclipse.core.internal</exclude>
<exclude>net.sourceforge.pmd.eclipse.logging.internal</exclude>
<exclude>net.sourceforge.pmd.eclipse.runtime.cmd.internal</exclude>
<exclude>net.sourceforge.pmd.eclipse.ui.actions.internal</exclude>
<exclude>net.sourceforge.pmd.eclipse.util.internal</exclude>
</excludes>
</parameter>
</configuration>
<executions>
<execution>
<id>japicmp</id>
<phase>verify</phase>
<goals>
<goal>cmp</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,11 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.20.0</version>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
Expand Down

0 comments on commit 33cfb4a

Please sign in to comment.