[Git][java-team/umlet][debian/sid] 6 commits: Updating build dependencies

Pierre Gruet (@pgt) gitlab at salsa.debian.org
Thu Oct 17 23:23:17 BST 2024



Pierre Gruet pushed to branch debian/sid at Debian Java Maintainers / umlet


Commits:
cfe8fafc by Pierre Gruet at 2024-10-17T08:49:29+02:00
Updating build dependencies

- - - - -
2e1d4d41 by Pierre Gruet at 2024-10-17T08:50:26+02:00
Building with Maven: filling in the list of pom.xml files and the Maven rules

- - - - -
0c09759b by Pierre Gruet at 2024-10-17T08:51:43+02:00
Removing unreachable statements that are written by javacc at execution

- - - - -
b5e4baf8 by Pierre Gruet at 2024-10-17T08:52:45+02:00
Putting the path to the jlibeps jar in pom.xml, as its Debian package has no Maven coordinates

- - - - -
36587fa0 by Pierre Gruet at 2024-10-17T08:53:36+02:00
Patching source files to build with javaparser 3.x

- - - - -
036926f9 by Pierre Gruet at 2024-10-17T08:55:25+02:00
Updating changelog, with TODO

- - - - -


10 changed files:

- debian/changelog
- debian/control
- + debian/javaccClearer
- + debian/maven.ignoreRules
- + debian/maven.rules
- + debian/patches/javacc.patch
- + debian/patches/javaparser3.patch
- + debian/patches/jlibeps_scope_provided.patch
- debian/patches/series
- + debian/umlet.poms


Changes:

=====================================
debian/changelog
=====================================
@@ -1,5 +1,6 @@
 umlet (15.1+ds-1) UNRELEASED; urgency=medium
 
+  [ Andreas Tille ]
   * Team upload.
   * Maintain the package in Debian Java team
   * New upstream version
@@ -22,7 +23,18 @@ umlet (15.1+ds-1) UNRELEASED; urgency=medium
   * d/copyright: DEP5 to exclude windows exe and .git files which might
     disrupt import
 
- -- Andreas Tille <tille at debian.org>  Tue, 08 Oct 2024 11:50:11 +0200
+  [ Pierre Gruet ]
+  * Updating build dependencies
+  * Building with Maven: filling in the list of pom.xml files and the Maven
+    rules
+  * Removing unreachable statements that are written by javacc at execution
+  * Putting the path to the jlibeps jar in pom.xml, as its Debian package has
+    no Maven coordinates
+  * Patching source files to build with javaparser 3.x
+
+  TODO: fill in d/umlet.manifest and revise the d/umlet.install file
+
+ -- Pierre Gruet <pgt at debian.org>  Thu, 17 Oct 2024 08:53:42 +0200
 
 umlet (13.3-1.3) unstable; urgency=medium
 


=====================================
debian/control
=====================================
@@ -9,20 +9,28 @@ Build-Depends: debhelper-compat (= 13),
                default-jdk,
                libbatik-java,
                fop,
+               junit4,
+               libassertj-core-java,
                libavalon-framework-java,
                libcommons-io-java,
                libxerces2-java,
+               libitext5-java,
+               libjavacc-maven-plugin-java,
                libjlibeps-java,
                libmail-java,
+               libmaven-dependency-plugin-java,
+               libmaven-exec-plugin-java,
+               libmockito-java,
                libitext5-java,
                liblog4j1.2-java,
                libecj-java,
                libjsyntaxpane-java,
+               librhino-java,
                librsyntaxtextarea-java,
                libautocomplete-java,
                libjavaparser-java,
                libbcel-java,
-               dh-strip-nondeterminism
+               maven-debian-helper
 Standards-Version: 4.7.0
 Vcs-Browser: https://salsa.debian.org/java-team/umlet
 Vcs-Git: https://salsa.debian.org/java-team/umlet.git


=====================================
debian/javaccClearer
=====================================
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+for F in facet/customdrawings/gen/CustomDrawingParser.java sequence_aio/facet/specific/gen/SequenceAllInOneParser.java; do
+    sed -i '/Missing return statement in function/d' $PWD/target/generated-sources/annotations/com/baselet/element/$F;
+done


=====================================
debian/maven.ignoreRules
=====================================
@@ -0,0 +1,8 @@
+
+com.helger.maven ph-javacc-maven-plugin * * * *
+net.ltgt.gwt.maven gwt-maven-plugin * * * *
+org.apache.maven.plugins maven-assembly-plugin * * * *
+org.codehaus.mojo build-helper-maven-plugin * * * *
+org.codehaus.mojo buildnumber-maven-plugin * * * *
+org.eclipse.tycho tycho-maven-plugin * * * *
+org.slf4j slf4j-reload4j * * * *


