[Jpackage-commits] dist/maven-jaxb2-plugin/JPP-5 Makefile, NONE, 1.1 maven-jaxb2-plugin-ClasspathCatalogResolver.patch, NONE, 1.1 maven-jaxb2-plugin-XJC2Mojo.patch, NONE, 1.1 maven-jaxb2-plugin-jpp-depmap.xml, NONE, 1.1 maven-jaxb2-plugin-pom.patch, NONE, 1.1 maven-jaxb2-plugin-settings.xml, NONE, 1.1 maven-jaxb2-plugin.spec, NONE, 1.1 sources, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Sat Feb 7 09:15:00 CET 2009


Update of /home/projects/jpackage/cvs/dist/maven-jaxb2-plugin/JPP-5
In directory ryu.zarb.org:/tmp/cvs-serv29917/JPP-5

Added Files:
	Makefile maven-jaxb2-plugin-ClasspathCatalogResolver.patch 
	maven-jaxb2-plugin-XJC2Mojo.patch 
	maven-jaxb2-plugin-jpp-depmap.xml maven-jaxb2-plugin-pom.patch 
	maven-jaxb2-plugin-settings.xml maven-jaxb2-plugin.spec 
	sources 
Log Message:
Import maven-jaxb2-plugin into JPP-5

--- NEW FILE: maven-jaxb2-plugin-ClasspathCatalogResolver.patch ---
--- plugin/src/main/java/org/jvnet/jaxb2/maven2/resolver/tools/ClasspathCatalogResolver.java.sav	2008-09-03 20:17:44.000000000 +0200
+++ plugin/src/main/java/org/jvnet/jaxb2/maven2/resolver/tools/ClasspathCatalogResolver.java	2008-09-03 20:18:46.000000000 +0200
@@ -5,7 +5,7 @@
 import java.net.URL;
 
 public class ClasspathCatalogResolver extends
