[Jpackage-commits] dist/maven-jxr/JPP-6 Makefile, NONE, 1.1 maven-jxr-build.xml, NONE, 1.1 maven-jxr-jpp-depmap.xml, NONE, 1.1 maven-jxr-settings.xml, NONE, 1.1 maven-jxr.spec, NONE, 1.1 sources, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Sun Dec 5 23:03:47 CET 2010


Update of /home/projects/jpackage/cvs/dist/maven-jxr/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv9148/JPP-6

Added Files:
	Makefile maven-jxr-build.xml maven-jxr-jpp-depmap.xml 
	maven-jxr-settings.xml maven-jxr.spec sources 
Log Message:
Import maven-jxr into JPP-6

--- NEW FILE: maven-jxr.spec ---
# Copyright (c) 2000-2010, 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 section   free

# If you don't want to build with maven, and use straight ant instead,
# give rpmbuild option '--without maven'

%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

%define bname jxr

%define maven_settings_file %{_builddir}/%{name}/settings.xml

Name:           maven-jxr
Version:        2.2
Release:        1%{?dist}
Epoch:          0
Summary:        Maven JXR
License:        Apache Software License 2.0
Group:          Development/Java
URL:            http://maven.apache.org/
Source0:        %{name}-%{version}.tar.gz
# svn export http://svn.apache.org/repos/asf/maven/jxr/tags/jxr-2.2/ maven-jxr-2.2


Source1:        %{name}-build.xml
Source2:        %{name}-jpp-depmap.xml
Source3:        %{name}-settings.xml
Source4:        %{name}-autogenerated-files.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

BuildArch:      noarch
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel = 0:1.6.0
BuildRequires:  ant >= 0:1.7.1
BuildRequires:  junit
%if %{with_maven}
BuildRequires:  maven2-common-poms
BuildRequires:  maven2 >= 0:2.0.8
BuildRequires:  maven2-plugin-ant
BuildRequires:  maven2-plugin-changelog
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-plugin
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-site
BuildRequires:  maven2-plugin-surefire
%endif
BuildRequires:  classworlds
BuildRequires:  jakarta-commons-collections
BuildRequires:  jakarta-commons-lang
BuildRequires:  jakarta-oro
BuildRequires:  jmock
BuildRequires:  maven2-bootstrap >= 0:2.0.8
BuildRequires:  maven-doxia >= 0:1.0
BuildRequires:  maven-shared-plugin-testing-harness
BuildRequires:  maven-shared-reporting-impl
BuildRequires:  plexus-container-default
BuildRequires:  plexus-i18n
BuildRequires:  plexus-utils
BuildRequires:  plexus-velocity
BuildRequires:  velocity14

Requires:  classworlds
Requires:  jakarta-commons-collections
Requires:  jakarta-commons-lang
Requires:  jakarta-oro
Requires:  maven2-bootstrap >= 0:2.0.8
Requires:  maven-shared-reporting-impl
Requires:  plexus-container-default
Requires:  plexus-i18n
Requires:  plexus-utils
Requires:  plexus-velocity
Requires:  velocity14

Requires(post):   jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5
Provides:  maven2-plugin-jxr = %{epoch}:%{version}-%{release}
Obsoletes: maven2-plugin-jxr < %{epoch}:2.0.5

%description
Maven JXR.

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation

%description javadoc
%{summary}.

%prep
%setup -q 
cp %{SOURCE1} build.xml
cp %{SOURCE3} settings.xml
gzip -dc %{SOURCE4} | tar xf -
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml

%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL

mkdir external_repo
ln -s %{_javadir} external_repo/JPP

export M2_SETTINGS=$(pwd)/settings.xml
%if %{with_maven}
mvn-jpp \
        -e \
        -s $M2_SETTINGS \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        -Dmaven.test.failure.ignore=true \
        ant:ant install javadoc:javadoc
%else
#maven2/artifact \
#maven2/artifact-manager \
#maven2/core \
#maven2/model \
#maven2/plugin-api \
#maven2/plugin-descriptor \
#maven2/profile \
#maven2/project \
#maven2/settings \
#maven-wagon/provider-api \
#plexus/container-default \

export CLASSPATH=$(build-classpath \
classworlds \
commons-collections \
commons-lang \
maven2/artifact \
maven2/artifact-manager \
maven2/model \
maven2/plugin-api \
maven2/project \
maven2/reporting-api \
maven-doxia/site-renderer \
maven-shared/plugin-testing-harness \
maven-shared/reporting-impl \
plexus/container-default \
plexus/utils \
oro \
velocity14 \
)
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd maven-jxr
   ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd

