[Jpackage-commits] dist/jaxb-maven2-plugin/devel .cvsignore, 1.1, 1.2 jaxb-maven2-plugin-jpp-depmap.xml, NONE, 1.1 jaxb-maven2-plugin-settings.xml, NONE, 1.1 jaxb-maven2-plugin.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed Feb 4 22:47:57 CET 2009


Update of /home/projects/jpackage/cvs/dist/jaxb-maven2-plugin/devel
In directory ryu.zarb.org:/tmp/cvs-serv12338/devel

Modified Files:
	.cvsignore sources 
Added Files:
	jaxb-maven2-plugin-jpp-depmap.xml 
	jaxb-maven2-plugin-settings.xml jaxb-maven2-plugin.spec 
Log Message:
Import jaxb-maven2-plugin into devel

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jaxb-maven2-plugin/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	4 Feb 2009 21:47:21 -0000	1.1
--- .cvsignore	4 Feb 2009 21:47:55 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ jaxb-maven2-plugin.tar.gz

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jaxb-maven2-plugin/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	4 Feb 2009 21:47:21 -0000	1.1
--- sources	4 Feb 2009 21:47:55 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 005d317fc8c5ca255bd7bedc4d465c96  jaxb-maven2-plugin.tar.gz

--- NEW FILE: jaxb-maven2-plugin-jpp-depmap.xml ---
<dependencies>
<!--
   <dependency>
      <maven>
         <groupId>junit</groupId>
         <artifactId>junit4</artifactId>
         <version>4.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>junit4</artifactId>
         <version>4.4</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>

   <dependency>
      <maven>
         <groupId>javax.xml.bind</groupId>
         <artifactId>jsr173_api</artifactId>
         <version>1.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>stax_1_0_api</artifactId>
         <version>1.0</version>
      </jpp>
   </dependency>

</dependencies>

--- NEW FILE: jaxb-maven2-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 section   free
%define plugin_name maven-jaxb-plugin

Name:           jaxb-maven2-plugin
Version:        1.1
Release:        1%{dist}
Epoch:          0
Summary:        JAXB XJC Plugin

Group:          Development/Libraries/Java
License:        MIT
URL:            https://jaxb.dev.java.net/jaxb-maven2-plugin/
Source0:        jaxb-maven2-plugin.tar.gz
# cvs -d:pserver:guest at cvs.dev.java.net:/cvs export -r HEAD -d jaxb-maven2-plugin jaxb2-sources/jaxb-maven2-plugin
Source2:        %{name}-jpp-depmap.xml
Source3:        %{name}-settings.xml

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

BuildArch:      noarch
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  maven2 >= 0:2.0.7
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-plugin
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-surefire

BuildRequires:  jaxb_2_1_api
BuildRequires:  jaf_1_1_api
BuildRequires:  sun-jaxb-2.1-impl

Requires:  java >= 0:1.5.0
Requires:  maven2 >= 0:2.0.7
Requires:  jaxb_2_1_api
Requires:  jaf_1_1_api
Requires:  sun-jaxb-2.1-impl

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

%description
The JAXB xjc plugin is a Maven version 2 plugin that invokes
the xjc compiler. 
The Java Architecture for XML Binding (JAXB) provides a 
binding compiler, xjc, to generate Java classes from an XML
Schema. The xjc binding compiles an XML schema into one or 
more Java classes. These automatically-generated classes 
handle the translation between XML documents that follow the 
schema and interrelated instances of the derived classes. 
They also ensure that the constraints expressed in the 
schema are maintained as instances of the classes are 
manipulated. The Java classes generated with the JAXB xjc 
plugin represent the different elements and complexTypes in 
an XML Schema.  

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

%description    javadoc
%{summary}.

%prep
%setup -q -n %{name}

%build
cp %{SOURCE3} 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=%{SOURCE2} \
        install javadoc:javadoc


%install
rm -rf $RPM_BUILD_ROOT
install -dm 755 $RPM_BUILD_ROOT%{_javadir}
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/plugins

install -m 644 target/%{plugin_name}-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}.jar

install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap com.sun.tools.xjc.maven2 %{plugin_name} %{version} JPP %{name}

ln -sf %{_javadir}/%{name}.jar $RPM_BUILD_ROOT%{_datadir}/maven2/plugins/%{plugin_name}.jar

# javadoc
install -dm 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} # ghost symlink

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%{_javadir}/*.jar
%{_datadir}/maven2/poms/*
%{_datadir}/maven2/plugins/*
%{_mavendepmapfragdir}/*

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

%changelog
* Wed Feb 04 2009 Ralph Apel <r.apel at r-apel.de> - 0:1.1-1.jpp5
- First release


--- NEW FILE: jaxb-maven2-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>




More information about the JPackage-commits mailing list