Name:           maven-doxia
Version:        1.7
Release:        11
Epoch:          0
Summary:        Content generation framework
License:        ASL 2.0
URL:            http://maven.apache.org/doxia/
Source0:        https://repo1.maven.org/maven2/org/apache/maven/doxia/doxia/%{version}/doxia-%{version}-source-release.zip
BuildArch:      noarch
BuildRequires:  maven-local mvn(commons-lang:commons-lang) mvn(junit:junit)
BuildRequires:  mvn(org.apache.httpcomponents:httpclient) mvn(org.apache.httpcomponents:httpcore)
BuildRequires:  mvn(org.apache.maven:maven-parent:pom:) mvn(org.codehaus.modello:modello-maven-plugin)
BuildRequires:  mvn(org.codehaus.plexus:plexus-component-annotations) mvn(org.codehaus.plexus:plexus-component-metadata)
BuildRequires:  mvn(org.codehaus.plexus:plexus-container-default) mvn(org.codehaus.plexus:plexus-utils)
BuildRequires:  mvn(xmlunit:xmlunit) mvn(com.lowagie:itext) mvn(org.pegdown:pegdown)
BuildRequires:  mvn(commons-collections:commons-collections) mvn(commons-configuration:commons-configuration)
BuildRequires:  mvn(log4j:log4j:1.2.12) mvn(org.apache.xmlgraphics:fop)
Obsoletes:      maven-doxia-book < %{epoch}:%{version}-%{release} maven-doxia-maven-plugin < %{epoch}:%{version}-%{release}

Patch0001:      0001-Fix-itext-dependency.patch
Patch0002:      0002-Update-to-Plexus-Container-1.5.5.patch
Patch0003:      0003-Disable-tests-which-rely-on-ordering-in-set.patch
Patch0004:      0004-Port-to-fop-2.0.patch

%description
Doxia is a content generation framework which aims to provide its users with powerful techniques for generating static
and dynamic content: Doxia can be used in web-based publishing context to generate static sites, in addition to being
incorporated into dynamic content generation systems like blogs, wikis and content management systems.

%package core
Summary: Core module for maven-doxia

%description core
This package provides core module for maven-doxia.

%package logging-api
Summary: Logging-api module for maven-doxia

%description logging-api
This package provides logging-api module for maven-doxia.

%package module-apt
Summary: APT module for maven-doxia

%description module-apt
This package provides APT module for maven-doxia.

%package module-confluence
Summary: Confluence module for maven-doxia

%description module-confluence
This package provides confluence module for maven-doxia.

%package module-docbook-simple
Summary: Simplified DocBook module for maven-doxia

%description module-docbook-simple
This package provides docBook module for maven-doxia.

%package module-fml
Summary: FML module for maven-doxia

%description module-fml
This package provides FML module for maven-doxia.

%package module-fo
Summary: FO module for maven-doxia

%description module-fo
This package provides FO module for maven-doxia.

%package module-itext
Summary: iText module for maven-doxia

%description module-itext
This package provides iText module for maven-doxia.

%package module-markdown
Summary: Markdown module for maven-doxia

%description module-markdown
This package provides markdown module for maven-doxia.

%package module-latex
Summary: Latex module for maven-doxia

%description module-latex
This package provides latex module for maven-doxia.

%package module-rtf
Summary: RTF module for maven-doxia

%description module-rtf
This package provides RTF module for maven-doxia.

%package modules
Summary: Doxia modules for several markup languages.

%description modules
This package provides doxia modules for several markup languages.

%package module-twiki
Summary: TWiki module for maven-doxia

%description module-twiki
This package provides twiki module for maven-doxia.

%package module-xdoc
Summary: XDoc module for maven-doxia

%description module-xdoc
This package provides xdoc module for maven-doxia.

%package module-xhtml
Summary: XHTML module for maven-doxia

%description module-xhtml
This package provides xhtml module for maven-doxia.

%package sink-api
Summary: Sink-api module for maven-doxia

%description sink-api
This package provides sink-api module for maven-doxia.

%package tests
Summary: Tests for maven-doxia

%description tests
This package provides tests for maven-doxia.

%package help
Summary:  Help document for maven-doxia
Provides: %{name}-javadoc = %{version}-%{release} %{name}-test-docs = %{version}-%{release}
Obsoletes:%{name}-javadoc < %{version}-%{release} %{name}-test-docs < %{version}-%{release}

%description help
Help document for maven-doxia.

%prep
%autosetup -n doxia-%{version} -p1
%pom_remove_plugin org.codehaus.mojo:clirr-maven-plugin pom.xml
%pom_remove_plugin :apache-rat-plugin
%pom_xpath_inject "pom:plugin[pom:artifactId[text()='modello-maven-plugin']]"\
"/pom:executions/pom:execution/pom:configuration" \
"<useJava5>true</useJava5>" doxia-modules/doxia-module-fml/pom.xml

rm doxia-core/src/test/java/org/apache/maven/doxia/util/XmlValidatorTest.java
rm doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownParserTest.java
%mvn_package :::tests: tests

%build
export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"
%mvn_build -s

%install
%mvn_install

%files -f .mfiles-doxia
%dir %{_javadir}/maven-doxia
%doc LICENSE NOTICE
%files core -f .mfiles-doxia-core
%files logging-api -f .mfiles-doxia-logging-api
%files module-apt -f .mfiles-doxia-module-apt
%files module-confluence -f .mfiles-doxia-module-confluence
%files module-docbook-simple -f .mfiles-doxia-module-docbook-simple
%files module-fml -f .mfiles-doxia-module-fml
%files module-fo -f .mfiles-doxia-module-fo
%files module-itext -f .mfiles-doxia-module-itext
%files module-markdown -f .mfiles-doxia-module-markdown
%files module-latex -f .mfiles-doxia-module-latex
%files module-rtf -f .mfiles-doxia-module-rtf
%files modules -f .mfiles-doxia-modules
%files module-twiki -f .mfiles-doxia-module-twiki
%files module-xdoc -f .mfiles-doxia-module-xdoc
%files module-xhtml -f .mfiles-doxia-module-xhtml
%files sink-api -f .mfiles-doxia-sink-api
%files tests -f .mfiles-tests
%files help -f .mfiles-javadoc -f .mfiles-doxia-test-docs

%changelog
* Tue Jan 21 2020 lihao <lihao129@huawei.com> - 0:1.7-11
- init package
