Honour source parameter in javadoc mojo

This commit is contained in:
Mat Booth 2020-07-09 18:14:45 +01:00
parent 7cb11962ca
commit 3210b763be
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From cc643c14f5f6d3c623e9d1afe48265be236db97a Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Thu, 9 Jul 2020 17:52:47 +0100
Subject: [PATCH 4/4] Honour source parameter
---
.../main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java
index 3d6ef5e..ea18b2a 100644
--- a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/JavadocMojo.java
@@ -84,6 +84,9 @@ public class JavadocMojo
@Parameter( defaultValue = "${project.build.directory}", required = true )
private File buildDirectory;
+ @Parameter( property = "source" )
+ private String source;
+
private static String quoted( Object obj )
{
String arg = obj.toString();
@@ -226,6 +229,10 @@ public class JavadocMojo
opts.add( quoted( docencoding ) );
opts.add( "-doctitle" );
opts.add( quoted( "Javadoc for package XXX" ) );
+ if ( source != null ) {
+ opts.add( "-source" );
+ opts.add( quoted( source ) );
+ }
for ( Path file : files )
opts.add( quoted( file ) );
--
2.26.2

View File

@ -10,7 +10,7 @@
Name: xmvn
Version: 3.1.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Local Extensions for Apache Maven
License: ASL 2.0
@ -25,6 +25,8 @@ Patch1: 0001-Prefer-namespaced-metadata-when-duplicates-are-found.patch
Patch2: 0002-Make-xmvn-subst-honor-settings-for-ignoring-duplicat.patch
# Downstream bug-fix patch from modular branch:
Patch3: 0003-Fix-requires-generation-for-self-depending-packages.patch
# Submitted upstream: https://github.com/fedora-java/xmvn/pull/57
Patch4: 0004-Honour-source-parameter.patch
BuildArch: noarch
@ -213,6 +215,7 @@ This package provides %{summary}.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# Bisect IT has no chances of working in local, offline mode, without
# network access - it needs to access remote repositories.
@ -362,6 +365,9 @@ cp -P ${maven_home}/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
%doc LICENSE NOTICE
%changelog
* Thu Jul 09 2020 Mat Booth <mat.booth@redhat.com> - 3.1.0-5
- Honour source parameter in javadoc mojo
* Fri Jun 26 2020 Alexander Kurtakov <akurtako@redhat.com> 3.1.0-4
- Rebuild to pick jsr250-api switch to jakarta-annotations.