export CLASSPATH=$(build-classpath \
classworlds \
commons-collections \
commons-lang \
maven2/artifact \
maven2/artifact-manager \
maven2/core \
maven2/model \
maven2/monitor \
maven2/plugin-api \
maven2/plugin-descriptor \
maven2/plugin-parameter-documenter \
maven2/plugin-registry \
maven2/plugin-repository-metadata \
maven2/profile \
maven2/project \
maven2/reporting-api \
maven2/settings \
maven-doxia/core \
maven-doxia/sink-api \
maven-doxia/site-renderer \
maven-shared/plugin-testing-harness \
maven-shared/reporting-impl \
oro \
plexus/container-default \
plexus/i18n \
plexus/utils \
plexus/velocity \
velocity14 \
)

CLASSPATH=$CLASSPATH:$(pwd)/maven-jxr/target/maven-jxr-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd maven-jxr-plugin
mkdir -p target/classes/META-INF/maven/org.apache.maven.plugins/maven-jxr-plugin
cp pom.xml target/classes/META-INF/maven/org.apache.maven.plugins/maven-jxr-plugin
cat > target/classes/META-INF/maven/org.apache.maven.plugins/maven-jxr-plugin/pom.properties <<EOT
version=%{version}
groupId=org.apache.maven.plugins
artifactId=maven-jxr-plugin
EOT
   ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
%endif

%install
rm -rf $RPM_BUILD_ROOT
# jars/poms
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/plugins

%add_to_maven_depmap org.apache.maven.jxr jxr %{version} JPP %{name}-parent
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-%{name}-parent.pom

install -m 644 %{name}/target/%{name}-%{version}.jar \
               $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%add_to_maven_depmap org.apache.maven %{name} %{version} JPP %{name}
install -pm 644 %{name}/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-%{name}.pom

(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

install -m 644 %{name}-plugin/target/%{name}-plugin-%{version}.jar \
    $RPM_BUILD_ROOT%{_datadir}/maven2/plugins/jxr-plugin-%{version}.jar
%add_to_maven_depmap org.apache.maven.plugins %{name}-plugin %{version} JPP/maven2/plugins jxr-plugin
install -m 644 %{name}-plugin/pom.xml \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven2.plugins-jxr-plugin.pom
(cd $RPM_BUILD_ROOT%{_datadir}/maven2/plugins && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)


# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/
cp -pr %{name}/target/site/apidocs/* \
                    $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/plugin
cp -pr %{name}-plugin/target/site/apidocs/* \
                    $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/plugin
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%{_javadir}/*
%{_datadir}/maven2
%{_mavendepmapfragdir}

%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}

%changelog
* Sun Dec 05 2010 Ralph Apel <r.apel at r-apel.de> 0:2.2-1
- 2.2 for JPP-6

* Tue Feb 12 2008 Ralph Apel <r.apel at r-apel.de> 0:2.1-2jpp
- Change scope of maven-shared-plugin-testing-harness to test

* Thu Feb 07 2008 Ralph Apel <r.apel at r-apel.de> 0:2.1-1jpp
- First release


--- NEW FILE: Makefile ---
# Makefile for source rpm: maven-jxr
# $Id: Makefile,v 1.1 2010/12/05 22:03:45 jpackage Exp $
NAME := maven-jxr
SPECFILE = $(firstword $(wildcard *.spec))

define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef

MAKEFILE_COMMON := $(shell $(find-makefile-common))

ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef

MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif

include $(MAKEFILE_COMMON)

--- NEW FILE: maven-jxr-jpp-depmap.xml ---
<dependencies>
  <dependency>
	<maven>
	  <groupId>javax.servlet</groupId>
	  <artifactId>servlet-api</artifactId>
	  <version>2.5</version>
	</maven>
	<jpp>
	  <groupId>JPP</groupId>
	  <artifactId>servlet_2_5_api</artifactId>
	  <version>2.5</version>
	</jpp>
  </dependency>

  <dependency>
	<maven>
	  <groupId>org.apache.maven.plugin-testing</groupId>
	  <artifactId>maven-plugin-testing-harness</artifactId>
	  <version>1.2</version>
	</maven>
	<jpp>
	  <groupId>JPP/maven-shared</groupId>
	  <artifactId>plugin-testing-harness</artifactId>
	  <version>1.2</version>
	</jpp>
  </dependency>

</dependencies>

--- NEW FILE: sources ---
fd8d0a3c05dd7106fa9f91a5ee8b7b23  maven-jxr-2.2.tar.gz
ac3e764836feb01b802b02d5f0a15155  maven-jxr-autogenerated-files.tar.gz

--- NEW FILE: maven-jxr-build.xml ---

--- NEW FILE: maven-jxr-settings.xml ---
<settings>
	<profiles>
		<profile>
			<id>JPP</id>
			<repositories>
				<repository>
					<id>internal</id>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>external</id>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>local</id>
					<layout>jpp</layout>
					<url>__MAVENREPO_DIR_PLACEHOLDER__</url>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>plugins-internal</id>
					<name>plugins-internal</name>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-external</id>
					<name>plugins-external</name>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-maven</id>
					<name>plugins-maven</name>
					<layout>jpp</layout>
					<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>
	<activeProfiles>
		<activeProfile>JPP</activeProfile>
	</activeProfiles>
</settings>




More information about the JPackage-commits mailing list