Group :: Development/Java
RPM: maven-jaxb2-plugin
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Packager: Igor Vlasenko <viy at altlinux.ru>
BuildRequires: /proc
BuildRequires: jpackage-compat
# Copyright (c) 2000-2009, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define gcj_support 0
Summary: Maven 2 JAXB 2.x Plugin
Name: maven-jaxb2-plugin
Version: 0.6.1
Release: alt1_1jpp5
Epoch: 0
Group: Development/Java
License: ASL 2.0
URL: https://maven-jaxb2-plugin.dev.java.net/
Source0: maven-jaxb2-plugin-0.6.1.tar.gz
# svn export https://maven-jaxb2-plugin.dev.java.net/svn/maven-jaxb2-plugin/tags/0.6.1 maven-jaxb2-plugin-0.6.1 --username guest
Source1: %{name}-jpp-depmap.xml
Source2: %{name}-settings.xml
Patch0: maven-jaxb2-plugin-pom.patch
Patch1: maven-jaxb2-plugin-ClasspathCatalogResolver.patch
Patch2: maven-jaxb2-plugin-XJC2Mojo.patch
BuildRequires: jpackage-utils >= 0:1.7.5
BuildRequires: maven2 >= 0:2.0.7
BuildRequires: maven2-plugin-antrun
BuildRequires: maven2-plugin-assembly
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-checkstyle
BuildRequires: maven2-plugin-dependency
BuildRequires: maven2-plugin-enforcer
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-plugin
BuildRequires: maven2-plugin-pmd
BuildRequires: maven2-plugin-project-info-reports
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-site
BuildRequires: maven2-plugin-source
BuildRequires: maven-release
BuildRequires: maven-surefire-plugin
BuildRequires: mojo-maven2-plugin-idlj
BuildRequires: mvn-anno-mojo
BuildRequires: stax_1_0_api
BuildRequires: sun-codemodel
BuildRequires: sun-jaxb-2.1-impl
BuildRequires: xml-commons-apis
Requires: maven2
Requires: mvn-anno-mojo
Requires: plexus-utils
Requires: stax_1_0_api
Requires: sun-codemodel
Requires: sun-jaxb-2.1-impl
Requires: xml-commons-apis
Requires(post): jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%if ! %{gcj_support}
BuildArch: noarch
%endif
%description
This Maven 2 plugin wraps the JAXB 2.x XJC compiler and
provides the capability to generate java sources from
schemas.
%package javadoc
Group: Development/Documentation
Summary: Javadoc for %{name}
%description javadoc
%{summary}.
%prep
%setup -q
%patch0 -b .sav0
%patch1 -b .sav1
%patch2 -b .sav2
%build
cp %{SOURCE2} maven2-settings.xml
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" maven2-settings.xml
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" maven2-settings.xml
mkdir external_repo
ln -s %{_javadir} external_repo/JPP
export M2SETTINGS=$(pwd)/maven2-settings.xml
export MAVEN_REPO_LOCAL=`pwd`/m2_repo/repository
mvn-jpp -e \
-s ${M2SETTINGS} \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven2.jpp.depmap.file=%{SOURCE1} \
install javadoc:javadoc
%install
# jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-maven-jaxb2-plugin-project.pom
%add_to_maven_depmap org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project %{version} JPP/%{name} maven-jaxb2-plugin-project
install -m 644 plugin/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-maven-jaxb2-plugin.pom
%add_to_maven_depmap org.jvnet.jaxb2.maven2 maven-jaxb2-plugin %{version} JPP/%{name} maven-jaxb2-plugin
install -m 644 plugin/target/maven-jaxb2-plugin-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}/maven-jaxb2-plugin-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# javadoc
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr plugin/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%files
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/*-%{version}.jar.*
%endif
%files javadoc
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog
…
Full changelog you can see here
BuildRequires: /proc
BuildRequires: jpackage-compat
# Copyright (c) 2000-2009, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the JPackage Project nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define gcj_support 0
Summary: Maven 2 JAXB 2.x Plugin
Name: maven-jaxb2-plugin
Version: 0.6.1
Release: alt1_1jpp5
Epoch: 0
Group: Development/Java
License: ASL 2.0
URL: https://maven-jaxb2-plugin.dev.java.net/
Source0: maven-jaxb2-plugin-0.6.1.tar.gz
# svn export https://maven-jaxb2-plugin.dev.java.net/svn/maven-jaxb2-plugin/tags/0.6.1 maven-jaxb2-plugin-0.6.1 --username guest
Source1: %{name}-jpp-depmap.xml
Source2: %{name}-settings.xml
Patch0: maven-jaxb2-plugin-pom.patch
Patch1: maven-jaxb2-plugin-ClasspathCatalogResolver.patch
Patch2: maven-jaxb2-plugin-XJC2Mojo.patch
BuildRequires: jpackage-utils >= 0:1.7.5
BuildRequires: maven2 >= 0:2.0.7
BuildRequires: maven2-plugin-antrun
BuildRequires: maven2-plugin-assembly
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-checkstyle
BuildRequires: maven2-plugin-dependency
BuildRequires: maven2-plugin-enforcer
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-plugin
BuildRequires: maven2-plugin-pmd
BuildRequires: maven2-plugin-project-info-reports
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-site
BuildRequires: maven2-plugin-source
BuildRequires: maven-release
BuildRequires: maven-surefire-plugin
BuildRequires: mojo-maven2-plugin-idlj
BuildRequires: mvn-anno-mojo
BuildRequires: stax_1_0_api
BuildRequires: sun-codemodel
BuildRequires: sun-jaxb-2.1-impl
BuildRequires: xml-commons-apis
Requires: maven2
Requires: mvn-anno-mojo
Requires: plexus-utils
Requires: stax_1_0_api
Requires: sun-codemodel
Requires: sun-jaxb-2.1-impl
Requires: xml-commons-apis
Requires(post): jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%if ! %{gcj_support}
BuildArch: noarch
%endif
%description
This Maven 2 plugin wraps the JAXB 2.x XJC compiler and
provides the capability to generate java sources from
schemas.
%package javadoc
Group: Development/Documentation
Summary: Javadoc for %{name}
%description javadoc
%{summary}.
%prep
%setup -q
%patch0 -b .sav0
%patch1 -b .sav1
%patch2 -b .sav2
%build
cp %{SOURCE2} maven2-settings.xml
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" maven2-settings.xml
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" maven2-settings.xml
mkdir external_repo
ln -s %{_javadir} external_repo/JPP
export M2SETTINGS=$(pwd)/maven2-settings.xml
export MAVEN_REPO_LOCAL=`pwd`/m2_repo/repository
mvn-jpp -e \
-s ${M2SETTINGS} \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
-Dmaven2.jpp.depmap.file=%{SOURCE1} \
install javadoc:javadoc
%install
# jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-maven-jaxb2-plugin-project.pom
%add_to_maven_depmap org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project %{version} JPP/%{name} maven-jaxb2-plugin-project
install -m 644 plugin/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-maven-jaxb2-plugin.pom
%add_to_maven_depmap org.jvnet.jaxb2.maven2 maven-jaxb2-plugin %{version} JPP/%{name} maven-jaxb2-plugin
install -m 644 plugin/target/maven-jaxb2-plugin-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}/maven-jaxb2-plugin-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# javadoc
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr plugin/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif
%files
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/*-%{version}.jar.*
%endif
%files javadoc
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog
…
Full changelog you can see here