diff options
Diffstat (limited to 'javaparser.spec')
| -rw-r--r-- | javaparser.spec | 116 |
1 files changed, 43 insertions, 73 deletions
diff --git a/javaparser.spec b/javaparser.spec index 73146b6..0ff14fe 100644 --- a/javaparser.spec +++ b/javaparser.spec @@ -1,69 +1,60 @@ -%bcond_with bootstrap - -%if %{without bootstrap} -%bcond_without bnd_maven_plugin -%else -%bcond_with bnd_maven_plugin -%endif +%global debug_package %{nil} Name: javaparser -Version: 3.27.1 -Release: 4 +Version: 3.28.0 +Release: 1%{?dist} Summary: Java 1 to 13 Parser and Abstract Syntax Tree for Java License: LGPL-2.0-or-later OR Apache-2.0 -URL: https://javaparser.org -Source0: https://github.com/javaparser/javaparser/archive/%{name}-parent-%{version}.tar.gz +URL: https://github.com/javaparser/javaparser +Source0: %{url}/archive/javaparser-parent-%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildArch: noarch -Patch0: 0001-Port-to-OpenJDK-21.patch -Patch1: 0003-javacc-grammar-avoid-diamond-operator.patch - -%if %{with bnd_maven_plugin} -BuildRequires: mvn(biz.aQute.bnd:bnd-maven-plugin) -%endif -%if %{with bootstrap} -BuildRequires: javapackages-bootstrap -%else BuildRequires: maven-local -BuildRequires: mvn(junit:junit) -BuildRequires: mvn(javax.annotation:javax.annotation-api) -BuildRequires: mvn(net.java.dev.javacc:javacc) -BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) -BuildRequires: mvn(org.codehaus.mojo:javacc-maven-plugin) -%endif +BuildRequires: java-17-openjdk-devel +# RPM names (rather than mvn(group:artifact) capabilities) are used for the +# external Maven plugins; both package the corresponding artifacts into the +# local xmvn repository. +BuildRequires: javacc +BuildRequires: javacc-maven-plugin +BuildRequires: maven-plugin-build-helper %description This package contains a Java 1 to 13 Parser with AST generation and visitor support. The AST records the source code structure, javadoc -and comments. It is also possible to change the AST nodes or create new -ones to modify the source code. +and comments. It is also possible to change the AST nodes or create +new ones to modify the source code. %package javadoc -Summary: Javadoc for %{name} +Summary: Javadoc for %{name} %description javadoc This package contains API documentation for %{name}. %prep -%autosetup -n %{name}-%{name}-parent-%{version} -p1 +%autosetup -n %{name}-%{version} sed -i 's/\r//' readme.md +# The JUnit BOM import is only used by the (disabled) test modules and is +# not needed to build javaparser-core. %pom_remove_dep -r :junit-bom +# Release / publishing plugins are not available in the offline build. %pom_remove_plugin :maven-source-plugin %pom_remove_plugin :central-publishing-maven-plugin -%pom_remove_plugin -r :jacoco-maven-plugin -%if %{without bnd_maven_plugin} -%pom_remove_plugin :bnd-maven-plugin javaparser-core -mkdir -p javaparser-core/target/classes/META-INF/ -touch javaparser-core/target/classes/META-INF/MANIFEST.MF -%endif +# Coverage plugin is used by the test modules only. +%pom_remove_plugin -r :jacoco-maven-plugin %mvn_alias :javaparser-core com.google.code.javaparser:javaparser + +# ph-javacc-maven-plugin is not packaged in openEuler; the codehaus +# javacc-maven-plugin provides the same JavaCC grammar generation. sed -i \ -e 's/ph-javacc-maven-plugin/javacc-maven-plugin/' \ -e 's/com.helger.maven/org.codehaus.mojo/' \ javaparser-core/pom.xml + +# templating-maven-plugin is unavailable; use an equivalent filtered copy +# of src/main/java-templates into src/main/java instead. %pom_remove_plugin :templating-maven-plugin javaparser-core %pom_xpath_inject "pom:build" " <resources> @@ -73,16 +64,27 @@ sed -i \ <targetPath>\${basedir}/src/main/java</targetPath> </resource> </resources>" javaparser-core + +# bnd-maven-plugin (OSGi manifest generation) is not needed; provide an +# empty MANIFEST.MF so that the maven-jar-plugin manifestFile reference +# still resolves. +%pom_remove_plugin :bnd-maven-plugin javaparser-core +mkdir -p javaparser-core/target/classes/META-INF/ +touch javaparser-core/target/classes/META-INF/MANIFEST.MF + +# Only javaparser-core is packaged; tests, generators and the symbol +# solver carry dependencies that are not part of this package. %pom_disable_module javaparser-core-testing %pom_disable_module javaparser-core-testing-bdd -%pom_disable_module javaparser-symbol-solver-core -%pom_disable_module javaparser-symbol-solver-testing %pom_disable_module javaparser-core-generators %pom_disable_module javaparser-core-metamodel-generator %pom_disable_module javaparser-core-serialization +%pom_disable_module javaparser-symbol-solver-core +%pom_disable_module javaparser-symbol-solver-testing %build -%mvn_build +export JAVA_HOME=/usr/lib/jvm/java-17-openjdk +%mvn_build -f %install %mvn_install @@ -95,37 +97,5 @@ sed -i \ %license LICENSE LICENSE.APACHE LICENSE.GPL LICENSE.LGPL %changelog -* Tue Sep 08 2026 Yuki-Noa <9-nine-noa@users.noreply.github.com> - 3.27.1-4 -- Add patch 0003-javacc-grammar-avoid-diamond-operator.patch to replace - the diamond operator in java.jj with an explicit type argument, since - the distro's JavaCC 7.0.2 cannot parse it (build error: ParseException - "Encountered >" at line 3386 of java.jj). - -* Thu Feb 26 2026 yaoxin <1024769339@qq.com> - 3.27.1-3 -- Unuse bootstrap - -* Fri Feb 13 2026 yaoxin <1024769339@qq.com> - 3.27.1-2 -- Adapting to maven upgrade - -* Thu Oct 16 2025 yaoxin <1024769339@qq.com> - 3.27.1-1 -- Update to 3.27.1: - * Fix: Adjusts the range limits of lambda expression parameters - to ignore brackets. - * Fix: issue 4832 Resolving type of fully qualified varargs - invocation throws IndexOutOfBoundsException - * Fix: Issue 4829 Infinite loop in DifferenceElementCalculator - when calling setPermittedTypes - * XmlPrinter: fix duplicate attribute name in generated xml - * Use lambda parameter counts and block bodies for improved resolution - -* Thu May 15 2025 yaoxin <1024769339@qq.com> - 3.25.10-1 -- Upgrade to 3.25.10: - * Fix strange error when trying to find erasure of generic type - where one of two type parameters is an array - * Fix prevent infinite cycles with static imports - * Refactor ResolvedReferenceType#equals - * Fix cannot be 'abstract' and also 'private'. for a private - method in an interface - -* Sat Aug 1 2020 Jeffery.Gao <gaojianxing@huawei.com> - 3.3.5-1 -- Package init +* Mon Nov 02 2026 openEuler Build <build@openeuler.org> - 3.28.0-1 +- Initial package |
