Sync from SUSE:SLFO:Main maven-javadoc-plugin revision 9adad9d337175c886a408b3ef8e55676

This commit is contained in:
Adrian Schröter 2024-05-03 16:39:08 +02:00
commit 3fb2492d02
9 changed files with 34145 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>bootstrap</package>
</multibuild>

BIN
maven-javadoc-plugin-3.6.0-source-release.zip (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,386 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="maven-javadoc-plugin" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.name" value="Apache Maven Javadoc Plugin"/>
<!-- not used in this build.xml file, but used for filtering the bootstrap resources -->
<property name="project.description"
value="The Apache Maven Javadoc Plugin is a plugin that uses the javadoc tool for generating javadocs for the specified project."/>
<property name="project.groupId" value="org.apache.maven.plugins"/>
<property name="project.artifactId" value="maven-javadoc-plugin"/>
<property name="project.version" value="3.6.0"/>
<property name="project.organization.name" value="The Apache Software Foundation"/>
<property name="spec.version" value="3.6"/>
<property name="compiler.source" value="1.8"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="src/main/java"/>
<property name="build.resourceDir" value="src/main/resources"/>
<property name="build.filteredResourceDir" value="src/main/filtered-resources"/>
<property name="build.testOutputDir" value="${build.dir}/test-classes"/>
<property name="build.testDir" value="src/test/java"/>
<property name="build.testResourceDir" value="src/test/resources"/>
<property name="test.reports" value="${build.dir}/test-reports"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<property name="build.mdoDir" value="src/main/mdo"/>
<property name="build.mdoOutputDir" value="${build.dir}/generated-sources/modello"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="build.test.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Code generation target -->
<!-- ====================================================================== -->
<target name="mdo" description="Generate sources from mdo files">
<mkdir dir="${build.mdoOutputDir}"/>
<macrodef name="modello-single-mode">
<attribute name="file"/>
<attribute name="mode"/>
<attribute name="version"/>
<sequential>
<exec executable="modello" failonerror="true">
<arg file="@{file}"/> <!-- model file -->
<arg value="@{mode}"/> <!-- output type -->
<arg file="${build.mdoOutputDir}"/> <!-- output directory -->
<arg value="@{version}"/> <!-- model version -->
<arg value="false"/> <!-- package with version -->
<arg value="8"/> <!-- java source -->
</exec>
</sequential>
</macrodef>
<macrodef name="modello">
<attribute name="file"/>
<attribute name="version" default="1.1.1"/>
<sequential>
<echo taskname="modello" message="Generating sources for @{file}"/>
<modello-single-mode file="@{file}" version="@{version}" mode="java"/>
<modello-single-mode file="@{file}" version="@{version}" mode="xpp3-reader"/>
<modello-single-mode file="@{file}" version="@{version}" mode="xpp3-writer"/>
</sequential>
</macrodef>
<modello file="${build.mdoDir}/javadocOptions.mdo"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" depends="mdo" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
encoding="UTF-8"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
<pathelement location="${build.mdoOutputDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.outputDir}">
<fileset dir="${build.resourceDir}"/>
</copy>
<copy todir="${build.outputDir}">
<fileset dir="${build.filteredResourceDir}"/>
<filterchain>
<expandproperties>
<propertyset>
<propertyref name="project.name"/>
<propertyref name="project.version"/>
<propertyref name="project.groupId"/>
<propertyref name="project.artifactId"/>
<propertyref name="project.description"/>
</propertyset>
</expandproperties>
</filterchain>
</copy>
<mkdir dir="${build.outputDir}/META-INF/maven/${project.groupId}/${project.artifactId}"/>
<propertyfile file="${build.outputDir}/META-INF/maven/${project.groupId}/${project.artifactId}/pom.properties">
<entry key="artifactId" value="${project.artifactId}"/>
<entry key="groupId" value="${project.groupId}"/>
<entry key="version" value="${project.version}"/>
</propertyfile>
<copy file="pom.xml" tofile="${build.outputDir}/META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml"/>
</target>
<!-- ====================================================================== -->
<!-- Target to generate Plexus component.xml -->
<!-- ====================================================================== -->
<target name="plexus"
depends="compile"
description="Generate Plexus component.xml">
<mkdir dir="${build.outputDir}/META-INF/plexus"/>
<java classname="org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
failonerror="true"
fork="true">
<!-- <jvmarg value="-verbose"/> -->
<classpath>
<path refid="build.classpath"/>
<pathelement location="${build.outputDir}"/>
</classpath>
<arg value="-X"/>
<arg value="-s"/>
<arg value="${build.srcDir}"/>
<arg value="-c"/>
<arg value="${build.outputDir}"/>
<arg value="-m"/>
<arg value="${build.outputDir}/META-INF/plexus"/>
<arg value="-o"/>
<arg value="${build.outputDir}/META-INF/plexus/components.xml"/>
</java>
</target>
<!-- ====================================================================== -->
<!-- Sisu javax.inject.Named generation target -->
<!-- ====================================================================== -->
<target name="sisu"
depends="compile"
description="Generate javax.inject.Name index">
<sequential>
<java classname="org.eclipse.sisu.space.SisuIndex"
failonerror="true"
fork="true">
<classpath>
<path refid="build.classpath"/>
</classpath>
<arg value="${build.outputDir}"/>
</java>
<move todir="${build.outputDir}/META-INF">
<fileset dir="META-INF"/>
</move>
</sequential>
</target>
<!-- ====================================================================== -->
<!-- Test-compilation target -->
<!-- ====================================================================== -->
<target name="compile-tests"
depends="plexus"
description="Compile the test code"
unless="test.skip">
<mkdir dir="${build.testOutputDir}"/>
<javac destdir="${build.testOutputDir}"
nowarn="false"
debug="true"
encoding="UTF-8"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.testDir}"/>
</src>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${build.outputDir}"/>
</classpath>
</javac>
<copy todir="${build.testOutputDir}">
<fileset dir="${build.testResourceDir}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Target to generate Plexus component.xml -->
<!-- ====================================================================== -->
<target name="plexus-tests"
depends="compile-tests"
description="Generate Plexus component.xml for tests"
unless="test.skip">
<mkdir dir="${build.outputDir}/META-INF/plexus"/>
<java classname="org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
failonerror="true"
fork="true">
<!-- <jvmarg value="-verbose"/> -->
<classpath>
<path refid="build.testclasspath"/>
<pathelement location="${build.outputDir}"/>
<pathelement location="${build.restOutputDir}"/>
</classpath>
<arg value="-X"/>
<arg value="-s"/>
<arg value="${build.testDir}"/>
<arg value="-c"/>
<arg value="${build.restOutputDir}"/>
<arg value="-m"/>
<arg value="${build.restOutputDir}/META-INF/plexus"/>
<arg value="-o"/>
<arg value="${build.restOutputDir}/META-INF/plexus/components.xml"/>
</java>
</target>
<!-- ====================================================================== -->
<!-- Run all tests -->
<!-- ====================================================================== -->
<target name="test"
depends="plexus-tests, junit-missing"
unless="junit.skipped"
description="Run the test cases">
<mkdir dir="${test.reports}"/>
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
<sysproperty key="basedir" value="."/>
<formatter type="xml"/>
<formatter type="plain" usefile="false"/>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${build.outputDir}"/>
<pathelement location="${build.testOutputDir}"/>
</classpath>
<batchtest todir="${test.reports}" unless="test">
<fileset dir="${build.testDir}">
<include name="**/Test*.java"/>
<include name="**/*Test.java"/>
<include name="**/*TestCase.java"/>
<exclude name="**/*Abstract*Test.java"/>
</fileset>
</batchtest>
<batchtest todir="${test.reports}" if="test">
<fileset dir="${build.testDir}">
<include name="**/${test}.java"/>
<exclude name="**/*Abstract*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="test-junit-present">
<available classname="junit.framework.Test" property="junit.present" classpathref="build.test.classpath"/>
</target>
<target name="test-junit-status"
depends="test-junit-present">
<condition property="junit.missing">
<and>
<isfalse value="${junit.present}"/>
<isfalse value="${test.skip}"/>
</and>
</condition>
<condition property="junit.skipped">
<or>
<isfalse value="${junit.present}"/>
<istrue value="${test.skip}"/>
</or>
</condition>
</target>
<target name="junit-missing"
depends="test-junit-status"
if="junit.missing">
<echo>=================================== WARNING ===================================</echo>
<echo> JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.</echo>
<echo>===============================================================================</echo>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" depends="mdo" description="Generates the Javadoc of the application">
<path id="src.path">
<pathelement location="${build.srcDir}"/>
<pathelement location="${build.mdoOutputDir}"/>
</path>
<javadoc sourcepathref="src.path"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
source="${compiler.source}"
verbose="false"
locale="en"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
encoding="UTF-8"
linksource="false"
breakiterator="false">
<classpath refid="build.classpath"/>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="sisu,plexus,test" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Implementation-Title" value="${project.name}"/>
<attribute name="Implementation-URL" value="http://maven.apache.org/plugins/${project.artifactId}/"/>
<attribute name="Implementation-Vendor" value="${project.organization.name}"/>
<attribute name="Implementation-Vendor-Id" value="${project.groupId}"/>
<attribute name="Implementation-Version" value="${project.version}"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Specification-Title" value="${project.name}"/>
<attribute name="Specification-Vendor" value="${project.organization.name}"/>
<attribute name="Specification-Version" value="${spec.version}"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

