Fix generated main-class module attributes

Resolves: RHEL-67337
This commit is contained in:
Mikolaj Izdebski 2024-11-13 20:05:12 +01:00
parent 66871917d4
commit 346bc83e19
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 25049b7b2c58517bf2e2f37a66be4fe01e966b20 Mon Sep 17 00:00:00 2001
From: Rafael Winterhalter <rafael.wth@gmail.com>
Date: Fri, 23 Feb 2024 11:09:07 +0100
Subject: [PATCH] Retter klassenavn.
---
src/main/java/codes/rafael/modulemaker/AbstractModuleMojo.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/codes/rafael/modulemaker/AbstractModuleMojo.java b/src/main/java/codes/rafael/modulemaker/AbstractModuleMojo.java
index 1d1f8c7..30bce10 100644
--- a/src/main/java/codes/rafael/modulemaker/AbstractModuleMojo.java
+++ b/src/main/java/codes/rafael/modulemaker/AbstractModuleMojo.java
@@ -218,7 +218,7 @@ public abstract class AbstractModuleMojo extends AbstractMojo {
}
}
if (mainClass != null) {
- moduleVisitor.visitMainClass(mainClass.trim());
+ moduleVisitor.visitMainClass(mainClass.trim().replace('.', '/'));
}
if (uses != null) {
Set<String> previousUses = new HashSet<String>();
--
2.47.0

View File

@ -2,7 +2,7 @@
Name: modulemaker-maven-plugin
Version: 1.9
Release: 8%{?dist}
Release: 9%{?dist}
Summary: A plugin for creating module-info.class files
License: Apache-2.0
URL: https://github.com/raphw/modulemaker-maven-plugin
@ -12,6 +12,8 @@ ExclusiveArch: %{java_arches} noarch
Source0: https://github.com/raphw/modulemaker-maven-plugin/archive/refs/tags/modulemaker-maven-plugin-%{version}.tar.gz
Source1: https://www.apache.org/licenses/LICENSE-2.0.txt
Patch0: 0001-Retter-klassenavn.patch
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
@ -37,6 +39,7 @@ API documentation for %{name}.
%prep
%setup -q -n modulemaker-maven-plugin-modulemaker-maven-plugin-%{version}
%patch0 -p1
cp -p %{SOURCE1} .
@ -56,6 +59,9 @@ cp -p %{SOURCE1} .
%license LICENSE-2.0.txt
%changelog
* Wed Nov 13 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.9-9
- Fix generated main-class module attributes
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.9-8
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018