[Jpackage-commits] dist/pmd/JPP-6 Makefile, NONE, 1.1 pmd-4.2.4-no-classpath-in-manifest.patch, NONE, 1.1 pmd-4.2.4-no-retroweaver.patch, NONE, 1.1 pmd-4.2.5-jpp-depmap.xml, NONE, 1.1 pmd-4.2.5-pom.patch, NONE, 1.1 pmd-4.2.5-settings.xml, NONE, 1.1 pmd-4.2.5.pom, NONE, 1.1 pmd-ruby.patch, NONE, 1.1 pmd.spec, NONE, 1.1 sources, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Mon Dec 6 18:20:24 CET 2010


Update of /home/projects/jpackage/cvs/dist/pmd/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv3056/JPP-6

Added Files:
	Makefile pmd-4.2.4-no-classpath-in-manifest.patch 
	pmd-4.2.4-no-retroweaver.patch pmd-4.2.5-jpp-depmap.xml 
	pmd-4.2.5-pom.patch pmd-4.2.5-settings.xml pmd-4.2.5.pom 
	pmd-ruby.patch pmd.spec sources 
Log Message:
Import pmd into JPP-6

--- NEW FILE: pmd-4.2.5-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: pmd-4.2.5-jpp-depmap.xml ---
<dependencies>
<!--
-->

   <dependency>
      <maven>
        <groupId>asm</groupId>
        <artifactId>asm</artifactId>
        <version>3.1</version>
      </maven>
      <jpp>
        <groupId>JPP/objectweb-asm</groupId>
        <artifactId>asm</artifactId>
        <version>3.2</version>
      </jpp>
   </dependency>

</dependencies>

--- NEW FILE: pmd-4.2.4-no-classpath-in-manifest.patch ---
--- pmd-4.2.4/bin/build.xml.orig	2008-11-10 14:29:16.281494022 -0500
+++ pmd-4.2.4/bin/build.xml	2008-11-10 14:29:24.828492529 -0500
@@ -75,7 +75,6 @@
 			<zipfileset dir="etc" includes="ruleset.dtd,ruleset_xml_schema.xsd" prefix="rulesets"/>
 			<manifest>
 				<attribute name="Main-Class" value="net.sourceforge.pmd.PMD" />
-				<attribute name="Class-Path" value="jaxen-${jaxen.version}.jar asm-${asm.version}.jar" />
 			</manifest>
 		</jar>
 