View File

@ -0,0 +1,173 @@
-------------------------------------------------------------------
Fri Jan 26 08:10:17 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Require maven-parent >= 40. The maven build will fail with
anything lower
-------------------------------------------------------------------
Wed Sep 20 07:04:26 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 3.6.0
* Bug
+ MJAVADOC-642: Setting maven.javadoc.isoffline seems to have no
effect
+ MJAVADOC-701: javadoc site is broken for projects that contain
modules
+ MJAVADOC-733: Alternative doclet page points to an SEO spammy
page
+ MJAVADOC-742: [REGRESSION] Transitive dependencies of
docletArtifact missing
+ MJAVADOC-757: Unresolvable link in javadoc tag with value
ResourcesBundleMojo#getAttachmentClassifier() found in
ResourcesBundleMojo
+ MJAVADOC-758: IOException --> NullPointerException in
JavadocUtil.copyResource
+ MJAVADOC-763: JavadocReportTest.testExceptions is broken
+ MJAVADOC-767: javadoc creates invalid --patch-module
statements
+ MJAVADOC-769: javadoc plugin can not deal with transitive
filename based modules
* Improvement
+ MJAVADOC-755: Clean up deprecated and unpreferred methods in
JavadocUtil
+ MJAVADOC-760: Cleanup dependency declarations as best possible
+ MJAVADOC-770: Allow building javadoc "the old fashioned way"
after Java 8
* Task
+ MJAVADOC-743: Drop use of deprecated localRepository mojo
parameter
+ MJAVADOC-765: Make build pass with Java 20
+ MJAVADOC-772: Refresh download page
* Dependency upgrade
+ MJAVADOC-761: Update to commons-io 2.13.0
+ MJAVADOC-766: Update plexus-archiver from 4.7.1 to 4.8.0
+ MJAVADOC-771: Upgrade Parent to 40
- Modified patches:
* maven-javadoc-plugin-bootstrap-resources.patch
+ regenerate in cycle
* no-override.patch
* stale-data-encoding.patch
+ rediff to changed line-endings
-------------------------------------------------------------------
Wed Sep 20 06:25:32 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 3.5.0
* Bug
+ MJAVADOC-696: Invalid anchors in Javadoc and plugin mojo
+ MJAVADOC-700: Plugin duplicates classes in Java 8 all-classes
lists
+ MJAVADOC-702: javadoc site creation ignores configuration
parameters
* Improvement
+ MJAVADOC-685: Deprecate parameter "stylesheet"
+ MJAVADOC-721: Parse stderr output and suppress informational
lines
+ MJAVADOC-729: Link to Javadoc references from JDK 17
+ MJAVADOC-731: Migrate components to JSR 330, get rid of
maven-artifact-transfer, update to parent 37
* Task
+ MJAVADOC-712: Remove remains of org.codehaus.doxia.sink.Sink
* Dependency upgrade
+ MJAVADOC-711: Upgrade plugins in ITs
+ MJAVADOC-714: Upgrade to Maven 3.2.5
+ MJAVADOC-719: Update Maven Archiver to 3.6.0
+ MJAVADOC-723: Upgrade Maven Reporting API to 3.1.1/Complete
with Maven Reporting Impl 3.2.0
+ MJAVADOC-738: Upgrade commons-text to 1.10.0
+ MJAVADOC-740: Upgrade Parent to 39
+ MJAVADOC-741: Upgrade plugins and components
- Modified patches:
* maven-javadoc-plugin-bootstrap-resources.patch
+ regenerate in cycle
* stale-data-encoding.patch
+ rediff to changed context
- Added patch:
* no-override.patch
+ allow building with older version of maven-reporting-api
- Removed patch:
* maven-javadoc-plugin-ioexception.patch
+ not necessary with this version
-------------------------------------------------------------------
Tue Oct 25 14:16:58 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* maven-javadoc-plugin-ioexception.patch
+ allow building with wider range of plexus-utils versions,
including the 3.5.0 that does not declare IOException as
thrown in functions where it is actually not thrown.
-------------------------------------------------------------------
Fri May 13 09:41:52 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Fix build with modello 2.0.0
-------------------------------------------------------------------
Mon Mar 14 06:23:46 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* stale-data-encoding.patch
+ use the same encoding when writing and getting the stale data
+ fixes build with utf-8 sources on non utf-8 platforms
-------------------------------------------------------------------
Fri Mar 11 07:05:23 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 3.3.2
* fixing several NPE errors and using new
maven-reporting-{api,impl}
- Removed patches:
* 0001-Port-to-current-plexus-utils.patch
* reproducible-footer.patch
+ not needed with the upstream code
- Modified patch:
* maven-javadoc-plugin-bootstrap-resources.patch
+ regenerate the resources to correspond to the new version
-------------------------------------------------------------------
Tue May 11 15:25:11 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Do not build against the legacy guava20 package any more
-------------------------------------------------------------------
Wed Mar 11 11:44:44 UTC 2020 - Fridrich Strba <fstrba@suse.com>
- Fix build with doxia 1.9.x
-------------------------------------------------------------------
Sun Nov 24 17:40:49 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 3.1.1
- Modified patch:
* maven-javadoc-plugin-bootstrap-resources.patch
+ Regenerate patch from the non-bootstrap build
-------------------------------------------------------------------
Thu Nov 21 16:33:35 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Fix build with maven-invoker-3.0.1 that has a new dependency
on maven-shared-utils
-------------------------------------------------------------------
Mon Oct 7 13:50:06 UTC 2019 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible-footer.patch to override build date (boo#1047218)
-------------------------------------------------------------------
Sat Apr 6 22:38:49 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Spruce up summary to not just repeat the name.
-------------------------------------------------------------------
Wed Apr 3 09:24:05 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of maven-jar-plugin 3.0.1
- Generate and customize ant build.xml file to use with the
bootstrap variang
- Create as a multibuild package to allow bootstrapping
- Added patch:
* maven-javadoc-plugin-bootstrap-resources.patch
+ For the bootstrap version, add pre-generated resources that
need maven-plugin-plugin and maven to be generated at build
time

209
maven-javadoc-plugin.spec Normal file
View File

@ -0,0 +1,209 @@
#
# spec file for package maven-javadoc-plugin
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "bootstrap"
%bcond_without bootstrap
%else
%bcond_with bootstrap
%endif
%global base_name maven-javadoc-plugin
Version: 3.6.0
Release: 0
Summary: Maven plugin for creating javadocs
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://maven.apache.org/plugins/maven-javadoc-plugin
Source0: https://repo1.maven.org/maven2/org/apache/maven/plugins/%{base_name}/%{version}/%{base_name}-%{version}-source-release.zip
Source1: %{base_name}-build.xml
Patch0: %{base_name}-bootstrap-resources.patch
Patch1: stale-data-encoding.patch
Patch2: no-override.patch
BuildRequires: apache-commons-cli
BuildRequires: apache-commons-io
BuildRequires: apache-commons-lang3
BuildRequires: apache-commons-text
BuildRequires: atinject
BuildRequires: fdupes
BuildRequires: google-guice
BuildRequires: guava
BuildRequires: httpcomponents-client
BuildRequires: httpcomponents-core
BuildRequires: javapackages-local
BuildRequires: jdom2
BuildRequires: maven-archiver
BuildRequires: maven-common-artifact-filters
BuildRequires: maven-doxia-core
BuildRequires: maven-doxia-logging-api
BuildRequires: maven-doxia-module-xhtml
BuildRequires: maven-doxia-sink-api
BuildRequires: maven-doxia-sitetools
BuildRequires: maven-invoker
BuildRequires: maven-lib
BuildRequires: maven-plugin-annotations
BuildRequires: maven-reporting-api >= 3.1.0
BuildRequires: maven-resolver-api
BuildRequires: maven-resolver-util
BuildRequires: maven-shared-utils
BuildRequires: maven-wagon-provider-api
BuildRequires: objectweb-asm
BuildRequires: plexus-archiver
BuildRequires: plexus-classworlds
BuildRequires: plexus-cli
BuildRequires: plexus-containers-component-annotations
BuildRequires: plexus-interactivity-api
BuildRequires: plexus-io
BuildRequires: plexus-languages
BuildRequires: plexus-utils
BuildRequires: qdox
BuildRequires: sisu-inject
BuildRequires: sisu-plexus
BuildRequires: unzip
BuildRequires: xbean
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
BuildRequires: mvn(org.apache.maven.plugins:maven-plugins:pom:)
BuildArch: noarch
%if %{with bootstrap}
Name: %{base_name}-bootstrap
BuildRequires: ant
BuildRequires: modello >= 2.0.0
BuildRequires: plexus-metadata-generator
%else
Name: %{base_name}
BuildRequires: xmvn
BuildRequires: mvn(org.apache.maven.plugins:maven-compiler-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugins:pom:) >= 40
BuildRequires: mvn(org.apache.maven.plugins:maven-resources-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-surefire-plugin)
BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin)
BuildRequires: mvn(org.codehaus.plexus:plexus-component-metadata)
BuildRequires: mvn(org.eclipse.sisu:sisu-maven-plugin)
Obsoletes: %{base_name}-bootstrap
#!BuildRequires: maven-compiler-plugin-bootstrap
#!BuildRequires: maven-jar-plugin-bootstrap
#!BuildRequires: maven-javadoc-plugin-bootstrap
#!BuildRequires: maven-plugin-plugin-bootstrap
#!BuildRequires: maven-resources-plugin-bootstrap
#!BuildRequires: maven-surefire-plugin-bootstrap
%endif
%description
The Maven Javadoc Plugin is a plugin that uses the javadoc tool for
generating javadocs for the specified project.
%if %{without bootstrap}
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%endif
%prep
%setup -q -n %{base_name}-%{version}
%if %{with bootstrap}
cp %{SOURCE1} build.xml
%patch0 -p1
%endif
%patch1 -p1
%patch2 -p1
%pom_xpath_remove pom:project/pom:parent/pom:relativePath
%pom_remove_dep :::test:
%build
%if %{with bootstrap}
mkdir -p lib
build-jar-repository -s lib \
apache-commons-lang3 \
apache-commons-text \
atinject \
commons-cli \
commons-io \
guava/guava \
guice/google-guice-no_aop \
httpcomponents/httpclient \
httpcomponents/httpcore \
jdom2/jdom2 \
maven-archiver/maven-archiver \
maven-common-artifact-filters/maven-common-artifact-filters \
maven-doxia/doxia-core \
maven-doxia/doxia-logging-api \
maven-doxia/doxia-module-xhtml \
maven-doxia/doxia-module-xhtml5 \
maven-doxia/doxia-sink-api \
maven-doxia-sitetools/doxia-site-renderer \
maven-invoker/maven-invoker \
maven/maven-artifact \
maven/maven-core \
maven/maven-model \
maven/maven-model-builder \
maven/maven-plugin-api \
maven/maven-settings \
maven-plugin-tools/maven-plugin-annotations \
maven-resolver/maven-resolver-api \
maven-resolver/maven-resolver-util \
maven-reporting-api/maven-reporting-api \
maven-shared-utils/maven-shared-utils \
maven-wagon/provider-api \
objectweb-asm/asm \
org.eclipse.sisu.inject \
org.eclipse.sisu.plexus \
plexus/archiver \
plexus-classworlds \
plexus/cli \
plexus-containers/plexus-component-annotations \
plexus/interactivity-api \
plexus/io \
plexus-languages/plexus-java \
plexus-metadata-generator \
plexus/utils \
qdox \
xbean/xbean-reflect
%{ant} -Dtest.skip=true jar
%else
xmvn --batch-mode --offline \
-Dmaven.test.skip=true -DmavenVersion=3.5.0 \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
-Dmaven.compiler.release=8 \
%endif
package org.apache.maven.plugins:maven-javadoc-plugin:aggregate
%endif
%{mvn_artifact} pom.xml target/%{base_name}-%{version}.jar
%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE
%doc NOTICE
%if %{without bootstrap}
%files javadoc -f .mfiles-javadoc
%license LICENSE
%doc NOTICE
%endif
%changelog

