#1 enforce correct minimum java source and target versions
Closed 4 years ago by jjelen. Opened 4 years ago by decathorpe.
Unknown source master  into  master

@@ -0,0 +1,15 @@

+ diff --git a/src/pom.xml b/src/pom.xml

+ index 71f27a2..0928763 100644

+ --- a/src/pom.xml

+ +++ b/src/pom.xml

+ @@ -151,8 +151,8 @@

+                      <artifactId>maven-compiler-plugin</artifactId>

+                      <version>2.0.2</version>

+                      <configuration>

+ -                        <source>1.4</source>

+ -                        <target>1.4</target>

+ +                        <source>1.6</source>

+ +                        <target>1.6</target>

+                      </configuration>

+                  </plugin>

+                  <plugin>

file modified
+8 -1
@@ -1,6 +1,6 @@

  Name:          struts

  Version:       1.3.10

- Release:       24%{?dist}

+ Release:       25%{?dist}

  Summary:       Web application framework

  License:       ASL 2.0

  URL:           http://struts.apache.org/
@@ -11,6 +11,9 @@

  # tar czf struts-1.3.10-clean-src.tar.gz struts-1.3.10

  Source0:       %{name}-%{version}-clean-src.tar.gz

  

+ # patch to enforce java 6 source and target versions

+ Patch0:        struts-java-target.patch

+ 

  # fix build for junit servlet-3.0-api

  Patch1:        struts-1.3.10-fix-build.patch

  # Thanks to Arun Babu Neelicattu aneelica@redhat.com
@@ -69,6 +72,7 @@

  find -name "*.jar" -delete

  find -name "*.class" -delete

  

+ %patch0 -p1

  %patch1 -p1

  %patch2 -p0

  %patch3 -p1
@@ -124,6 +128,9 @@

  %license LICENSE.txt NOTICE.txt

  

  %changelog

+ * Tue Nov 05 2019 Fabio Valentini <decathorpe@gmail.com> - 1.3.10-25

+ - Enforce correct minimum java source and target versions.

+ 

  * Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-24

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

  

This package uses generics, which were only introduced with Java 5, but it targets java 1.4.

With xmvn 3.0.0 this isn't a problem, since it overrides these targets to 1.6+ anyway, but it will break without fixing this with xmvn 3.1.0, because it will drop the implicit target and source version overrides.

Pull-Request has been closed by jjelen

4 years ago