--- NEW FILE: Makefile ---
# Makefile for source rpm: pmd
# $Id: Makefile,v 1.1 2010/12/06 17:20:21 jpackage Exp $
NAME := pmd
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: pmd-4.2.5.pom ---
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>pmd</groupId>
  <artifactId>pmd</artifactId>
  <name>PMD</name>
  <version>4.2.5</version>
  <description>
    <![CDATA[
<p>PMD scans Java source code and looks for potential problems like:</p>
<ul>
  <li>Possible bugs - empty try/catch/finally/switch statements</li>
  <li>Dead code - unused local variables, parameters and private methods</li>
  <li>Suboptimal code - wasteful String/StringBuffer usage</li>
  <li>Overcomplicated expressions - unnecessary if statements, for loops that could be while loops</li>
  <li>Duplicate code - copied/pasted code means copied/pasted bugs</li>
</ul>
<p>You can <b><a href="http://sourceforge.net/project/showfiles.php?group_id=56262">download everything from here</a></b>, and you can get an overview of all the rules at the <a href="rules/index.html">rulesets index</a> page.</p>
<p>PMD is <a href="integrations.html">integrated</a> with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.</p>
    ]]>
  </description>
  <url>http://pmd.sourceforge.net/</url>
  <issueManagement>
    <url>http://www.sourceforge.net/tracker/?group_id=56262</url>
  </issueManagement>
  <ciManagement>
    <notifiers>
      <notifier>
        <configuration>
          <address>tom at infoether.com</address>
        </configuration>
      </notifier>
    </notifiers>
  </ciManagement>
  <inceptionYear>2002</inceptionYear>
  <mailingLists>
    <mailingList>
      <name>PMD development</name>
      <subscribe>http://lists.sourceforge.net/lists/listinfo/pmd-devel</subscribe>
      <unsubscribe>http://lists.sourceforge.net/lists/listinfo/pmd-devel</unsubscribe>
      <archive>http://sourceforge.net/mailarchive/forum.php?forum=pmd-devel</archive>
    </mailingList>
  </mailingLists>
  <developers>
    <developer>
      <id>tomcopeland</id>
      <name>Tom Copeland</name>
      <email>tom at infoether.com</email>
      <organization>InfoEther</organization>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>dpeugh</id>
      <name>David Dixon-Peugh</name>
      <email>ddp at apache.org</email>
      <organization>Lockheed Martin Corporation</organization>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>olemartin</id>
      <name>Ole-Martin Mork</name>
      <email>olemartin at users.sourceforge.net</email>
      <organization>Bekk Consulting</organization>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>mikkey</id>
      <name>Miguel Griffa</name>
      <email>mikkey at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>phherlin</id>
      <name>Philippe Herlin</name>
      <email>phherlin at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>jigerjava</id>
      <name>Jiger Patel</name>
      <email>jigerjava at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>kubacki</id>
      <name>Radim Kubacki</name>
      <email>kubacki at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>tomslot</id>
      <name>Tomasz Slota</name>
      <email>tomslot at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>tomslot</id>
      <name>Alan Ezust</name>
      <email>ezust at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>nascif</id>
      <name>Nascif Abousalh Neto</name>
      <email>nascif at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>allancaplan</id>
      <name>Allan Caplan</name>
      <email>allancaplan at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>holobender</id>
      <name>Sven Jacob</name>
      <email>holobender at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>wfzelle</id>
      <name>Wouter Zelle</name>
      <email>wfzelle at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>hooperbloob</id>
      <name>Brian Remedios</name>
      <email>hooperbloob at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>xlv</id>
      <name>Xavier Le Vourch</name>
      <email>xlv at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>rgustav</id>
      <name>Ryan Gustafson</name>
      <email>rgustav at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>bluejohn</id>
      <name>Johan Nagels</name>
      <email>bluejohn at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>tkleiber</id>
      <name>Torsten Kleiber</name>
      <email>tkleiber at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>rpelisse</id>
      <name>Romain Pelisse</name>
      <email>rpelisse at users.sourceforge.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
  </developers>
  <scm>
    <connection>scm:svn:https://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd</connection>
    <developerConnection>scm:svn:https://pmd.svn.sourceforge.net/svnroot/pmd/trunk/pmd</developerConnection>
    <url>http://pmd.svn.sourceforge.net/viewvc/pmd/</url>
  </scm>
  <organization>
    <name>InfoEther</name>
    <url>http://pmd.sourceforge.net/</url>
  </organization>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>regress</testSourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}</directory>
        <includes>
          <include>rulesets/**/*.xml</include>
          <include>rulesets/*.properties</include>
          <include>etc/pmd-nicerhtml.xsl</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/src</directory>
        <includes>
          <include>**/*.properties</include>
        </includes>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>${basedir}/regress/</directory>
        <includes>
          <include>**/*.xml</include>
        </includes>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkMode>once</forkMode>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <encoding>utf8</encoding>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.6</version>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>asm</groupId>
      <artifactId>asm</artifactId>
      <version>3.1</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.4</version>
    </dependency>
  </dependencies>

  <distributionManagement>
    <repository>
      <id>pmd-repo</id>
      <name>Default Repository</name>
      <url>scp://shell.sourceforge.net/home/groups/p/pm/pmd/htdocs/maven2</url>
    </repository>
    <site>
      <id>pmd-site</id>
      <name>Default Site</name>
      <url>scp://shell.sourceforge.net/home/groups/p/pm/pmd/htdocs</url>
    </site>
  </distributionManagement>

  <reporting>
    <plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
	        <artifactId>maven-jxr-plugin</artifactId>
        </plugin>
	<!--
		<plugin>
        	<groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
        </plugin>  -->
		<plugin>
		
	        <groupId>org.apache.maven.plugins</groupId>
    	    <artifactId>maven-pmd-plugin</artifactId>
        	<configuration>
				<linkXref>true</linkXref>
				<sourceEncoding>utf-8</sourceEncoding>
				<minimumTokens>100</minimumTokens>
				<targetJdk>1.5</targetJdk>
				<rulesets>
            		<ruleset>http://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x/rulesets/internal/dogfood.xml</ruleset>
				</rulesets>
        	</configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>etc/checkstyle-config.xml</configLocation>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

</project>


--- NEW FILE: pmd-4.2.4-no-retroweaver.patch ---
--- pmd-4.2.4/bin/build.xml.orig	2008-08-31 17:32:19.000000000 -0400
+++ pmd-4.2.4/bin/build.xml	2008-11-10 14:01:02.870662251 -0500
@@ -14,7 +14,6 @@
 	<property name="asm.version" value="3.1" />
 	<property name="jaxen.version" value="1.1.1" />
 	<property name="junit.version" value="4.4" />
-	<property name="retroweaver.version" value="2.0.5" />
 	<property name="javacc-home.path" value="${dir.lib}" />
 
 	<!--Settings-->
@@ -86,56 +85,10 @@
 			basedir="${dir.build}" />
 	</target>
 
-	<taskdef name="retroweaver" classname="net.sourceforge.retroweaver.ant.RetroWeaverTask">
-		<classpath>
-			<pathelement location="${dir.lib14}/retroweaver-${retroweaver.version}.jar"/>
-			<pathelement location="${dir.lib14}/retroweaver-rt-${retroweaver.version}.jar"/>
-			<pathelement location="${dir.lib14}/backport-util-concurrent.jar"/>
-			<pathelement location="${dir.lib14}/asm-commons-${asm.version}.jar"/>
-			<pathelement location="${dir.lib14}/asm-util-${asm.version}.jar"/>
-			<pathelement location="${dir.lib}/asm-${asm.version}.jar"/>
-		</classpath>
-	</taskdef>
-
 	<target name="weavejunit" depends="jar">
-		<path id="retroweaverclasspath">
-			<pathelement location="${dir.lib14}/retroweaver-rt-${retroweaver.version}.jar"/>
-			<pathelement location="${dir.lib14}/backport-util-concurrent.jar"/>
-			<pathelement location="${dir.lib}/asm-${asm.version}.jar"/>
-			<pathelement location="${jvm14.runtime}" />
-			<pathelement location="${dir.lib}/jaxen-${jaxen.version}.jar" />
-			<pathelement location="${dir.lib14}/junit.jar" />
-			<pathelement location="${ant.jar}" />
-		</path>
-
-		<retroweaver inputjar="${dir.lib}/junit-${junit.version}.jar" outputjar="${dir.lib14}/junit.jar" target="1.4" failonerror="true" verify="true">
-			<classpath refid="retroweaverclasspath" />
-		</retroweaver>
 	</target>
 
 	<target name="weave" depends="jar, weavejunit">
-		<fail unless="ant.jar" message="ant.jar location is not defined properly" />
-		<fail unless="jvm14.runtime" message="jvm14.runtime (i.e. rt.jar) location is not defined properly" />
-
-		<path id="retroweaverclasspath">
-			<pathelement location="${dir.lib14}/pmd14-${version}.jar" />
-			<pathelement location="${dir.lib14}/pmd14-test-${version}.jar" />
-			<pathelement location="${dir.lib14}/retroweaver-rt-${retroweaver.version}.jar"/>
-			<pathelement location="${dir.lib14}/backport-util-concurrent.jar"/>
-			<pathelement location="${dir.lib}/asm-${asm.version}.jar"/>
-			<pathelement location="${jvm14.runtime}" />
-			<pathelement location="${dir.lib}/jaxen-${jaxen.version}.jar" />
-			<pathelement location="${dir.lib14}/junit.jar" />
-			<pathelement location="${ant.jar}" />
-		</path>
-
-		<retroweaver inputjar="${dir.lib}/pmd-${version}.jar" outputjar="${dir.lib14}/pmd14-${version}.jar" target="1.4" failonerror="true" verify="true">
-			<classpath refid="retroweaverclasspath" />
-		</retroweaver>
-
-		<retroweaver inputjar="${dir.lib}/pmd-test-${version}.jar" outputjar="${dir.lib14}/pmd14-test-${version}.jar" target="1.4" failonerror="true" verify="true">
-			<classpath refid="retroweaverclasspath" />
-		</retroweaver>
 	</target>
 
 	<target name="jarsrc" depends="copy,compile" description="Jars up the source directory">
@@ -252,7 +205,6 @@
 			<include name="backport-util-concurrent.jar" />
 			<include name="pmd14-${version}.jar" />
 			<include name="pmd14-test-${version}.jar" />
-			<include name="retroweaver-rt-${retroweaver.version}.jar" />
 			<include name="junit.jar" />
 		</fileset>
 		<fileset dir="${dir.lib}">

--- NEW FILE: sources ---
c0060adb88c178d44b80b4dbada11f71  pmd-4.2.5.tar.bz2

--- NEW FILE: pmd.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}}}

%define with()          %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without()       %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with()    %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}

%bcond_without          maven

%define section free

Name:           pmd
Version:        4.2.5
Release:        2%{?dist}
Epoch:          0
Summary:        Scans Java source code and looks for potential problems
License:        BSD Style
Url:            http://pmd.sourceforge.net/
Group:          Development/Testing
# svn export https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_4_2_5 pmd-4.2.5 && tar cjf pmd-4.2.5.tar.bz2 pmd-4.2.5
Source0:        pmd-4.2.5.tar.bz2
Source1:        pmd-4.2.5.pom
Source2:        %{name}-%{version}-jpp-depmap.xml
Source3:        %{name}-%{version}-settings.xml

Patch0:         pmd-4.2.5-pom.patch
Patch1:         pmd-ruby.patch
Patch2:         pmd-4.2.4-no-retroweaver.patch
Patch3:         pmd-4.2.4-no-classpath-in-manifest.patch
Requires(post): jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5
Requires:       ant >= 0:1.7.1
Requires:       java >= 0:1.6.0
# FIXME: (dwalluck): Should be 1.1.1
Requires:       jaxen >= 0:1.1
Requires:       objectweb-asm >= 0:3.1
Requires:       junit4 >= 0:4.4
BuildRequires:  ant >= 0:1.7.1
BuildRequires:  ant-junit
BuildRequires:  jaxen >= 0:1.1
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  junit4 >= 0:4.4
BuildRequires:  objectweb-asm >= 0:3.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

%description
PMD scans Java source code and looks for potential 
problems like:
+ Unused local variables 
+ Empty catch blocks 
+ Unused parameters 
+ Empty 'if' statements 
+ Duplicate import statements 
+ Unused private methods 
+ Classes which could be Singletons 
+ Short/long variable and method names 
PMD has plugins for JDeveloper, JEdit, JBuilder, 
NetBeans/Sun ONE Studio, IntelliJ IDEA, TextPad, 
Maven, Ant, Eclipse, Gel, and Emacs. 

%if %with maven
%package manual
Summary:        Manual for %{name}
Group:          Development/Documentation

%description manual
Documentation for %{name}.
%endif

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

%description javadoc
%{summary}.

%prep
%setup -q
%patch0 -p0
%patch1 -p0
%patch2 -p1
%patch3 -p1
%{_bindir}/find . -name "*.sh" | %{_bindir}/xargs -t %{__chmod} 0755
%{_bindir}/find . -name "*.jar" | xargs -t %{__rm}

%{__ln_s} $(build-classpath objectweb-asm/asm) lib/asm-3.0.jar
%if %with maven
cp %{SOURCE3} 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
%endif

%build
%if %with maven
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
    mvn-jpp \
        -e \
        -s $M2_SETTINGS \
        -Dmaven.test.failure.ignore=true \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        install javadoc:javadoc site

%else
export OPT_JAR_LIST=`%{__cat} %{_sysconfdir}/ant.d/junit`
export CLASSPATH=$(build-classpath \
backport-util-concurrent \
jaxen \
junit4 \
objectweb-asm \
)
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
cd bin
%{ant} -Dbuild.sysclasspath=only dist javadoc
%endif

%install
rm -rf %{buildroot}

# jar
install -d -m 755 %{buildroot}%{_javadir}
%if %with maven
install -p -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
%else
install -p -m 644 lib/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
%endif

(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do %{__ln_s} ${jar} ${jar/-%{version}/}; done)

install -d -m 755 %{buildroot}%{_datadir}/%{name}-%{version}/etc
%{__cp} -pr etc/* %{buildroot}%{_datadir}/%{name}-%{version}/etc

install -d -m 755 %{buildroot}%{_datadir}/%{name}-%{version}/rulesets
%{__cp} -pr rulesets/* %{buildroot}%{_datadir}/%{name}-%{version}/rulesets
%{__ln_s} %{name}-%{version} %{buildroot}%{_datadir}/%{name}

# pom
install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}

# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
%if %with maven
%{__cp} -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
# FIXME: (dwalluck): breaks -bi --short-circuit
rm -rf target/site/apidocs
%else
%{__cp} -pr docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%endif
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}

# manual
%if %with maven
install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}
%{__cp} -pr 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)
%doc LICENSE.txt
%{_javadir}/*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%defattr(-,root,root,0755)
%{_datadir}/%{name}
%{_datadir}/%{name}-%{version}
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

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

%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/*

%changelog
* Mon Dec 06 2010 Ralph Apel <r.apel at r-apel.de> 0:4.2.5-2
- Prepare for JPP-6
- Build with maven2 by default
- Drop backport-util-concurrent: not needed

* Wed Mar 18 2009 David Walluck <dwalluck at redhat.com> 0:4.2.5-1
- 4.2.5

* Mon Dec 08 2008 Will Tatam <will.tatam at red61.com> 4.2.4-2
- Auto rebuild for JPackage 5 in mock

* Mon Nov 10 2008 David Walluck <dwalluck at redhat.com> 0:4.2.4-1
- 4.2.4

* Mon Feb 11 2008 Ralph Apel <r.apel at r-apel.de> - 0:3.9-2jpp
- Use org.objectweb.asm as groupId for asm-3.x in pom

* Tue Feb 05 2008 Ralph Apel <r.apel at r-apel.de> - 0:3.9-1jpp
- Upgrade to 3.9
- Build with maven1 per default
- Add gcj_support option
- Add pom and depmap frag

* Mon Jun 19 2006 Deepak Bhole <dbhole at redhat.com> - 0:3.6-1jpp
- Upgrade to 3.6

* Fri Mar 10 2006 Fernando Nasser <fnasser at redhat.com> - 0:3.3-2jpp
- First JPP 1.7 build

* Wed Nov 09 2005 Ralph Apel <r.apel at r-apel.de> - 0:3.3-1jpp
- Upgrade to 3.3
- Fix Groups

* Tue Feb 22 2005 Laurent Goujon <laurent at gobio2.net> - 2.3-1jpp
- Upgrade to 2.3
- Use bin/build.xml

* Mon Sep 13 2004 Ralph Apel <r.apel at r-apel.de> - 1.9-2jpp
- Drop saxpath requirements
- Require jaxen >= 0:1.1
- Relax some versioned requirements

* Wed Aug 25 2004 Fernando Nasser <fnasser at redhat.com> - 1.9-1jpp
- Upgrade to 1.9

* Wed Aug 24 2004 Fernando Nasser <fnasser at redhat.com> - 0:1.5-4jpp
- Rebuild with Ant 1.6.2

* Fri Aug 06 2004 Ralph Apel <r.apel at r-apel.de> - 1.5-3jpp
- Void change

* Tue Jun 01 2004 Randy Watler <rwatler at finali.com> - 1.5-2jpp
- Upgrade to Ant 1.6.X

* Wed Mar 24 2004 Ralph Apel <r.apel at r-apel.de> 1.5-1jpp
- first JPackage release

--- NEW FILE: pmd-4.2.5-pom.patch ---
--- pom.xml.sav	2010-12-06 12:56:19.000000000 +0100
+++ pom.xml	2010-12-06 12:56:45.000000000 +0100
@@ -309,7 +309,7 @@
 				<minimumTokens>100</minimumTokens>
 				<targetJdk>1.5</targetJdk>
 				<rulesets>
-            		<ruleset>http://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x/rulesets/internal/dogfood.xml</ruleset>
+            		<ruleset>rulesets/internal/dogfood.xml</ruleset>
 				</rulesets>
         	</configuration>
       </plugin>

--- NEW FILE: pmd-ruby.patch ---
--- etc/rule_summary.rb.sav	2008-01-02 17:02:49.000000000 +0100
+++ etc/rule_summary.rb	2008-01-02 17:03:06.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/ruby
 
 require 'rexml/document'
 include REXML




More information about the JPackage-commits mailing list