[Jpackage-commits] dist/jsr-305/JPP-6 Makefile, NONE, 1.1 jsr-305-jpp-depmap.xml, NONE, 1.1 jsr-305-pom.patch, NONE, 1.1 jsr-305-ri-build.xml, NONE, 1.1 jsr-305-settings.xml, NONE, 1.1 jsr-305.spec, NONE, 1.1 sources, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Mon Dec 20 16:45:01 CET 2010


Update of /home/projects/jpackage/cvs/dist/jsr-305/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv25627/JPP-6

Added Files:
	Makefile jsr-305-jpp-depmap.xml jsr-305-pom.patch 
	jsr-305-ri-build.xml jsr-305-settings.xml jsr-305.spec sources 
Log Message:
Import jsr-305 into JPP-6

--- NEW FILE: jsr-305-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>

--- NEW FILE: jsr-305.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 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 with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

%define section free

Name:           jsr-305
Version:        0.1
Release:        3%{?dist}
Epoch:          0
Summary:        JSR 305: Annotations for Software Defect Detection in Java
# http://groups.google.com/group/jsr-305/browse_thread/thread/8105869a258c8c4f
License:        BSD
Group:          Development/Libraries/Java
URL:            http://code.google.com/p/jsr-305/
# svn export -r '{20101219}' http://jsr-305.googlecode.com/svn/trunk/ jsr-305-0.1
# tar cjf jsr-305-0.1.tar.bz2 jsr-305-0.1
Source0:        jsr-305-0.1.tar.bz2
Source1:        jsr-305-ri-build.xml
Source2:        jsr-305-settings.xml
Source3:        jsr-305-jpp-depmap.xml
Patch0:         jsr-305-pom.patch
Provides:       jsr305 = %{epoch}:%{version}-%{release}
Requires:       jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  java-javadoc
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  ant >= 0:1.7.1
%if %{with_maven}
BuildRequires:  maven2 >= 0:2.0.8
%endif
%if %{gcj_support}
BuildRequires:  java-gcj-compat-devel
%else
Buildarch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post):    jpackage-utils >= 0:1.7.5
Requires(postun):  jpackage-utils >= 0:1.7.5

%description
This project contains reference implementations, test cases, and other
documents under source code control for Java Specification Request 305:
Annotations for Software Defect Detection. More information at the Google
group: http://groups.google.com/group/jsr-305.

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation
Provides:       jsr305-javadoc = %{epoch}:%{version}-%{release}

%description javadoc
%{summary}.

%if %{with_maven}
%package manual
Summary:        Documents for %{name}
Group:          Development/Documentation

%description manual
%{summary}.
%endif

%prep
%setup -q
%{__cp} -a %{SOURCE1} ri/build.xml
cp %{SOURCE2} settings.xml
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
%patch0 -b .sav0

%build
%if %{with_maven}
mkdir external_repo
ln -s %{_javadir} external_repo/JPP

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

mvn-jpp \
        -e \
        -s settings.xml \
        -Dmaven2.jpp.depmap.file=%{SOURCE3} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        install javadoc:aggregate site
#       -Dmaven.test.failure.ignore=true \

%else
export OPT_JAR_LIST=:
export CLASSPATH=
pushd ri
%{ant} -Dversion=%{version} -Djava.javadoc=%{_javadocdir}/java
popd
%endif

%install
%{__rm} -rf %{buildroot}

# jars
install -d -m 755 %{buildroot}%{_javadir}
%if %{with_maven}
install -m 644 ri/target/ri-0.1-SNAPSHOT.jar \
        %{buildroot}%{_javadir}/%{name}-%{version}.jar
install -m 644 proposedAnnotations/target/proposedAnnotations-0.1-SNAPSHOT.jar \
        %{buildroot}%{_javadir}/%{name}-proposedAnnotations-%{version}.jar
install -m 644 tcl/target/tcl-0.1-SNAPSHOT.jar \
        %{buildroot}%{_javadir}/%{name}-tcl-%{version}.jar
%else
install -m 644 ri/jsr-305-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
%endif
%{__ln_s} %{name}-%{version}.jar %{buildroot}%{_javadir}/jsr305-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} ${jar/-%{version}/}; done)

# poms

install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
install -m 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}-parent.pom
%add_to_maven_depmap org.jsr-305 %{name} %{version} JPP %{name}-parent
install -m 644 ri/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap org.jsr-305 ri %{version} JPP %{name}
install -m 644 tcl/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}-tcl.pom
%add_to_maven_depmap org.jsr-305 tcl %{version} JPP %{name}


# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
%if %{with_maven}
%{__cp} -a target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%else
%{__cp} -a ri/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%endif
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/jsr305-%{version}
%{__ln_s} jsr305-%{version} %{buildroot}%{_javadocdir}/jsr305

%if %{with_maven}
rm -rf target/site/apidocs
install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}
%{__cp} -a target/site/* %{buildroot}%{_docdir}/%{name}-%{version}
%endif

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

%clean
%{__rm} -rf %{buildroot}

%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(0644,root,root,0755)
%{_javadir}/*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/*
%endif

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%{_javadocdir}/jsr305-%{version}
%{_javadocdir}/jsr305

%if %{with_maven}
%files manual
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}
%endif

%changelog
* Mon Dec 20 2010 Ralph Apel <r.apel at r-apel.de> 0:0.1-3
- svn r50 for JPP-6
- build with maven by default
- fix poms and depmap frags

* Mon Apr 20 2009 David Walluck <dwalluck at redhat.com> 0:0.1-2
- add javadoc symlinks for jsr305

* Fri Aug 08 2008 David Walluck <dwalluck at redhat.com> 0:0.1-1
- release

--- NEW FILE: Makefile ---
# Makefile for source rpm: jsr-305
# $Id: Makefile,v 1.1 2010/12/20 15:44:59 jpackage Exp $
NAME := jsr-305
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: sources ---
7703989a17f26cfab6caa39fc47505f5  jsr-305-0.1.tar.bz2

--- NEW FILE: jsr-305-ri-build.xml ---
<project name="JSR305-ri" default="build">
	<target name="build" depends="clean,classes,jar,javadoc"/>
	<target name="classes">
		<mkdir dir="src/main/java"/>
		<javac  destdir="src/main/java" source="1.5" debug="on">
			<src path="src/main/java"/>
			<classpath>
				<pathelement location="src/main/java"/>
			</classpath>
		</javac>
	</target>

	<target name="jar" depends="classes">
		<jar  destfile="jsr-305-${version}.jar" basedir="src/main/java">
		</jar>
	</target>

	<target name="javadoc">
		<mkdir dir="javadoc"/>
		<javadoc  packagenames="javax.annotation.*"
                          sourcepath="src/main/java"
                          defaultexcludes="yes"
                          destdir="javadoc"
                          version="true"
                          use="true"
                          windowtitle="JSR 305: Annotations for Software Defect Detection in Java">
			<link href="${java.javadoc}"/>
		</javadoc>
	</target>

        <target name="clean">
		<fileset dir="src/main/java" includes="**/*.class"/>
		<fileset dir="." includes="jsr-305-${version}.jar"/>
                <delete dir="javadoc"/>
        </target>



</project>

<!-- vim:set ts=4: -->

--- NEW FILE: jsr-305-jpp-depmap.xml ---
<dependencies>
<!--
  <dependency>
    <maven>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-io</artifactId>
    <version>1.3.2</version>
    </maven>
    <jpp>
    <groupId>JPP</groupId>
    <artifactId>commons-io</artifactId>
    <version>1.4</version>
    </jpp>
  </dependency>

  <dependency>
    <maven>
    <groupId>org.freemarker</groupId>
    <artifactId>freemarker</artifactId>
    <version>2.3.13</version>
    </maven>
    <jpp>
    <groupId>JPP</groupId>
    <artifactId>freemarker</artifactId>
    <version>2.3.15</version>
    </jpp>
  </dependency>

  <dependency>
    <maven>
    <groupId>javax.annotation</groupId>
    <artifactId>jsr250-api</artifactId>
    <version>1.0</version>
    </maven>
    <jpp>
    <groupId>JPP</groupId>
    <artifactId>annotation_1_0_api</artifactId>
    <version>1.0</version>
    </jpp>
  </dependency>
-->


</dependencies>

--- NEW FILE: jsr-305-pom.patch ---
--- pom.xml.sav	2010-12-20 12:40:40.000000000 +0100
+++ pom.xml	2010-12-20 12:41:05.000000000 +0100
@@ -17,7 +17,7 @@
 	<modules>
 		<module>ri</module>
 		<module>tcl</module>
-		<module>sampleUses</module>
+		<!-- <module>sampleUses</module> -->
 		<module>proposedAnnotations</module>
 	</modules>
 	




More information about the JPackage-commits mailing list