Skip to content

Commit

Permalink
Merge pull request #80 from adangel:issue-65-pmd-designer
Browse files Browse the repository at this point in the history
Rename pmd-ui to pmd-designer #80
  • Loading branch information
adangel committed Feb 22, 2024
2 parents 575101e + 45929ad commit 71b57d8
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 34 deletions.
3 changes: 2 additions & 1 deletion .ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ function build() {
GH_RELEASE="$RESULT"

# Deploy to github releases
pmd_ci_gh_releases_uploadAsset "$GH_RELEASE" "target/pmd-ui-${PMD_CI_MAVEN_PROJECT_VERSION}.jar"
# Note: This is the shaded jar
pmd_ci_gh_releases_uploadAsset "$GH_RELEASE" "target/pmd-designer-${PMD_CI_MAVEN_PROJECT_VERSION}.jar"

# extract the release notes
RELEASE_NAME="${PMD_CI_MAVEN_PROJECT_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ buildNumber.properties

# CSS files generated by IDE
src/main/resources/net/sourceforge/pmd/util/fxdesigner/css
pmd-ui.iml
pmd-designer.iml
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

5 changes: 1 addition & 4 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/Designer__JRE_11_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Designer__JRE_8_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Designer__JRE_9_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@

* **Bump required pmd-core version to 7.0.0-SNAPSHOT.**

**Changed maven GAV**
The maven coordinates (GAV) have been changed. The artifactId has been renamed to pmd-designer.

```xml
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-designer</artifactId>
<version>7.0.0</version>
</dependency>
```

At the same time, the release artefact name changed to **pmd-designer-7.0.0.jar**.

**Fixed issues:**

* [#65](https://github.com/pmd/pmd-designer/issues/65) Rename artifactId to pmd-designer

**Merged pull requests:**

* [#77](https://github.com/pmd/pmd-designer/pull/77) Enable PMD checks with PMD 7 by [@adangel](https://github.com/adangel)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
1. [Open IntelliJ's terminal](https://stackoverflow.com/a/28044371/6245827) and
paste the following:
```shell
git update-index --skip-worktree -- .idea/misc.xml pmd-ui.iml # Ignore some config files
mvn process-resources # Generate CSS resources
git update-index --skip-worktree -- .idea/misc.xml pmd-designer.iml # Ignore some config files
./mvnw process-resources # Generate CSS resources
```

4. [Synchronize the directory contents](https://stackoverflow.com/a/4599243/6245827) to pick-up on the new CSS files
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PMD Rule Designer

[![Build Status](https://github.com/pmd/pmd-designer/workflows/build/badge.svg?branch=master)](https://github.com/pmd/pmd-designer/actions?query=workflow%3Abuild)
[![Maven Central](https://img.shields.io/maven-central/v/net.sourceforge.pmd/pmd-ui.svg)](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd-ui)
[![Maven Central](https://img.shields.io/maven-central/v/net.sourceforge.pmd/pmd-designer.svg)](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd-designer)
[![Join the chat](https://img.shields.io/gitter/room/pmd/pmd-designer)](https://app.gitter.im/#/room/#pmd_pmd-designer:gitter.im?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)


Expand Down Expand Up @@ -37,8 +37,8 @@ See the list of available versions [here](https://search.maven.org/artifact/org.

### Updating

The latest version of the designer currently **works with PMD 7.0.0-rc1 and above**.
You can simply replace `pmd-ui-7.X.Y.jar` with the [latest build](https://github.com/pmd/pmd-designer/releases/latest)
The latest version of the designer currently **works with PMD 7.0.0 and above**.
You can simply replace `pmd-designer-7.X.Y.jar` with the [latest build](https://github.com/pmd/pmd-designer/releases/latest)
in the installation folder of your PMD distribution.

## Usage
Expand Down
2 changes: 1 addition & 1 deletion config/pmd-check.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<ruleset name="pmd-ui-dogfood"
<ruleset name="pmd-designer-dogfood"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
Expand Down
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<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>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-ui</artifactId>
<artifactId>pmd-designer</artifactId>
<name>PMD Designer</name>
<version>7.0.0-SNAPSHOT</version>

Expand Down Expand Up @@ -54,7 +54,9 @@
</developers>

<properties>
<pmd.designer.version>${project.version}</pmd.designer.version> <!-- see DesignerVersion -->
<pmd.core.version>7.0.0-SNAPSHOT</pmd.core.version>

<openjfx.version>11.0.2</openjfx.version>
<java.version>8</java.version>
<kotlin.version>1.7.20</kotlin.version>
Expand Down Expand Up @@ -892,7 +894,7 @@
<Main-Class>net.sourceforge.pmd.util.fxdesigner.DesignerStarter</Main-Class>
</manifestEntries>
</archive>
<finalName>pmd-ui-fat-${pmd.core.version}</finalName>
<finalName>pmd-designer-fat-${pmd.core.version}</finalName>
</configuration>
</plugin>

Expand Down
4 changes: 2 additions & 2 deletions releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@

4. Wait, until release is ready. The maven plugin will directly push the tag. The tag will be
built by [github actions](https://github.com/pmd/pmd-designer/actions).
After it is done, the new release should be available under <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd-ui/>.
After it is done, the new release should be available under <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd-designer/>.

5. Verify the release on Github Releases: <https://github.com/pmd/pmd-designer/releases>

The release notes from `/CHANGELOG.md` should be there. Also, the shaded pmd-ui-*.jar should
The release notes from `/CHANGELOG.md` should be there. Also, the shaded pmd-designer-*.jar should
have been uploaded.

6. Add a new section at the top in `/CHANGELOG.md` to prepare for the next version.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.Objects;
import java.util.stream.Collectors;

import net.sourceforge.pmd.PMDVersion;
import net.sourceforge.pmd.util.fxdesigner.app.DesignerParams;
import net.sourceforge.pmd.util.fxdesigner.app.DesignerRoot;
import net.sourceforge.pmd.util.fxdesigner.app.DesignerRootImpl;
Expand Down Expand Up @@ -72,7 +73,7 @@ public void stop() {
public void start(Stage stage, DesignerRoot owner) throws IOException {
this.designerRoot = owner;

stage.setTitle("PMD Rule Designer (v " + DesignerVersion.getCurrentVersion() + ')');
stage.setTitle("PMD Rule Designer " + DesignerVersion.getCurrentVersion() + " (with PMD " + PMDVersion.VERSION + ")");
setIcons(stage);

System.out.println(stage.getTitle() + " initializing... ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public final class DesignerVersion {
private static final String UNKNOWN_VERSION = "unknown";

/**
* Determines the version from maven's generated pom.properties file.
* Determines the version from maven's generated designer.properties file.
*/
static {
VERSION = readProperty("/META-INF/maven/net.sourceforge.pmd/pmd-ui/pom.properties", "version").orElse(UNKNOWN_VERSION);
VERSION = readProperty(ResourceUtil.resolveResource("designer.properties"), "pmd.designer.version").orElse(UNKNOWN_VERSION);
PMD_CORE_MIN_VERSION = readProperty(ResourceUtil.resolveResource("designer.properties"), "pmd.core.version").orElse(UNKNOWN_VERSION);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public static void showAboutPopup(DesignerRoot root) {
String sb =
"PMD core version:\t\t" + PMDVersion.VERSION + "\n"
+ "Designer version:\t\t\t" + DesignerVersion.getCurrentVersion()
+ " (supports PMD core " + DesignerVersion.getPmdCoreMinVersion() + ")\n"
+ " (min. supported PMD core " + DesignerVersion.getPmdCoreMinVersion() + ")\n"
+ "Designer settings dir:\t\t"
+ root.getService(DesignerRoot.DISK_MANAGER).getSettingsDirectory() + "\n"
+ "Available languages:\t\t"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void testBeanRoundTrip() throws IOException {
bean.setK(IOException.class);
bean.setStr("hahahaha");

File tmp = Files.createTempFile("pmd-ui-test", "").toFile();
File tmp = Files.createTempFile("pmd-designer-test", "").toFile();

SettingsPersistenceUtil.persistProperties(bean, tmp);

Expand Down

0 comments on commit 71b57d8

Please sign in to comment.