-		com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver {
+		org.apache.xml.resolver.tools.CatalogResolver {
 
 	public static final String URI_SCHEME_CLASSPATH = "classpath";
 

--- NEW FILE: maven-jaxb2-plugin-pom.patch ---
--- pom.xml.sav	2008-09-03 18:56:10.000000000 +0200
+++ pom.xml	2008-09-03 18:56:45.000000000 +0200
@@ -243,6 +243,7 @@
 
 	<build>
 		<defaultGoal>install</defaultGoal>
+<!--
 		<extensions>
 			<extension>
 				<groupId>org.jvnet.wagon-svn</groupId>
@@ -250,6 +251,7 @@
 				<version>1.8</version>
 			</extension>
 		</extensions>
+-->
 		<pluginManagement>
 			<plugins>
 				<plugin>

--- NEW FILE: maven-jaxb2-plugin-XJC2Mojo.patch ---
--- plugin/src/main/java/org/jvnet/jaxb2/maven2/XJC2Mojo.java.sav	2008-09-03 20:22:33.000000000 +0200
+++ plugin/src/main/java/org/jvnet/jaxb2/maven2/XJC2Mojo.java	2008-09-03 20:23:47.000000000 +0200
@@ -60,7 +60,7 @@
 import com.sun.codemodel.CodeWriter;
 import com.sun.codemodel.JCodeModel;
 import com.sun.codemodel.JPackage;
-import com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver;
+import org.apache.xml.resolver.tools.CatalogResolver;
 import com.sun.tools.xjc.BadCommandLineException;
 import com.sun.tools.xjc.ErrorReceiver;
 import com.sun.tools.xjc.Language;

--- NEW FILE: Makefile ---
# Makefile for source rpm: maven-jaxb2-plugin
# $Id: Makefile,v 1.1 2009/02/07 08:14:58 jpackage Exp $
NAME := maven-jaxb2-plugin
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-jaxb2-plugin-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: sources ---
8b37c54cade6c6f64bb6f528e576ca5a  maven-jaxb2-plugin-0.6.1.tar.gz

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

Summary:        Maven 2 JAXB 2.x Plugin
Name:           maven-jaxb2-plugin
Version:        0.6.1
Release:        1%{dist}
Epoch:          0
Group:          Development/Libraries
License:        ASL 2.0
URL:            https://maven-jaxb2-plugin.dev.java.net/
Source0:        maven-jaxb2-plugin-0.6.1.tar.gz
# svn export https://maven-jaxb2-plugin.dev.java.net/svn/maven-jaxb2-plugin/tags/0.6.1 maven-jaxb2-plugin-0.6.1 --username guest

Source1:        %{name}-jpp-depmap.xml
Source2:        %{name}-settings.xml

Patch0:         maven-jaxb2-plugin-pom.patch
Patch1:         maven-jaxb2-plugin-ClasspathCatalogResolver.patch
Patch2:         maven-jaxb2-plugin-XJC2Mojo.patch

BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  maven2 >= 0:2.0.7
BuildRequires:  maven2-plugin-antrun
BuildRequires:  maven2-plugin-assembly
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-checkstyle
BuildRequires:  maven2-plugin-dependency
BuildRequires:  maven2-plugin-enforcer
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-plugin
BuildRequires:  maven2-plugin-pmd
BuildRequires:  maven2-plugin-project-info-reports
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-site
BuildRequires:  maven2-plugin-source
BuildRequires:  maven-release
BuildRequires:  maven-surefire-plugin
BuildRequires:  mojo-maven2-plugin-idlj
BuildRequires:  mvn-anno-mojo
BuildRequires:  sun-codemodel
BuildRequires:  sun-jaxb-2.1-impl
BuildRequires:  xml-commons-apis

Requires:  java >= 0:1.5.0
Requires:  maven2
Requires:  mvn-anno-mojo
Requires:  plexus-utils
Requires:  sun-codemodel
Requires:  sun-jaxb-2.1-impl
Requires:  xml-commons-apis

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

%if %{gcj_support}
BuildRequires:          java-gcj-compat-devel
Requires(post):         java-gcj-compat
Requires(postun):       java-gcj-compat
%endif
%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
This Maven 2 plugin wraps the JAXB 2.x XJC compiler and 
provides the capability to generate java sources from 
schemas.

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

%description javadoc
%{summary}.

%prep
%setup -q 
%patch0 -b .sav0
%patch1 -b .sav1
%patch2 -b .sav2

%build
cp %{SOURCE2} maven2-settings.xml

sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/repository</url>|g" maven2-settings.xml
sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" maven2-settings.xml
sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" maven2-settings.xml

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

export M2SETTINGS=$(pwd)/maven2-settings.xml
export MAVEN_REPO_LOCAL=`pwd`/m2_repo/repository

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

%install
rm -rf $RPM_BUILD_ROOT

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

install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-maven-jaxb2-plugin-project.pom
%add_to_maven_depmap org.jvnet.jaxb2.maven2 maven-jaxb2-plugin-project %{version} JPP/%{name} maven-jaxb2-plugin-project

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

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

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

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

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

%changelog
* Fri Feb 06 2009 Ralph Apel <r.apel at r-apel.de> 0:0.6.1-1.jpp5
- Initial release


--- NEW FILE: maven-jaxb2-plugin-jpp-depmap.xml ---
<dependencies>
<!--
-->
   <dependency>
      <maven>
         <groupId>org.jvnet.jaxb2_commons</groupId>
         <artifactId>jaxb-xjc</artifactId>
         <version>2.1.6</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>sun-jaxb-2.1-impl-xjc</artifactId>
         <version>2.1.6</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>relaxngDatatype</groupId>
         <artifactId>relaxngDatatype</artifactId>
         <version>20020414</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>relaxngDatatype</artifactId>
         <version>1.0</version>
      </jpp>
   </dependency>

</dependencies>




More information about the JPackage-commits mailing list