Please update the jira[1] with a more descriptive title really saying what it does. (maybe saying "We are not ready to use java 8 that's modern for us..") Sorry to be so sarcastic but It's really ridiculous "Back to the future" change...... Please note first I wanted to veto this commit but honestly I don't want to waste my time. With such change we clearly say to potential contributors they will be stuck to use old java if they want to help contribute/contribute
[1] https://issues.apache.org/jira/browse/MSITE-843 On Mon, 8 Jul 2019 at 03:53, <[email protected]> wrote: > This is an automated email from the ASF dual-hosted git repository. > > michaelo pushed a commit to branch MSITE-844 > in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git > > commit 435b018720c83688f6223d7b490cec4442439600 > Author: tibordigana <[email protected]> > AuthorDate: Fri Jul 5 12:47:53 2019 +0200 > > [MSITE-844] Downgrade to Java 7 > > This closes #10 > --- > Jenkinsfile | 2 +- > pom.xml | 2 +- > .../maven/plugins/site/deploy/SiteStageMojo.java | 14 +++++++---- > .../site/render/AbstractSiteRenderingMojo.java | 28 > ++++++++++++---------- > 4 files changed, 27 insertions(+), 19 deletions(-) > > diff --git a/Jenkinsfile b/Jenkinsfile > index 81caf8c..5a994fd 100644 > --- a/Jenkinsfile > +++ b/Jenkinsfile > @@ -17,4 +17,4 @@ > * under the License. > */ > > -asfMavenTlpPlgnBuild(jdk:['8','11','12'], maven:['3.0.x', '3.2.x', > '3.3.x', '3.5.x']) > +asfMavenTlpPlgnBuild(jdk:['7','8','11','12'], maven:['3.0.x', '3.2.x', > '3.3.x', '3.5.x']) > diff --git a/pom.xml b/pom.xml > index 4e749b9..13db5f1 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -196,7 +196,7 @@ under the License. > > <properties> > <mavenVersion>3.0</mavenVersion> > - <javaVersion>8</javaVersion> > + <javaVersion>7</javaVersion> > <!-- for dependencies --> > <doxiaVersion>1.9</doxiaVersion> > <doxiaSitetoolsVersion>1.9.1</doxiaSitetoolsVersion> > diff --git > a/src/main/java/org/apache/maven/plugins/site/deploy/SiteStageMojo.java > b/src/main/java/org/apache/maven/plugins/site/deploy/SiteStageMojo.java > index c3d10ab..a9b8848 100644 > --- a/src/main/java/org/apache/maven/plugins/site/deploy/SiteStageMojo.java > +++ b/src/main/java/org/apache/maven/plugins/site/deploy/SiteStageMojo.java > @@ -164,10 +164,14 @@ public class SiteStageMojo > return null; > } > > - return reactorProjects // > - .stream() // > - .filter( mavenProject -> mavenProject.isExecutionRoot() ) // > - .findFirst().get(); > - > + // todo Lambda Java 1.8 > + for ( MavenProject reactorProject : reactorProjects ) > + { > + if ( reactorProject.isExecutionRoot() ) > + { > + return reactorProject; > + } > + } > + return null; > } > } > diff --git > a/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java > b/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java > index 0d89700..7336d0f 100644 > --- > a/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java > +++ > b/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java > @@ -61,7 +61,6 @@ import java.util.LinkedHashMap; > import java.util.List; > import java.util.Locale; > import java.util.Map; > -import java.util.stream.Collectors; > > import static org.apache.maven.shared.utils.logging.MessageUtils.buffer; > > @@ -231,8 +230,7 @@ public abstract class AbstractSiteRenderingMojo > protected List<MavenReportExecution> getReports() > throws MojoExecutionException > { > - List<MavenReportExecution> allReports; > - > + final List<MavenReportExecution> allReports; > if ( isMaven3OrMore() ) > { > // Maven 3 > @@ -257,18 +255,24 @@ public abstract class AbstractSiteRenderingMojo > else > { > // Maven 2 > - // [olamy] do we still need Maven2 support?? > - allReports = reports.stream() > - .map( report -> new MavenReportExecution( report ) ) > - .collect( Collectors.toList() ); > + allReports = new ArrayList<>( reports.size() ); > + for ( MavenReport report : reports ) > + { > + allReports.add( new MavenReportExecution( report ) ); > + } > } > > // filter out reports that can't be generated > - > - return allReports.stream() // > - .filter( mavenReportExecution -> > mavenReportExecution.canGenerateReport() ) // > - .collect( Collectors.toList() ); > - > + // todo Lambda Java 1.8 > + List<MavenReportExecution> reportExecutions = new ArrayList<>( > allReports.size() ); > + for ( MavenReportExecution exec : allReports ) > + { > + if ( exec.canGenerateReport() ) > + { > + reportExecutions.add( exec ); > + } > + } > + return reportExecutions; > } > > /** > > -- Olivier Lamy http://twitter.com/olamy | http://linkedin.com/in/olamy