10
no-override.patch Normal file
View File

@ -0,0 +1,10 @@
--- maven-javadoc-plugin-3.5.0/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java 2023-09-14 14:27:44.286360008 +0200
+++ maven-javadoc-plugin-3.5.0/src/main/java/org/apache/maven/plugins/javadoc/JavadocReport.java 2023-09-14 14:34:08.848960654 +0200
@@ -118,7 +118,6 @@
}
/** {@inheritDoc} */
- @Override
public void generate(org.codehaus.doxia.sink.Sink sink, Locale locale) throws MavenReportException {
generate(sink, null, locale);
}

52
stale-data-encoding.patch Normal file
View File

@ -0,0 +1,52 @@
--- maven-javadoc-plugin-3.5.0/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java 2023-09-14 14:20:14.049981880 +0200
+++ maven-javadoc-plugin-3.5.0/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java 2023-09-14 14:25:18.258705774 +0200
@@ -41,6 +41,19 @@
*/
public class StaleHelper {
+ private static Charset getDataCharset()
+ {
+ if ( JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast( "9" )
+ && JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore( "12" ) )
+ {
+ return StandardCharsets.UTF_8;
+ }
+ else
+ {
+ return Charset.defaultCharset();
+ }
+ }
+
/**
* Compute the data used to detect a stale javadoc
*
@@ -56,13 +69,7 @@
String[] args = cmd.getArguments();
Collections.addAll(options, args);
- final Charset cs;
- if (JavaVersion.JAVA_SPECIFICATION_VERSION.isAtLeast("9")
- && JavaVersion.JAVA_SPECIFICATION_VERSION.isBefore("12")) {
- cs = StandardCharsets.UTF_8;
- } else {
- cs = Charset.defaultCharset();
- }
+ final Charset cs = getDataCharset();
for (String arg : args) {
if (arg.startsWith("@")) {
@@ -116,9 +123,11 @@
*/
public static void writeStaleData(Commandline cmd, Path path) throws MavenReportException {
try {
+ final Charset cs = getDataCharset();
+
String curdata = getStaleData(cmd);
Files.createDirectories(path.getParent());
- Files.write(path, Collections.singleton(curdata), Charset.defaultCharset());
+ Files.write(path, Collections.singleton(curdata), cs);
} catch (IOException e) {
throw new MavenReportException("Error checking stale data", e);
}
Only in maven-javadoc-plugin-3.5.0/src/main/java/org/apache/maven/plugins/javadoc: StaleHelper.java.orig
Only in maven-javadoc-plugin-3.5.0/src/main/java/org/apache/maven/plugins/javadoc: StaleHelper.java.rej