This commit is contained in:
parent
47de6c4c74
commit
134102db12
@ -1,109 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
<xsl:template match="*[name() != 'dependencies']|*/text()">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
<xsl:template match="//dependencies">
|
||||
<xsl:for-each select="./dependency">
|
||||
<xsl:element name="dependency">
|
||||
<xsl:element name="maven">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./groupId">
|
||||
<xsl:copy-of select="./groupId"/>
|
||||
<xsl:copy-of select="./artifactId"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-before(./id/text(),':') != ''">
|
||||
<xsl:element name="groupId">
|
||||
<xsl:value-of select="substring-before(./id/text(),':')"/>
|
||||
</xsl:element>
|
||||
<xsl:element name="artifactId">
|
||||
<xsl:value-of select="substring-after(./id/text(),':')"/>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="groupId">
|
||||
<xsl:value-of select="./id/text()"/>
|
||||
</xsl:element>
|
||||
<xsl:element name="artifactId">
|
||||
<xsl:value-of select="./id/text()"/>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
ERROR
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:for-each select="./*">
|
||||
<xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
<xsl:element name="jpp">
|
||||
<xsl:element name="groupId">JPP</xsl:element>
|
||||
<xsl:choose>
|
||||
<xsl:when test="./artifactId">
|
||||
<xsl:copy-of select="./artifactId"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-after(./id/text(),':') != ''">
|
||||
<xsl:element name="artifactId">
|
||||
<xsl:value-of select="substring-after(./id/text(),':')"/>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="artifactId">
|
||||
<xsl:value-of select="./id/text()"/>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
ERROR
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:element name="jar">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./artifactId">
|
||||
<xsl:value-of select="./artifactId/text()"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-after(./id/text(),':') != ''">
|
||||
<xsl:value-of select="substring-after(./id/text(),':')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="./id/text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
ERROR
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:choose>
|
||||
<xsl:when test="./type">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./type/text() = 'plugin'">.jar</xsl:when>
|
||||
<xsl:otherwise>.<xsl:value-of select="./type/text()"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>.jar</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:element>
|
||||
<xsl:for-each select="./*">
|
||||
<xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:param name="map" />
|
||||
<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
<xsl:template match="/*[name()='project']" >
|
||||
<xsl:element name="project">
|
||||
<xsl:for-each select="./*">
|
||||
<xsl:if test="(name() != 'dependencies')">
|
||||
<xsl:copy-of select="." />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="not(*[name()='dependencies'])">
|
||||
<xsl:element name="dependencies">
|
||||
<xsl:for-each select="document($map)//add/dependency">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="*[name()='dependencies']"/>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
<xsl:template match="*[name()='dependencies']" >
|
||||
<xsl:element name="dependencies">
|
||||
<xsl:for-each select="*[name()='dependency']">
|
||||
<xsl:if test="*[name()='artifactId']">
|
||||
<xsl:call-template name="replace">
|
||||
<xsl:with-param name="artifact" select="*[name()='artifactId']/text()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="*[name()='id']">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring-after(*[name()='id']/text(),':') != ''">
|
||||
<xsl:call-template name="replace">
|
||||
<xsl:with-param name="artifact" select="substring-after(*[name()='id']/text(),':')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="replace">
|
||||
<xsl:with-param name="artifact" select="*[name()='id']/text()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="document($map)//add/dependency">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
<xsl:template name="replace">
|
||||
<xsl:param name="artifact"/>
|
||||
<xsl:variable name="this" select="."/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
|
||||
<xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
|
||||
<xsl:if test="../jpp">
|
||||
<xsl:element name="dependency">
|
||||
<xsl:copy-of select="../jpp/*"/>
|
||||
<xsl:copy-of select="$this/properties"/>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="dependency">
|
||||
<xsl:copy-of select="./*"/>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
|
||||
<xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
|
||||
<xsl:for-each select="../add/dependency">
|
||||
<xsl:element name="dependency">
|
||||
<xsl:copy-of select="./*"/>
|
||||
<xsl:copy-of select="$this/properties"/>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:saxon="http://icl.com/saxon"
|
||||
extension-element-prefixes="saxon">
|
||||
<xsl:output method="xml" indent="yes" omit-xml-declaration="no"/>
|
||||
<xsl:strip-space elements="*"/>
|
||||
<xsl:template match="/" >
|
||||
<xsl:element name="depset">
|
||||
<saxon:group select="//dependency" group-by="./maven/artifactId">
|
||||
<xsl:sort select="./maven/artifactId"/>
|
||||
<xsl:element name="dependency">
|
||||
<xsl:element name="maven">
|
||||
<xsl:copy-of select="./maven/*[name() != 'properties']"/>
|
||||
</xsl:element>
|
||||
<xsl:element name="jpp">
|
||||
<xsl:copy-of select="./jpp/*[name() != 'properties']"/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
<saxon:item/>
|
||||
</saxon:group>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7fa0e11cfcb4d8f6be1feb77af6febd5295effb8f346aef7ecc15e973adf0a6d
|
||||
size 404280
|
@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<depset>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.5.1</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<jar>ant.jar</jar>
|
||||
<version>1.5.1</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>jmock</groupId>
|
||||
<artifactId>jmock</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>jmock</artifactId>
|
||||
<jar>jmock.jar</jar>
|
||||
<version>1.0.0</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<jar>junit.jar</jar>
|
||||
<version>3.8.1</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>1.0.b2</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<jar>xml-commons-apis.jar</jar>
|
||||
<version>2.0.2</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
</depset>
|
3
qdox-2.0-M9-project.tar.gz
Normal file
3
qdox-2.0-M9-project.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7e73518ba8399434a0f0d54f96e991395edca0ccba555ef9967ef8d94e8201bd
|
||||
size 521668
|
@ -1,7 +0,0 @@
|
||||
package com.thoughtworks.qdox.parser.structs;
|
||||
|
||||
public class LocatedDef {
|
||||
|
||||
public int lineNumber;
|
||||
|
||||
}
|
19
qdox-MANIFEST.MF
Normal file
19
qdox-MANIFEST.MF
Normal file
@ -0,0 +1,19 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: com.thoughtworks.qdox
|
||||
Bundle-Version: 1.6.3.v20081201-1400
|
||||
Export-Package: com.thoughtworks.qdox;version="1.6.3",com.thoughtworks
|
||||
.qdox.ant;version="1.6.3",com.thoughtworks.qdox.directorywalker;versi
|
||||
on="1.6.3",com.thoughtworks.qdox.junit;version="1.6.3",com.thoughtwor
|
||||
ks.qdox.model;version="1.6.3",com.thoughtworks.qdox.model.util;versio
|
||||
n="1.6.3",com.thoughtworks.qdox.parser;version="1.6.3",com.thoughtwor
|
||||
ks.qdox.parser.impl;version="1.6.3",com.thoughtworks.qdox.parser.stru
|
||||
cts;version="1.6.3",com.thoughtworks.qdox.tools;version="1.6.3"
|
||||
Bundle-ManifestVersion: 2
|
||||
Import-Package: junit.framework;version="[3.8.2,4.0.0)";resolution:=op
|
||||
tional,org.apache.tools.ant;version="[1.7.0,2.0.0)";resolution:=optio
|
||||
nal,org.apache.tools.ant.types;version="[1.7.0,2.0.0)";resolution:=op
|
||||
tional
|
@ -1,79 +0,0 @@
|
||||
<project name="qdox" default="jar" basedir=".">
|
||||
<property name="maven.build.output" value="target/classes"/>
|
||||
<property name="maven.build.directory" value="target"/>
|
||||
<property name="maven.build.final.name" value="qdox-@VERSION@"/>
|
||||
<property name="maven.test.reports" value="${maven.build.directory}/test-reports"/>
|
||||
<property name="maven.test.output" value="target/test-classes"/>
|
||||
<property name="javadocdir" value="target/site/apidocs"></property>
|
||||
<target name="clean" description="Clean the output directory">
|
||||
<delete dir="${maven.build.directory}"/>
|
||||
</target>
|
||||
<target name="compile" 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/java"/>
|
||||
</src>
|
||||
</javac>
|
||||
</target>
|
||||
<target name="jar" depends="compile" 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"/>
|
||||
</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">
|
||||
<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="javadoc" description="o Generate javadoc" >
|
||||
<mkdir dir="${javadocdir}"></mkdir>
|
||||
<tstamp>
|
||||
<format pattern="-yyyy" property="year"></format>
|
||||
</tstamp>
|
||||
<property name="copyright" value="Copyright &copy; . All Rights Reserved."></property>
|
||||
<property name="title" value="QDox @VERSION@ API"></property>
|
||||
<javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java" packagenames="com.thoughtworks.qdox.*">
|
||||
<classpath>
|
||||
<path refid="build.classpath"></path>
|
||||
</classpath>
|
||||
</javadoc>
|
||||
</target>
|
||||
</project>
|
@ -1,21 +0,0 @@
|
||||
<project name="qdox-component-info">
|
||||
<!-- ============================================================ -->
|
||||
<!-- QDox -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<component id="qdox"
|
||||
licenseType="ironsmith"
|
||||
version="1.11"
|
||||
projectHome="http://qdox.codehaus.org/"
|
||||
description="Parser for extracting class/interface/method definitions from source files complete with JavaDoc @tags."
|
||||
scm=":ext:cvs.devel.redhat.com:/cvs/dist/qdox"
|
||||
tag="qdox-1_11-1">
|
||||
<!-- Built using JDK 1.4 -->
|
||||
|
||||
<artifact id="qdox.jar"/>
|
||||
<export>
|
||||
<include input="qdox.jar"/>
|
||||
</export>
|
||||
</component>
|
||||
|
||||
</project>
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 1 12:48:23 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Update to version 2.0-M9
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 29 10:51:58 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
174
qdox.spec
174
qdox.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package qdox
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,126 +16,106 @@
|
||||
#
|
||||
|
||||
|
||||
%define repodir %{_javadir}/repository.jboss.com/qdox/1.6.1-brew
|
||||
%define repodirlib %{repodir}/lib
|
||||
%define repodirsrc %{repodir}/src
|
||||
%global vertag M9
|
||||
%global verbase 2.0
|
||||
Name: qdox
|
||||
Version: 1.12.1
|
||||
Version: %{verbase}.%{vertag}
|
||||
Release: 0
|
||||
Summary: Extract class/interface/method definitions from sources
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: http://qdox.codehaus.org/
|
||||
# svn checkout https://svn.codehaus.org/qdox/tags/qdox-1.12.1 qdox-1.12.1
|
||||
# tar --exclude-vcs -cJf qdox-1.12.1.tar.xz qdox-1.12.1
|
||||
Source0: qdox-%{version}.tar.xz
|
||||
Source1: pom-maven2jpp-depcat.xsl
|
||||
Source2: pom-maven2jpp-newdepmap.xsl
|
||||
Source3: pom-maven2jpp-mapdeps.xsl
|
||||
Source4: qdox-1.6-jpp-depmap.xml
|
||||
Source5: qdox-LocatedDef.java
|
||||
Source6: qdox-build.xml
|
||||
Source7: qdox-component-info.xml
|
||||
BuildRequires: ant >= 1.6
|
||||
URL: https://github.com/paul-hammant/qdox
|
||||
Source0: http://repo2.maven.org/maven2/com/thoughtworks/qdox/qdox/%{verbase}-%{vertag}/%{name}-%{verbase}-%{vertag}-project.tar.gz
|
||||
Source1: qdox-MANIFEST.MF
|
||||
BuildRequires: byaccj
|
||||
BuildRequires: gpg2
|
||||
BuildRequires: java-cup-bootstrap
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-cup
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: jflex-bootstrap
|
||||
BuildRequires: xz
|
||||
Obsoletes: %{name}-javadoc
|
||||
BuildRequires: jflex
|
||||
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
|
||||
Requires: mvn(org.sonatype.oss:oss-parent:pom:)
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
QDox is a high speed, small footprint parser for extracting
|
||||
class/interface/method definitions from source files complete with
|
||||
JavaDoc @tags. It is designed to be used by active code generators or
|
||||
documentation tools.
|
||||
|
||||
%package repolib
|
||||
Summary: Artifacts to be uploaded to a repository library
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description repolib
|
||||
QDox is a high speed, small footprint parser for extracting
|
||||
class/interface/method definitions from source files complete with
|
||||
JavaDoc @tags. It is designed to be used by active code generators or
|
||||
documentation tools.
|
||||
QDox is a high speed, small footprint parser
|
||||
for extracting class/interface/method definitions
|
||||
from source files complete with JavaDoc @tags.
|
||||
It is designed to be used by active code
|
||||
generators or documentation tools.
|
||||
|
||||
%package javadoc
|
||||
Summary: Extract class/interface/method definitions from sources
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description javadoc
|
||||
QDox is a high speed, small footprint parser for extracting
|
||||
class/interface/method definitions from source files complete with
|
||||
JavaDoc @tags. It is designed to be used by active code generators or
|
||||
documentation tools.
|
||||
API docs for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
# % patch1 -p1
|
||||
# % patch2 -p1
|
||||
cp -p %{SOURCE5} src/java/com/thoughtworks/qdox/parser/structs/LocatedDef.java
|
||||
sed -e "s/@VERSION@/%{version}/g" %{SOURCE6} > build.xml
|
||||
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
|
||||
sed -i "s/@TAG@/$tag/g" %{SOURCE7}
|
||||
%setup -q -n %{name}-%{verbase}-%{vertag}
|
||||
find -name *.jar -delete
|
||||
find -name *.class -delete
|
||||
rm -rf bootstrap
|
||||
|
||||
# We don't need these plugins
|
||||
%pom_remove_plugin :animal-sniffer-maven-plugin
|
||||
%pom_remove_plugin :maven-failsafe-plugin
|
||||
%pom_remove_plugin :maven-jflex-plugin
|
||||
%pom_remove_plugin :maven-enforcer-plugin
|
||||
|
||||
%pom_xpath_set pom:workingDirectory '${basedir}/src/main/java/com/thoughtworks/qdox/parser/impl'
|
||||
|
||||
%build
|
||||
export OPT_JAR_LIST="junit ant/ant-junit"
|
||||
mkdir -p target/src/java/com/thoughtworks/qdox/parser/impl
|
||||
export CLASSPATH=`pwd`/target/classes:`pwd`/target/test-classes:$(build-classpath java-cup jflex jmock)
|
||||
java JFlex.Main \
|
||||
-d src/java/com/thoughtworks/qdox/parser/impl \
|
||||
--skel src/grammar/skeleton.inner \
|
||||
src/grammar/lexer.flex
|
||||
pushd target
|
||||
%{_bindir}/byaccj \
|
||||
-Jnorun \
|
||||
-Jnoconstruct \
|
||||
-Jclass=Parser \
|
||||
-Jsemantic=Value \
|
||||
-Jpackage=com.thoughtworks.qdox.parser.impl \
|
||||
../src/grammar/parser.y
|
||||
popd
|
||||
mv target/Parser.java src/java/com/thoughtworks/qdox/parser/impl
|
||||
rm -f src/java/com/thoughtworks/qdox/junit/APITestCase.java
|
||||
ant -Dant.build.javac.source=6 -Dant.build.javac.target=6 -Dbuild.sysclasspath=only jar
|
||||
# Generate scanners (upstream does this with maven-jflex-plugin)
|
||||
# Add the --inputstreamctor option if jflex is upgraded to a version 1.6 or higher
|
||||
CLASSPATH=$(build-classpath java-cup) \
|
||||
jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/lexer.flex
|
||||
CLASSPATH=$(build-classpath java-cup) \
|
||||
jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/commentlexer.flex
|
||||
|
||||
# Generate the parsers using the command-line that the exec-maven-plugin uses
|
||||
GRAMMAR_PATH=$(pwd)/src/grammar/commentparser.y && \
|
||||
(cd src/main/java/com/thoughtworks/qdox/parser/impl && \
|
||||
byaccj -v -Jnorun -Jnoconstruct -Jclass=DefaultJavaCommentParser \
|
||||
-Jpackage=com.thoughtworks.qdox.parser.impl ${GRAMMAR_PATH})
|
||||
GRAMMAR_PATH=$(pwd)/src/grammar/parser.y && \
|
||||
(cd src/main/java/com/thoughtworks/qdox/parser/impl && \
|
||||
byaccj -v -Jnorun -Jnoconstruct -Jclass=Parser \
|
||||
-Jimplements=CommentHandler -Jsemantic=Value \
|
||||
-Jpackage=com.thoughtworks.qdox.parser.impl \
|
||||
-Jstack=500 ${GRAMMAR_PATH})
|
||||
|
||||
# Build artifact
|
||||
mkdir -p build/classes
|
||||
javac -d build/classes -source 6 -target 6 \
|
||||
$(find src/main/java -name \*.java)
|
||||
jar cf build/%{name}-%{verbase}-%{vertag}.jar -C build/classes .
|
||||
|
||||
# Inject OSGi manifests
|
||||
jar ufm build/%{name}-%{verbase}-%{vertag}.jar %{SOURCE1}
|
||||
|
||||
mkdir -p build/apidoc
|
||||
javadoc -d build/apidoc -source 6 -notimestamp $(find src/main/java -name \*.java)
|
||||
|
||||
%install
|
||||
# jars
|
||||
install -d -m 0755 %{buildroot}%{_javadir}
|
||||
install -pm 644 target/%{name}-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}-%{version}.jar
|
||||
(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||||
install -d -m 755 %{buildroot}%{repodir}
|
||||
install -d -m 755 %{buildroot}%{repodirlib}
|
||||
install -p -m 644 %{SOURCE7} %{buildroot}%{repodir}/component-info.xml
|
||||
install -d -m 755 %{buildroot}%{repodirsrc}
|
||||
install -p -m 644 %{SOURCE0} %{buildroot}%{repodirsrc}
|
||||
cp -p %{buildroot}%{_javadir}/qdox.jar %{buildroot}%{repodirlib}
|
||||
|
||||
# jar
|
||||
install -dm 0755 %{buildroot}%{_javadir}
|
||||
install -pm 0644 build/%{name}-%{verbase}-%{vertag}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||
# pom
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}-%{version}.pom
|
||||
%add_maven_depmap %{name}-%{version}.pom %{name}-%{version}.jar
|
||||
install -dm 0755 %{buildroot}%{_mavenpomdir}
|
||||
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||||
%add_maven_depmap %{name}.pom %{name}.jar -a qdox:qdox
|
||||
# javadoc
|
||||
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -aL build/apidoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%files -f .mfiles
|
||||
%license LICENSE.txt
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_javadir}/%{name}-%{version}.jar
|
||||
%{_mavenpomdir}/*
|
||||
%if %{defined _maven_repository}
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
%else
|
||||
%{_datadir}/maven-metadata/%{name}.xml*
|
||||
%endif
|
||||
%doc README.md
|
||||
|
||||
%files repolib
|
||||
%defattr(0644,root,root,0755)
|
||||
%{repodir}
|
||||
%dir %{_datadir}/java/repository.jboss.com/%{name}
|
||||
%dir %{_datadir}/java/repository.jboss.com/
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
%license LICENSE.txt
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user