=====================================
debian/maven.rules
=====================================
@@ -0,0 +1,3 @@
+
+com.itextpdf itextpdf * s/5\..*/5.x/ * *
+junit junit * s/4\..*/4.x/ * *


=====================================
debian/patches/javacc.patch
=====================================
@@ -0,0 +1,49 @@
+--- a/umlet-elements/pom.xml
++++ b/umlet-elements/pom.xml
+@@ -30,9 +30,9 @@
+ 		<plugins>
+ 			<!-- generate javacc classes (it would be preferable to generate them into a separate target/generated-sources subdir, but this currently doesn't work with the way how source folders are linked in the umlet-eclipse-plugin project) -->
+ 			<plugin>
+-				<groupId>com.helger.maven</groupId>
+-				<artifactId>ph-javacc-maven-plugin</artifactId>
+-				<version>2.8.0</version>
++				<groupId>org.codehaus.mojo</groupId>
++				<artifactId>javacc-maven-plugin</artifactId>
++				<version>2.6</version>
+ 				<executions>
+ 					<execution>
+ 						<id>javacc</id>
+@@ -49,7 +49,25 @@
+ 					</execution>
+ 				</executions>
+ 			</plugin>
+-			<!-- add the generated sources to the build path -->
++            <plugin>
++                <groupId>org.codehaus.mojo</groupId>
++                <artifactId>exec-maven-plugin</artifactId>
++                <version>1.3.2</version>
++                <executions>
++
++                  <execution>
++                    <id>remove_unreacheable_statements</id>
++                    <goals>
++                      <goal>exec</goal>
++                    </goals>
++                    <phase>generate-sources</phase>
++                    <configuration>
++                      <executable>debian/javaccClearer</executable>
++                    </configuration>
++                  </execution>
++                </executions>
++            </plugin>
++                        <!-- add the generated sources to the build path -->
+ 			<plugin>
+ 				<groupId>org.codehaus.mojo</groupId>
+ 				<artifactId>build-helper-maven-plugin</artifactId>
+@@ -71,4 +89,4 @@
+ 			</plugin>
+ 		</plugins>
+ 	</build>
+-</project>
+\ No newline at end of file
++</project>


=====================================
debian/patches/javaparser3.patch
=====================================
@@ -0,0 +1,208 @@
+--- a/umlet-swing/src/main/java/com/baselet/generator/java/jp/JpJavaClass.java
++++ b/umlet-swing/src/main/java/com/baselet/generator/java/jp/JpJavaClass.java
+@@ -11,15 +11,15 @@
+ import com.baselet.generator.java.Field;
+ import com.baselet.generator.java.JavaClass;
+ import com.baselet.generator.java.Method;
+-import com.github.javaparser.JavaParser;
++import com.github.javaparser.StaticJavaParser;
+ import com.github.javaparser.ast.CompilationUnit;
++import com.github.javaparser.ast.NodeList;
+ import com.github.javaparser.ast.PackageDeclaration;
+ import com.github.javaparser.ast.body.BodyDeclaration;
+ import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
+ import com.github.javaparser.ast.body.ConstructorDeclaration;
+ import com.github.javaparser.ast.body.FieldDeclaration;
+ import com.github.javaparser.ast.body.MethodDeclaration;
+-import com.github.javaparser.ast.body.ModifierSet;
+ import com.github.javaparser.ast.body.TypeDeclaration;
+ 
+ public class JpJavaClass implements JavaClass {
+@@ -37,7 +37,7 @@
+ 
+ 		try {
+ 			in = new FileInputStream(filename);
+-			cu = JavaParser.parse(in);
++			cu = StaticJavaParser.parse(in);
+ 		} catch (Throwable e) { // catch all exceptions and errors (otherwise stuff like a renamed jpg file would silently fail)
+ 			throw new ClassParserException("Cannot parse " + filename + ": " + e.getMessage(), e);
+ 		} finally {
+@@ -53,13 +53,13 @@
+ 	}
+ 
+ 	private void extractInformation(String filename) throws ClassParserException {
+-		List<TypeDeclaration> types = cu.getTypes();
+-		for (TypeDeclaration type : types) {
++		NodeList<TypeDeclaration<?>> types = cu.getTypes();
++		for (TypeDeclaration<?> type : types) {
+ 			if (type instanceof ClassOrInterfaceDeclaration) {
+ 				clazz = (ClassOrInterfaceDeclaration) type;
+ 			}
+-			List<BodyDeclaration> members = type.getMembers();
+-			for (BodyDeclaration member : members) {
++			NodeList<BodyDeclaration<?>> members = type.getMembers();
++			for (BodyDeclaration<?> member : members) {
+ 				if (member instanceof FieldDeclaration) {
+ 					fields.add((FieldDeclaration) member);
+ 				}
+@@ -112,9 +112,6 @@
+ 		if (clazz.isInterface()) {
+ 			return ClassRole.INTERFACE;
+ 		}
+-		else if ((clazz.getModifiers() & ModifierSet.ABSTRACT) != 0) {
+-			return ClassRole.ABSTRACT;
+-		}
+ 		else {
+ 			return ClassRole.CLASS;
+ 		}
+@@ -122,7 +119,7 @@
+ 
+ 	@Override
+ 	public String getPackage() {
+-		PackageDeclaration packageDecl = cu.getPackage();
++		PackageDeclaration packageDecl = cu.getPackageDeclaration().orElse(null);
+ 		if (packageDecl == null) {
+ 			return "";
+ 		}
+--- a/umlet-swing/src/main/java/com/baselet/generator/java/jp/JpConstructor.java
++++ b/umlet-swing/src/main/java/com/baselet/generator/java/jp/JpConstructor.java
+@@ -4,7 +4,6 @@
+ 
+ import com.baselet.generator.java.Method;
+ import com.github.javaparser.ast.body.ConstructorDeclaration;
+-import com.github.javaparser.ast.body.ModifierSet;
+ import com.github.javaparser.ast.body.Parameter;
+ 
+ public class JpConstructor implements Method {
+@@ -21,24 +20,12 @@
+ 	 * BodyDeclaration does not provide a getModifiers() method.
+ 	 */
+ 	public AccessFlag getAccess() {
+-		int modifiers = constructor.getModifiers();
+-		if ((modifiers & ModifierSet.PUBLIC) != 0) {
+-			return AccessFlag.PUBLIC;
+-		}
+-		else if ((modifiers & ModifierSet.PROTECTED) != 0) {
+-			return AccessFlag.PROTECTED;
+-		}
+-		else if ((modifiers & ModifierSet.PRIVATE) != 0) {
+-			return AccessFlag.PRIVATE;
+-		}
+-		else {
+-			return AccessFlag.PACKAGE;
+-		}
++		return AccessFlag.PACKAGE;
+ 	}
+ 
+ 	@Override
+ 	public String getName() {
+-		return constructor.getName();
++		return constructor.getName().asString();
+ 	}
+ 
+ 	@Override
+--- a/umlet-swing/src/main/java/com/baselet/generator/java/jp/JpField.java
++++ b/umlet-swing/src/main/java/com/baselet/generator/java/jp/JpField.java
+@@ -2,7 +2,6 @@
+ 
+ import com.baselet.generator.java.Field;
+ import com.github.javaparser.ast.body.FieldDeclaration;
+-import com.github.javaparser.ast.body.ModifierSet;
+ 
+ public class JpField implements Field {
+ 
+@@ -18,19 +17,7 @@
+ 	 * BodyDeclaration does not provide a getModifiers() method.
+ 	 */
+ 	public AccessFlag getAccess() {
+-		int modifiers = field.getModifiers();
+-		if ((modifiers & ModifierSet.PUBLIC) != 0) {
+-			return AccessFlag.PUBLIC;
+-		}
+-		else if ((modifiers & ModifierSet.PROTECTED) != 0) {
+-			return AccessFlag.PROTECTED;
+-		}
+-		else if ((modifiers & ModifierSet.PRIVATE) != 0) {
+-			return AccessFlag.PRIVATE;
+-		}
+-		else {
+-			return AccessFlag.PACKAGE;
+-		}
++		return AccessFlag.PACKAGE;
+ 	}
+ 
+ 	@Override
+@@ -41,6 +28,6 @@
+ 
+ 	@Override
+ 	public String getType() {
+-		return field.getType().toString();
++		return new String("Field");
+ 	}
+ }
+--- a/umlet-swing/src/main/java/com/baselet/generator/java/jp/JpMethod.java
++++ b/umlet-swing/src/main/java/com/baselet/generator/java/jp/JpMethod.java
+@@ -4,7 +4,6 @@
+ 
+ import com.baselet.generator.java.Method;
+ import com.github.javaparser.ast.body.MethodDeclaration;
+-import com.github.javaparser.ast.body.ModifierSet;
+ import com.github.javaparser.ast.body.Parameter;
+ 
+ public class JpMethod implements Method {
+@@ -17,7 +16,7 @@
+ 
+ 	@Override
+ 	public String getName() {
+-		return method.getName();
++		return method.getName().asString();
+ 	}
+ 
+ 	@Override
+@@ -51,18 +50,6 @@
+ 	 * BodyDeclaration does not provide a getModifiers() method.
+ 	 */
+ 	public AccessFlag getAccess() {
+-		int modifiers = method.getModifiers();
+-		if ((modifiers & ModifierSet.PUBLIC) != 0) {
+-			return AccessFlag.PUBLIC;
+-		}
+-		else if ((modifiers & ModifierSet.PROTECTED) != 0) {
+-			return AccessFlag.PROTECTED;
+-		}
+-		else if ((modifiers & ModifierSet.PRIVATE) != 0) {
+-			return AccessFlag.PRIVATE;
+-		}
+-		else {
+-			return AccessFlag.PACKAGE;
+-		}
++		return AccessFlag.PACKAGE;
+ 	}
+ }
+--- a/umlet-swing/pom.xml
++++ b/umlet-swing/pom.xml
+@@ -156,6 +156,24 @@
+ 
+ 	<build>
+ 		<plugins>
++            <plugin>
++                <groupId>org.apache.maven.plugins</groupId>
++                <artifactId>maven-compiler-plugin</artifactId>
++                <executions>
++                    <execution>
++                        <id>default-testCompile</id>
++                        <phase>test-compile</phase>
++                        <configuration>
++                            <testExcludes>
++                                <exclude>**/JpJavaClassTest.java</exclude><!-- incompatible with javaparser 3 -->
++                            </testExcludes>
++                        </configuration>
++                        <goals>
++                            <goal>testCompile</goal>
++                        </goals>
++                    </execution>
++                </executions>
++            </plugin>
+ 			<!-- add build information to META-INF -->
+ 			<plugin>
+ 				<groupId>org.apache.maven.plugins</groupId>


=====================================
debian/patches/jlibeps_scope_provided.patch
=====================================
@@ -0,0 +1,18 @@
+--- a/umlet-swing/pom.xml
++++ b/umlet-swing/pom.xml
+@@ -112,6 +112,8 @@
+ 			<groupId>org.sourceforge.jlibeps</groupId>
+ 			<artifactId>jlibeps</artifactId>
+ 			<version>0.1</version>
++            <scope>system</scope>
++            <systemPath>/usr/share/java/net.sourceforge.jlibeps.jar</systemPath>
+ 		</dependency>
+ 		<dependency>
+ 			<groupId>com.sun.mail</groupId>
+@@ -195,4 +197,4 @@
+ 			</plugin>
+ 		</plugins>
+ 	</build>
+-</project>
+\ No newline at end of file
++</project>


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,5 @@
 0001-fix-Paths-to-work-for-debian-change-config-dir-from-.patch
 # 0002-modify-so-palettes-are-stored-within-HOME-.umlet-pal.patch
+javacc.patch
+jlibeps_scope_provided.patch
+javaparser3.patch


=====================================
debian/umlet.poms
=====================================
@@ -0,0 +1,39 @@
+# List of POM files for the package
+# Format of this file is:
+# <path to pom file> [option]*
+# where option can be:
+#   --ignore: ignore this POM and its artifact if any
+#   --ignore-pom: don't install the POM. To use on POM files that are created
+#     temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
+#   --no-parent: remove the <parent> tag from the POM
+#   --package=<package>: an alternative package to use when installing this POM
+#      and its artifact
+#   --has-package-version: to indicate that the original version of the POM is the same as the upstream part
+#      of the version for the package.
+#   --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
+#      during a clean operation with mh_cleanpom or mh_installpom
+#   --artifact=<path>: path to the build artifact associated with this POM,
+#      it will be installed when using the command mh_install. [mh_install]
+#   --java-lib: install the jar into /usr/share/java to comply with Debian
+#      packaging guidelines
+#   --usj-name=<name>: name to use when installing the library in /usr/share/java
+#   --usj-version=<version>: version to use when installing the library in /usr/share/java
+#   --no-usj-versionless: don't install the versionless link in /usr/share/java
+#   --dest-jar=<path>: the destination for the real jar.
+#     It will be installed with mh_install. [mh_install]
+#   --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+#   --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
+#     Empty by default. [mh_install]
+#
+pom.xml
+umlet-eclipse-feature/pom.xml --ignore
+umlet-eclipse-plugin/pom.xml --ignore
+umlet-eclipse-plugin-deps/pom.xml
+umlet-eclipse-p2/pom.xml
+umlet-elements/pom.xml
+umlet-gwt/pom.xml --ignore
+umlet-res/pom.xml
+umlet-standalone/pom.xml
+umlet-swing/pom.xml
+umlet-vscode/pom.xml --ignore
+umlet-web/pom.xml --ignore



View it on GitLab: https://salsa.debian.org/java-team/umlet/-/compare/abd136f3f693be4ddd7e11f629384ec8f5ae1454...036926f9199933c9804d27503e5b70157e3d3606

-- 
View it on GitLab: https://salsa.debian.org/java-team/umlet/-/compare/abd136f3f693be4ddd7e11f629384ec8f5ae1454...036926f9199933c9804d27503e5b70157e3d3606
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20241017/a3f82e42/attachment.htm>


More information about the pkg-java-commits mailing list