[Jpackage-commits] dist/maven-archetype2/JPP-6 Makefile, NONE, 1.1 maven-archetype2-build.xml, NONE, 1.1 maven-archetype2-catalog-mdo.patch, NONE, 1.1 maven-archetype2-common-mdo.patch, NONE, 1.1 maven-archetype2-common-pom.patch, NONE, 1.1 maven-archetype2-descriptor-mdo.patch, NONE, 1.1 maven-archetype2-jpp-depmap.xml, NONE, 1.1 maven-archetype2-mdo.patch, NONE, 1.1 maven-archetype2-parent-2.pom, NONE, 1.1 maven-archetype2-plugin-pom.patch, NONE, 1.1 maven-archetype2-registry-mdo.patch, NONE, 1.1 maven-archetype2-settings.xml, NONE, 1.1 maven-archetype2.spec, NONE, 1.1 sources, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Sun Dec 5 19:05:31 CET 2010


Update of /home/projects/jpackage/cvs/dist/maven-archetype2/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv9166/JPP-6

Added Files:
	Makefile maven-archetype2-build.xml 
	maven-archetype2-catalog-mdo.patch 
	maven-archetype2-common-mdo.patch 
	maven-archetype2-common-pom.patch 
	maven-archetype2-descriptor-mdo.patch 
	maven-archetype2-jpp-depmap.xml maven-archetype2-mdo.patch 
	maven-archetype2-parent-2.pom 
	maven-archetype2-plugin-pom.patch 
	maven-archetype2-registry-mdo.patch 
	maven-archetype2-settings.xml maven-archetype2.spec sources 
Log Message:
Import maven-archetype2 into JPP-6

--- NEW FILE: maven-archetype2-jpp-depmap.xml ---
<dependencies>
   <dependency>
      <maven>
         <groupId>ant</groupId>
         <artifactId>ant-antlr</artifactId>
         <version>1.6.5</version>
      </maven>
      <jpp>
         <groupId>JPP/ant</groupId>
         <artifactId>ant-antlr</artifactId>
         <version>1.7.0</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>com.thoughtworks.qdox</groupId>
         <artifactId>qdox</artifactId>
         <version>1.6.3</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>qdox</artifactId>
         <version>1.6.1</version>
      </jpp>
   </dependency>

 <dependency>
   <maven>
     <groupId>xpp3</groupId>
     <artifactId>xpp3_min</artifactId>
     <version>1.1.3.4.O</version>
   </maven>
   <jpp>
     <groupId>JPP</groupId>
     <artifactId>xpp3-minimal</artifactId>
     <version>1.1.3.8</version>
   </jpp>
 </dependency>

 <dependency>
   <maven>
     <groupId>org.mortbay.jetty</groupId>
     <artifactId>servlet-api</artifactId>
     <version>2.5-20081211</version>
   </maven>
   <jpp>
     <groupId>JPP</groupId>
     <artifactId>servlet_2_5_api</artifactId>
     <version>2.5</version>
   </jpp>
 </dependency>

</dependencies>

--- NEW FILE: maven-archetype2-build.xml ---

--- NEW FILE: maven-archetype2-mdo.patch ---
--- archetype-common/src/main/mdo/archetype.mdo.sav	2010-11-29 00:08:40.000000000 +0100
+++ archetype-common/src/main/mdo/archetype.mdo	2010-11-29 00:09:13.000000000 +0100
@@ -2,7 +2,8 @@
 
  <!-- START SNIPPET: modello-model -->
 
