rpms/maven-jxr/devel maven-jxr-build.xml, NONE, 1.1 maven-jxr-jpp-depmap.xml, NONE, 1.1 maven-jxr.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Deepak Bhole (dbhole) fedora-extras-commits at redhat.com
Tue Mar 13 22:47:48 UTC 2007


Author: dbhole

Update of /cvs/extras/rpms/maven-jxr/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18968/devel

Modified Files:
	.cvsignore sources 
Added Files:
	maven-jxr-build.xml maven-jxr-jpp-depmap.xml maven-jxr.spec 
Log Message:
auto-import maven-jxr-1.0-2jpp.1 on branch devel from maven-jxr-1.0-2jpp.1.src.rpm


--- NEW FILE maven-jxr-build.xml ---
<project name="maven-jxr" default="jar" basedir=".">
  <property file="${user.home}/.m2/maven.properties"/>
  <property name="maven.build.output" value="target/classes"/>
  <property name="maven.build.directory" value="target"/>
  <property name="maven.build.final.name" value="maven-jxr-1.0"/>
  <property name="maven.test.reports" value="${maven.build.directory}/test-reports"/>
  <property name="maven.test.output" value="target/test-classes"/>
  <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
  <path id="build.classpath">
    <fileset dir="lib">
      <include name="commons-collections.jar"/>
      <include name="plexus_utils.jar"/>
      <include name="oro.jar"/>
      <include name="velocity.jar"/>
    </fileset>
  </path>
  <target name="clean" description="Clean the output directory">
    <delete dir="${maven.build.directory}"/>
  </target>
  <target name="compile" depends="get-deps" description="Compile the code">
    <mkdir dir="${maven.build.output}"/>
    <javac destdir="${maven.build.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
      <src>
        <pathelement location="src/main/java"/>
      </src>
      <classpath refid="build.classpath"/>
    </javac>
    <copy todir="${maven.build.output}">
      <fileset dir="src/main/resources"/>
    </copy>
  </target>
  <target name="jar" depends="compile,test" description="Clean the JAR">
    <jar jarfile="${maven.build.directory}/${maven.build.final.name}.jar" basedir="${maven.build.output}" excludes="**/package.html"/>
  </target>
  <target name="compile-tests" depends="junit-present, compile" description="Compile the test code" if="junit.present">
    <mkdir dir="${maven.test.output}"/>
    <javac destdir="${maven.test.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
      <src>
        <pathelement location="src/test/java"/>
      </src>
      <classpath>
        <path refid="build.classpath"/>
        <pathelement location="${maven.build.output}"/>
      </classpath>
    </javac>
  </target>
  <target name="test" depends="junit-present, compile-tests" if="junit.present" description="Run the test cases">
    <mkdir dir="${maven.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.classpath"/>
        <pathelement location="${maven.build.output}"/>
        <pathelement location="${maven.test.output}"/>
      </classpath>
      <batchtest todir="${maven.test.reports}">
        <fileset dir="src/test/java">
          <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"/>
  </target>
  <target name="junit-present" depends="test-junit-present" unless="junit.present">
    <echo>================================= WARNING ================================</echo>
    <echo> Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. </echo>
    <echo>==========================================================================</echo>
  </target>
  <target name="test-offline">
    <condition property="maven.mode.offline">
      <equals arg1="${build.sysclasspath}" arg2="only"/>
    </condition>
  </target>
  <target name="get-deps" depends="test-offline" description="Download all dependencies" unless="maven.mode.offline">
    <mkdir dir="${maven.repo.local}"/>
    <mkdir dir="/home/dbhole/DIST/maven-jxr/maven-jxr/commons-collections/commons-collections/3.1"/>
    <get src="http://snapshots.maven.codehaus.org/maven2//commons-collections/commons-collections/3.1/commons-collections-3.1.jar" dest="${maven.repo.local}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" dest="${maven.repo.local}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/home/dbhole/DIST/maven-jxr/maven-jxr/plexus/plexus-utils/1.0.3"/>
    <get src="http://snapshots.maven.codehaus.org/maven2//plexus/plexus-utils/1.0.3/plexus-utils-1.0.3.jar" dest="${maven.repo.local}/plexus/plexus-utils/1.0.3/plexus-utils-1.0.3.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/plexus/plexus-utils/1.0.3/plexus-utils-1.0.3.jar" dest="${maven.repo.local}/plexus/plexus-utils/1.0.3/plexus-utils-1.0.3.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/home/dbhole/DIST/maven-jxr/maven-jxr/velocity/velocity-dep/1.4"/>
    <get src="http://snapshots.maven.codehaus.org/maven2//velocity/velocity-dep/1.4/velocity-dep-1.4.jar" dest="${maven.repo.local}/velocity/velocity-dep/1.4/velocity-dep-1.4.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/velocity/velocity-dep/1.4/velocity-dep-1.4.jar" dest="${maven.repo.local}/velocity/velocity-dep/1.4/velocity-dep-1.4.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/home/dbhole/DIST/maven-jxr/maven-jxr/oro/oro/2.0.7"/>
    <get src="http://snapshots.maven.codehaus.org/maven2//oro/oro/2.0.7/oro-2.0.7.jar" dest="${maven.repo.local}/oro/oro/2.0.7/oro-2.0.7.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/oro/oro/2.0.7/oro-2.0.7.jar" dest="${maven.repo.local}/oro/oro/2.0.7/oro-2.0.7.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/home/dbhole/DIST/maven-jxr/maven-jxr/velocity/velocity/1.4"/>
    <get src="http://snapshots.maven.codehaus.org/maven2//velocity/velocity/1.4/velocity-1.4.jar" dest="${maven.repo.local}/velocity/velocity/1.4/velocity-1.4.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/velocity/velocity/1.4/velocity-1.4.jar" dest="${maven.repo.local}/velocity/velocity/1.4/velocity-1.4.jar" usetimestamp="true" ignoreerrors="true"/>
  </target>
