[Jpackage-commits] dist/jboss-packaging-maven-plugin/devel .cvsignore, 1.1, 1.2 jboss-packaging-maven-plugin-2.0-jpp-depmap.xml, NONE, 1.1 jboss-packaging-maven-plugin-settings.xml, NONE, 1.1 jboss-packaging-maven-plugin.spec, NONE, 1.1 sources, 1.1, 1.2

David Walluck david at ryu.zarb.org
Thu Feb 12 23:35:48 CET 2009


Update of /home/projects/jpackage/cvs/dist/jboss-packaging-maven-plugin/devel
In directory ryu.zarb.org:/tmp/cvs-serv28075/devel

Modified Files:
	.cvsignore sources 
Added Files:
	jboss-packaging-maven-plugin-2.0-jpp-depmap.xml 
	jboss-packaging-maven-plugin-settings.xml 
	jboss-packaging-maven-plugin.spec 
Log Message:
- initial import

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jboss-packaging-maven-plugin/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	12 Feb 2009 22:33:59 -0000	1.1
--- .cvsignore	12 Feb 2009 22:35:46 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ jboss-packaging-maven-plugin-2.0.tar.bz2

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/jboss-packaging-maven-plugin/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	12 Feb 2009 22:33:59 -0000	1.1
--- sources	12 Feb 2009 22:35:46 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 18af2bd6cf5231c8ed8a79676e607f6b  jboss-packaging-maven-plugin-2.0.tar.bz2

--- NEW FILE: jboss-packaging-maven-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: jboss-packaging-maven-plugin-2.0-jpp-depmap.xml ---
<dependencies>
   <dependency>
      <maven>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>cobertura-maven-plugin</artifactId>
         <version>2.2</version>
      </maven>
      <jpp>
         <groupId>JPP/mojo</groupId>
         <artifactId>cobertura-maven-plugin</artifactId>
         <version>2.3</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>net.sourceforge.cobertura</groupId>
         <artifactId>cobertura</artifactId>
         <version>1.9</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>cobertura</artifactId>
         <version>1.9</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>net.sourceforge.cobertura</groupId>
         <artifactId>cobertura-runtime</artifactId>
         <version>1.9</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>cobertura-runtime</artifactId>
         <version>1.9</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>urbanophile</groupId>
         <artifactId>java-getopt</artifactId>
         <version>1.0.9</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>gnu-getopt</artifactId>
         <version>1.0.12</version>
      </jpp>
   </dependency>
<!--1) net.sourceforge.cobertura:cobertura-runtime:pom:1.9                                                                        
2) urbanophile:java-getopt:jar:1.0.9
3) net.sourceforge.cobertura:cobertura:jar:1.9-->
</dependencies>

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

Name:           jboss-packaging-maven-plugin
Version:        2.0
Release:        0.beta1.1%{?dist}
Epoch:          0
Summary:        JBoss Packaging Maven Plugin
License:        ASL 2.0
URL:            http://mojo.codehaus.org/jboss-packaging-maven-plugin/
Group:          Development/Libraries/Java
# svn -q export http://svn.codehaus.org/mojo/tags/jboss-packaging-maven-plugin-2.0-beta-1 jboss-packaging-maven-plugin-2.0 && tar cjf jboss-packaging-maven-plugin-2.0.tar.bz2 jboss-packaging-maven-plugin-2.0
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}-settings.xml
Source2:        %{name}-%{version}-jpp-depmap.xml
Requires(post): jpackage-utils >= 0:1.7.5
Requires(postun): jpackage-utils >= 0:1.7.5
Requires:       java >= 0:1.5.0
Requires:       maven2
Requires:       mojo-maven2-plugins
BuildRequires:  cobertura
BuildRequires:  gnu-getopt
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  maven2 >= 0:2.0.7
BuildRequires:  maven2-plugin-checkstyle
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-plugin
BuildRequires:  maven2-plugin-project-info-reports
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-site
BuildRequires:  maven2-plugin-source
BuildRequires:  maven2-default-skin
BuildRequires:  maven-release
BuildRequires:  maven-surefire-plugin
BuildRequires:  mojo-maven2-plugins
BuildRequires:  mojo-maven2-plugin-cobertura
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
This plugin packages various JBoss deployable archive files including
SAR, HAR, ESB and Spring. Such archives are specially named JAR files
with a deployable-specific XML descriptor and file extension.

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

%description javadoc
%{summary}.

%package manual
Summary:        Documents for %{name}
Group:          Development/Documentation

%description manual
%{summary}.

%prep
%setup -q 
cp -p %{SOURCE1} settings.xml
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/m2_repo/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_repo/repository</url>|g" settings.xml

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

%build
export MAVEN_REPO_LOCAL=$(pwd)/m2_repo/repository
mkdir -p $MAVEN_REPO_LOCAL/JPP/maven2/default_poms/

export M2_SETTINGS=$(pwd)/settings.xml
mvn-jpp \
        -e \
        -s $M2_SETTINGS \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        -Dmaven.test.skip=true \
        install javadoc:javadoc #site
# FIXME: site target fails due to class loader issues with checkstyle and cobertura tasks

%install
rm -rf $RPM_BUILD_ROOT

# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -p -m 644 target/%{name}-%{version}-beta-1.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

# pom
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -p -m 755 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.mojo-%{name}.pom
%add_to_maven_depmap org.codehaus.mojo jboss-packaging-maven-plugin %{version} JPP/mojo %{name}

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
# FIXME: (dwalluck): breaks -bi --short-circuit
rm -rf target/site/apidocs
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}

%if 0
# manual
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr target/site/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}.jar
%{_datadir}/maven2/poms/JPP.mojo-%{name}.pom
%{_mavendepmapfragdir}/%{name}

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

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

%changelog
* Thu Feb 12 2009 David Walluck <dwalluck at redhat.com> 0:2.0-0.beta1.1
- release




More information about the JPackage-commits mailing list