-<model>
+<model xmlns="http://modello.codehaus.org/MODELLO/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.0.0 http://modello.codehaus.org/xsd/modello-1.0.0.xsd"
+  xml.namespace="http://maven.apache.org/ARCHETYPE/${version}">
   <id>archetype</id>
   <name>Archetype</name>
   <description><![CDATA[Maven's model for the archetype descriptor.]]></description>

--- NEW FILE: maven-archetype2-descriptor-mdo.patch ---
--- archetype-common/src/main/mdo/archetype-descriptor.mdo.sav	2010-11-29 00:02:29.000000000 +0100
+++ archetype-common/src/main/mdo/archetype-descriptor.mdo	2010-11-29 00:03:30.000000000 +0100
@@ -17,7 +17,9 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<model>
+<model xmlns="http://modello.codehaus.org/MODELLO/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.0.0 http://modello.codehaus.org/xsd/modello-1.0.0.xsd"
+  xml.namespace="http://maven.apache.org/ARCHETYPEDESCRIPTOR/${version}">
+
   <id>archetype-descriptor</id>
   <name>ArchetypeDescriptor</name>
 

--- NEW FILE: Makefile ---
# Makefile for source rpm: maven-archetype2
# $Id: Makefile,v 1.1 2010/12/05 18:05:29 jpackage Exp $
NAME := maven-archetype2
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-archetype2-parent-2.pom ---
<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
    <parent>
    <groupId>org.apache.maven</groupId>
    <artifactId>maven-parent</artifactId>
    <version>5</version>
    <relativePath>../pom/maven/pom.xml</relativePath>
  </parent>
  <groupId>org.apache.maven.archetype</groupId>
  <artifactId>maven-archetype-parent</artifactId>
  <version>2</version>
  <packaging>pom</packaging>
  <name>Maven Archetype Parent</name>
  <issueManagement>
    <system>jira</system>
    <url>http://jira.codehaus.org/browse/ARCHETYPE</url>
  </issueManagement>            
  <modules>
     <module>maven-archetype</module>
     <module>maven-archetype-bundles</module>
  </modules>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <tagBase>https://svn.apache.org/repos/asf/maven/archetype/tags</tagBase>
            <arguments>-N -Prelease</arguments>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>               
  <scm>
    <connection>scm:svn:https://svn.apache.org/repos/asf/maven/archetype/tags/maven-archetype-parent-2</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/archetype/tags/maven-archetype-parent-2</developerConnection>
    <url>https://svn.apache.org/repos/asf/maven/archetype/tags/maven-archetype-parent-2</url>
  </scm>
</project>

--- NEW FILE: maven-archetype2-common-mdo.patch ---
--- archetype-common/src/main/mdo/archetype-common.mdo.sav	2010-11-28 23:49:43.000000000 +0100
+++ archetype-common/src/main/mdo/archetype-common.mdo	2010-11-28 23:51:13.000000000 +0100
@@ -17,7 +17,9 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<model>
+<model xmlns="http://modello.codehaus.org/MODELLO/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.0.0 http://modello.codehaus.org/xsd/modello-1.0.0.xsd"
+  xml.namespace="http://maven.apache.org/ARCHETYPECOMMON/${version}">
+
   <id>archetype-common</id>
   <name>ArchetypeCommon</name>
 

--- NEW FILE: sources ---
76f8890b7e68dc946592a5e4845f2abc  maven-archetype-2.0-alpha-3.tar.gz
4e28294a8e1c31a53b7086d6049da13e  maven-archetype2-autogenerated-files.tar.gz

--- NEW FILE: maven-archetype2-plugin-pom.patch ---
--- archetype-plugin/pom.xml.sav	2008-08-22 10:37:50.000000000 +0200
+++ archetype-plugin/pom.xml	2008-08-22 10:38:13.000000000 +0200
@@ -70,6 +70,7 @@
 
   <build>
     <plugins>
+<!--
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-plugin-plugin</artifactId>
@@ -86,6 +87,7 @@
           </execution>
         </executions>
       </plugin>
+-->
       <plugin>
         <artifactId>maven-site-plugin</artifactId>
         <configuration>

--- NEW FILE: maven-archetype2-catalog-mdo.patch ---
--- archetype-common/src/main/mdo/archetype-catalog.mdo.sav	2010-11-29 00:05:45.000000000 +0100
+++ archetype-common/src/main/mdo/archetype-catalog.mdo	2010-11-29 00:06:32.000000000 +0100
@@ -17,7 +17,8 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<model>
+<model xmlns="http://modello.codehaus.org/MODELLO/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.0.0 http://modello.codehaus.org/xsd/modello-1.0.0.xsd"
+  xml.namespace="http://maven.apache.org/ARCHETYPECATALOG/${version}">
   <id>archetype-catalog</id>
   <name>ArchetypeCatalog</name>
   <description>

--- NEW FILE: maven-archetype2.spec ---
# Copyright (c) 2000-2008, 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

# 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 bname archetype
%define oname maven-archetype
%define namedversion 2.0-alpha-3 

%define maven_settings_file %{_builddir}/%{name}/settings.xml

Name:           maven-archetype2
Version:        2.0
Release:        0.a3.2%{dist}
Epoch:          0
Summary:        Maven Archetype 2
License:        Apache Software License 2.0
Group:          Development/Java
URL:            http://maven.apache.org/
Source0:        %{oname}-%{namedversion}.tar.gz
# svn export http://svn.apache.org/repos/asf/maven/archetype/tags/maven-archetype-2.0-alpha-3/

Source1:        %{name}-build.xml
Source2:        %{name}-jpp-depmap.xml
Source3:        %{name}-settings.xml
Source4:        %{name}-parent-2.pom
Source5:        %{name}-autogenerated-files.tar.gz
Patch0:         maven-archetype2-plugin-pom.patch
Patch1:         maven-archetype2-common-pom.patch
Patch2:         maven-archetype2-common-mdo.patch
Patch3:         maven-archetype2-registry-mdo.patch
Patch4:         maven-archetype2-descriptor-mdo.patch
Patch5:         maven-archetype2-catalog-mdo.patch
Patch6:         maven-archetype2-mdo.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

BuildArch:      noarch
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  ant >= 0:1.7.1
BuildRequires:  ant-antlr
BuildRequires:  junit
%if %{with_maven}
BuildRequires:  maven2-common-poms
BuildRequires:  maven2 >= 0:2.0.7
BuildRequires:  maven2-plugin-ant
BuildRequires:  maven2-plugin-antrun
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-dependency
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-plugin
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-war
BuildRequires:  maven2-plugin-site
BuildRequires:  maven-surefire-plugin
BuildRequires:  maven-shared-invoker
BuildRequires:  maven-shared-plugin-testing-harness
BuildRequires:  modello-maven-plugin >= 0:1.3
BuildRequires:  jetty6-core
BuildRequires:  jetty6-maven2-plugins
BuildRequires:  plexus-maven-plugin >= 0:1.3.5
BuildRequires:  xpp3-minimal
%endif
BuildRequires:  cargo
BuildRequires:  easymock-java5
BuildRequires:  modello >= 0:1.3

BuildRequires:  apache-commons-io
BuildRequires:  jchardet
BuildRequires:  geronimo-jta-1.0.1B-api

Requires:  java >= 0:1.6.0
Requires:  geronimo-jta-1.0.1B-api
Requires:  apache-commons-io
Requires:  jchardet
Requires:  maven-shared-invoker

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


%description
Maven Archetypes

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

%description javadoc
%{summary}.

%prep
%setup -q -n %{oname}-%{namedversion}
cp %{SOURCE1} build.xml
cp %{SOURCE3} settings.xml
#gzip -dc %{SOURCE4} | tar xf -
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
%if %{without_maven}
gzip -dc %{SOURCE5} | tar xf -
%endif
%patch0 -b .sav0
%patch1 -b .sav1
%patch2 -b .sav2
%patch3 -b .sav3
%patch4 -b .sav4
%patch5 -b .sav5
%patch6 -b .sav6

%build
export JAVA_HOME=%{_jvmdir}/java

export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
mkdir -p $MAVEN_REPO_LOCAL/JPP/maven2/default_poms/
cp %{SOURCE4} $MAVEN_REPO_LOCAL/JPP/maven2/default_poms/org.apache.maven.archetype-maven-archetype-parent.pom

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

export M2_SETTINGS=$(pwd)/settings.xml
%if %{with_maven}
    mvn-jpp \
        -e \
        -s $M2_SETTINGS \
        -Dmaven.test.failure.ignore=true \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        ant:ant install
    mvn-jpp \
        -e \
        -s $M2_SETTINGS \
        -Daggregate=true \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        javadoc:javadoc
%else
export CLASSPATH=$(build-classpath \
classworlds \
modello/core \
modello/plugin-xml \
modello/plugin-xpp3 \
modello/plugin-xsd \
plexus/classworlds \
plexus/containers-component-api \
plexus/containers-container-default \
plexus/utils \
)

pushd archetype-common
java org.codehaus.modello.ModelloCli src/main/mdo/archetype.mdo xpp3-reader src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype.mdo java src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype.mdo xpp3-writer src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype.mdo xsd src/main/java 1.0.0 false

java org.codehaus.modello.ModelloCli src/main/mdo/archetype-common.mdo xpp3-reader src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-common.mdo java src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-common.mdo xpp3-writer src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-common.mdo xsd src/main/java 1.0.0 false

java org.codehaus.modello.ModelloCli src/main/mdo/archetype-registry.mdo xpp3-reader src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-registry.mdo java src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-registry.mdo xpp3-writer src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-registry.mdo xsd src/main/java 1.0.0 false

java org.codehaus.modello.ModelloCli src/main/mdo/archetype-descriptor.mdo xpp3-reader src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-descriptor.mdo java src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-descriptor.mdo xpp3-writer src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-descriptor.mdo xsd src/main/java 1.0.0 false

java org.codehaus.modello.ModelloCli src/main/mdo/archetype-catalog.mdo xpp3-reader src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-catalog.mdo java src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-catalog.mdo xpp3-writer src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/archetype-catalog.mdo xsd src/main/java 1.0.0 false
popd


mkdir -p .m2/repository/org/mortbay/jetty/jetty-util/6.1.7/
ln -sf $(build-classpath jetty6/jetty6-util) .m2/repository/org/mortbay/jetty/jetty-util/6.1.7/jetty-util-6.1.7.jar

export CLASSPATH=$(build-classpath \
cargo/cargo-core-api-container \
cargo/cargo-core-api-generic \
cargo/cargo-core-api-module \
cargo/cargo-core-api-util \
cargo/cargo-core-container-jetty \
classworlds \
commons-codec \
commons-httpclient \
commons-io \
commons-lang \
easymock-java5 \
jchardet \
jdom \
jetty6/jetty6 \
jetty6/jetty6-util \
jetty6/jsp-2.0/jasper5-compiler \
jetty6/jsp-2.0/jasper5-runtime \
jsp_2_0_api \
junit \
maven2/artifact \
maven2/artifact-manager \
maven2/core \
maven2/model \
maven2/plugin-api \
maven2/plugin-descriptor \
maven2/profile \
maven2/project \
maven2/repository-metadata \
maven2/settings \
maven-shared/invoker \
maven-shared/plugin-testing-harness \
maven-wagon/file \
maven-wagon/http \
maven-wagon/provider-api \
plexus/container-default \
plexus/interactivity-api \
plexus/utils \
plexus/velocity \
servlet_2_4_api \
velocity \
)


CLASSPATH=$CLASSPATH:target/classes:target/test-classes
CLASSPATH=$CLASSPATH:src/test/resources
pushd archetype-testing
pushd archetype-proxy
   ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only package javadoc
#   CLASSPATH=$CLASSPATH:$(pwd)/target/archetype-proxy-%{namedversion}.jar
popd
pushd archetype-repository
   ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only package javadoc
#   CLASSPATH=$CLASSPATH:$(pwd)/target/archetype-repository-%{namedversion}.jar
popd
popd
pushd archetype-common
   rm src/test/java/org/apache/maven/archetype/repositorycrawler/DefaultRepositoryCrawlerTest.java
   rm src/test/java/org/apache/maven/archetype/test/ArchetyperRoundtripTest.java
   rm src/test/java/org/apache/maven/archetype/test/ArchetyperRoundtripWithProxyTest.java
   mkdir -p target/wars/
   cp ../archetype-testing/archetype-repository/target/archetype-repository-%{namedversion}.war \
       target/wars/archetype-repository.war
   ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only package javadoc
   CLASSPATH=$CLASSPATH:$(pwd)/target/archetype-common-%{namedversion}.jar
popd
pushd archetype-packaging
   ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
   CLASSPATH=$CLASSPATH:$(pwd)/target/archetype-packaging-%{namedversion}.jar
popd
pushd archetype-plugin
   ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
%endif

%install
rm -rf $RPM_BUILD_ROOT
# jars/poms
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/plugins


%add_to_maven_depmap org.apache.maven.archetype maven-archetype %{namedversion} JPP/%{name} archetype
install -m 644 pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.maven-archetype2-archetype.pom

install -m 644 archetype-common/target/archetype-common-%{namedversion}.jar \
               $RPM_BUILD_ROOT%{_javadir}/%{name}/common-%{version}.jar
%add_to_maven_depmap org.apache.maven.archetype archetype-common %{namedversion} JPP/%{name} common
install -m 644 archetype-common/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.%{name}-common.pom

install -m 644 archetype-packaging/target/archetype-packaging-%{namedversion}.jar \
               $RPM_BUILD_ROOT%{_javadir}/%{name}/packaging-%{version}.jar
%add_to_maven_depmap org.apache.maven.archetype archetype-packaging %{namedversion} JPP/%{name} packaging
install -m 644 archetype-packaging/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.%{name}-packaging.pom

%add_to_maven_depmap org.apache.maven.archetype archetype-testing %{namedversion} JPP/%{name} testing
install -m 644 archetype-testing/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.%{name}-testing.pom

install -m 644 archetype-testing/archetype-proxy/target/archetype-proxy-%{namedversion}.war \
               $RPM_BUILD_ROOT%{_javadir}/%{name}/proxy-%{version}.war
%add_to_maven_depmap org.apache.maven.archetype archetype-proxy %{namedversion} JPP/%{name} proxy
install -m 644 archetype-testing/archetype-proxy/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.%{name}-proxy.pom

install -m 644 archetype-testing/archetype-repository/target/archetype-repository-%{namedversion}.war \
               $RPM_BUILD_ROOT%{_javadir}/%{name}/repository-%{version}.war
%add_to_maven_depmap org.apache.maven.archetype archetype-repository %{namedversion} JPP/%{name} repository
install -m 644 archetype-testing/archetype-repository/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.%{name}-repository.pom

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

install -m 644 archetype-plugin/target/%{oname}-plugin-%{namedversion}.jar \
    $RPM_BUILD_ROOT%{_datadir}/maven2/plugins/archetype2-plugin-%{version}.jar
%add_to_maven_depmap org.apache.maven.plugins %{oname}-plugin %{namedversion} JPP/maven2/plugins archetype2-plugin
install -m 644 archetype-plugin/pom.xml \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven2.plugins-archetype2-plugin.pom
(cd $RPM_BUILD_ROOT%{_datadir}/maven2/plugins && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)


# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%if %{with_maven}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%else
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/proxy
cp -pr archetype-testing/archetype-proxy/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/proxy
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/repository
cp -pr archetype-testing/archetype-repository/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/repository
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/common
cp -pr archetype-common/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/common
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/plugin
cp -pr archetype-plugin/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/plugin
%endif
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}/%{name}
%{_datadir}/maven2/poms/*
%{_datadir}/maven2/plugins/*
%{_mavendepmapfragdir}/*

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

%changelog
* Sun Nov 28 2010 Ralph Apel <r.apel at r-apel.de> 0:2.0-0.a3.2
- Adapt to JPP6

* Sat Sep 27 2008 Ralph Apel <r.apel at r-apel.de> 0:2.0-0.a3.1.jpp5
- First release


--- NEW FILE: maven-archetype2-common-pom.patch ---
--- archetype-common/pom.xml.sav	2010-11-28 23:43:11.000000000 +0100
+++ archetype-common/pom.xml	2010-11-28 23:44:55.000000000 +0100
@@ -157,7 +157,9 @@
             </goals>
             <configuration>
               <version>1.0.0</version>
+              <models>
               <model>src/main/mdo/archetype-common.mdo</model>
+              </models>
             </configuration>
           </execution>
           <execution>
@@ -170,7 +172,9 @@
             </goals>
             <configuration>
               <version>1.0.0</version>
+              <models>
               <model>src/main/mdo/archetype-registry.mdo</model>
+              </models>
             </configuration>
           </execution>
           <execution>
@@ -183,7 +187,9 @@
             </goals>
             <configuration>
               <version>1.0.0</version>
+              <models>
               <model>src/main/mdo/archetype-descriptor.mdo</model>
+              </models>
             </configuration>
           </execution>
           <execution>
@@ -196,7 +202,9 @@
             </goals>
             <configuration>
               <version>1.0.0</version>
+              <models>
               <model>src/main/mdo/archetype-catalog.mdo</model>
+              </models>
             </configuration>
           </execution>
           <execution>
@@ -209,7 +217,9 @@
             </goals>
             <configuration>
               <version>1.0.0</version>
+              <models>
               <model>src/main/mdo/archetype.mdo</model>
+              </models>
             </configuration>
           </execution>
         </executions>
@@ -415,4 +425,4 @@
           </build>          
       </profile>
   </profiles>
-</project>
\ No newline at end of file
+</project>

--- NEW FILE: maven-archetype2-registry-mdo.patch ---
--- archetype-common/src/main/mdo/archetype-registry.mdo.sav	2010-11-28 23:58:29.000000000 +0100
+++ archetype-common/src/main/mdo/archetype-registry.mdo	2010-11-28 23:59:39.000000000 +0100
@@ -17,7 +17,9 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<model>
+<model xmlns="http://modello.codehaus.org/MODELLO/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.0.0 http://modello.codehaus.org/xsd/modello-1.0.0.xsd"
+  xml.namespace="http://maven.apache.org/ARCHETYPEREGISTRY/${version}">
+
   <id>archetype-registry</id>
   <name>ArchetypeRegistry</name>
 

--- NEW FILE: maven-archetype2-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