</project>


--- NEW FILE maven-jxr-jpp-depmap.xml ---
<dependencies>
  <dependency>
	<maven>
	  <groupId>junit</groupId>
	  <artifactId>junit</artifactId>
	  <version>3.8.1</version>
	  <scope>test</scope>
	</maven>
	<jpp>
	  <groupId>JPP</groupId>
	  <artifactId>junit</artifactId>
	  <version>3.8.1</version>
	</jpp>
  </dependency>

  <dependency>
	<maven>
	  <groupId>commons-collections</groupId>
	  <artifactId>commons-collections</artifactId>
	  <version>3.1</version>
	  <scope>runtime</scope>
	</maven>
	<jpp>
	  <groupId>JPP</groupId>
	  <artifactId>commons-collections</artifactId>
	  <version>3.1</version>
	</jpp>
  </dependency>

  <dependency>
	<maven>
	  <groupId>oro</groupId>
	  <artifactId>oro</artifactId>
	  <version>2.0.7</version>
	</maven>
	<jpp>
	  <groupId>JPP</groupId>
	  <artifactId>oro</artifactId>
	  <version>2.0.7</version>
	</jpp>
  </dependency>

  <dependency>
	<maven>
	  <groupId>plexus</groupId>
	  <artifactId>plexus-utils</artifactId>
	  <version>1.0.3</version>
	</maven>
	<jpp>
	  <groupId>JPP/plexus</groupId>
	  <artifactId>utils</artifactId>
	  <version>1.0.3</version>
	</jpp>
  </dependency>

  <dependency>
	<maven>
	  <groupId>velocity</groupId>
	  <artifactId>velocity</artifactId>
	  <version>1.4</version>
	</maven>
	<jpp>
	  <groupId>JPP</groupId>
	  <artifactId>velocity</artifactId>
	  <version>1.4</version>
	</jpp>
  </dependency>
</dependencies>


--- NEW FILE maven-jxr.spec ---
# Copyright (c) 2000-2005, 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 _with_gcj_support 1
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

# If you don't want to build with maven, and use straight ant instead,
# give rpmbuild option '--without maven'
%define _without_maven 1
%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

Name:           maven-jxr
Version:        1.0
Release:        2jpp.1%{?dist}
Epoch:          0
Summary:        Source cross referencing tool
License:        Apache Software License
Group:          Development/Java
URL:            http://maven.apache.org/doxia/

Source0:        %{name}-%{version}.tar.gz
# svn export http://svn.apache.org/repos/asf/maven/jxr/tags/maven-jxr-1.0/
#    maven-jxr/
# tar czf maven-jxr.tar.gz maven-jxr/
Source1:        %{name}-jpp-depmap.xml
Source2:        %{name}-build.xml

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%if ! %{gcj_support}
BuildArch:      noarch
%endif

BuildRequires:  jpackage-utils >= 0:1.7.2
%if %{with_maven}
BuildRequires:  maven2 >= 2.0.4
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-surefire
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-javadoc
%else
BuildRequires:  ant, ant-nodeps
%endif
BuildRequires:  junit >= 3.8.2
BuildRequires:  jakarta-commons-collections >= 3.1
BuildRequires:  oro >= 2.0.8
BuildRequires:  plexus-utils >= 1.2
BuildRequires:  velocity >= 1.4

Requires:       junit >= 3.8.2
Requires:       jakarta-commons-collections >= 3.1
Requires:       oro >= 2.0.8
Requires:       plexus-utils >= 1.2
Requires:       velocity >= 1.4

Requires(post):    jpackage-utils >= 0:1.7.2
Requires(postun):  jpackage-utils >= 0:1.7.2

%if %{gcj_support}
BuildRequires:          java-gcj-compat-devel
Requires(post):         java-gcj-compat
Requires(postun):       java-gcj-compat
%endif

%description
Maven JXR is a source cross referencing tool.

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

%description javadoc
Javadoc for %{name}.
%endif

%prep
%setup -q -n %{name}
cp -p %{SOURCE2} build.xml

%build

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

%if %{with_maven}

    mvn-jpp \
        -e \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        -Dmaven2-jpp.depmap.file=%{SOURCE1} \
        install javadoc:javadoc

%else

mkdir lib
build-jar-repository -s -p lib/ \
                        commons-collections \
                        oro \
                        plexus/utils \
                        velocity

ant -Dmaven.mode.offline=true

%endif

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

install -pm 644 target/%{name}-%{version}.jar \
                $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%add_to_maven_depmap org.apache.maven maven-jxr %{version} JPP %{name}

install -pm 644 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)

%if %{with_maven}
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}

cp -pr target/site/apidocs/* \
                $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/

ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%endif

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap

%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

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

%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/maven-jxr-1.0.jar.*
%endif

%if %{with_maven}
%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/*
%endif

%changelog
* Tue Feb 27 2007 Tania Bento <tbento at redhat.com> 0:1.0-2jpp.1
- Fixed %%Release.
- Fixed %%BuildRoot.
- Removed period from %%Summary.
- Removed %%Vendor.
- Removed %%Distribution.
- Removed %%post and %%postun sections for javadoc. 
- Added gcj support option.
- Fixed instructions on how to generate source drops.

* Tue Oct 17 2006 Deepak Bhole <dbhole at redhat.com> - 0:1.0-2jpp
- Update for maven 9jpp.

* Fri Jun 16 2006 Deepak Bhole <dbhole at redhat.com> - 0:1.0-1jpp
- Initial build


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/maven-jxr/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	13 Mar 2007 22:16:04 -0000	1.1
+++ .cvsignore	13 Mar 2007 22:47:15 -0000	1.2
@@ -0,0 +1 @@
+maven-jxr-1.0.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/maven-jxr/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	13 Mar 2007 22:16:04 -0000	1.1
+++ sources	13 Mar 2007 22:47:15 -0000	1.2
@@ -0,0 +1 @@
+e66d250450bf5669da0d190f93871744  maven-jxr-1.0.tar.gz




More information about the fedora-extras-commits mailing list