[Jpackage-commits] dist/mvn-anno-mojo/devel .cvsignore, 1.1, 1.2 mvn-anno-mojo-jpp-depmap.xml, NONE, 1.1 mvn-anno-mojo-settings.xml, NONE, 1.1 mvn-anno-mojo.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Fri Feb 6 20:06:19 CET 2009


Update of /home/projects/jpackage/cvs/dist/mvn-anno-mojo/devel
In directory ryu.zarb.org:/tmp/cvs-serv14166/devel

Modified Files:
	.cvsignore sources 
Added Files:
	mvn-anno-mojo-jpp-depmap.xml mvn-anno-mojo-settings.xml 
	mvn-anno-mojo.spec 
Log Message:
Import mvn-anno-mojo into devel

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/mvn-anno-mojo/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	6 Feb 2009 19:05:47 -0000	1.1
--- .cvsignore	6 Feb 2009 19:06:17 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ mvn-anno-mojo-1.3.1.tar.gz

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/mvn-anno-mojo/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	6 Feb 2009 19:05:47 -0000	1.1
--- sources	6 Feb 2009 19:06:17 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 2a51ae3104403402d9f2d35a2c3a7376  mvn-anno-mojo-1.3.1.tar.gz

--- NEW FILE: mvn-anno-mojo-jpp-depmap.xml ---
<dependencies>
<!--
   <dependency>
      <maven>
         <groupId>plexus</groupId>
         <artifactId>plexus-compiler-api</artifactId>
         <version>1.5</version>
      </maven>
      <jpp>
         <groupId>JPP/plexus</groupId>
         <artifactId>compiler-api</artifactId>
         <version>1.5.3</version>
      </jpp>
   </dependency>
-->

</dependencies>

--- NEW FILE: mvn-anno-mojo-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: mvn-anno-mojo.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 Plugin Plugin Annotations Extension
Name:           mvn-anno-mojo
Version:        1.3.1
Release:        1%{dist}
Epoch:          0
Group:          Development/Libraries
License:        ASL 2.0
URL:            http://www.jfrog.org/sites/mvn-anno-mojo/latest/
Source0:        mvn-anno-mojo-1.3.1.tar.gz
# svn export http://mvn-anno-mojo.svn.sourceforge.net/svnroot/mvn-anno-mojo/tags/1.3.1 mvn-anno-mojo-1.3.1

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

#Patch0:         maven-jaxb2-plugin-pom.patch

BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  concurrent
BuildRequires:  junit
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-source
BuildRequires:  maven-shared-plugin-tools-api
BuildRequires:  maven-surefire-plugin
BuildRequires:  mojo-maven2-plugin-cobertura
BuildRequires:  mojo-maven2-plugin-idlj

Requires:  java >= 0:1.5.0
Requires:  maven2 >= 0:2.0.7
Requires:  maven-shared-plugin-tools-api
Requires:  plexus-container-default
Requires:  plexus-utils

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 is a Maven2 extension of maven-plugin-plugin that 
allows writing Annotated Plug-in Mojos using JDK 1.5+ 
annotations instead of doclet comments.
This has a couple of benefits over using JavaDoc-style 
annotations:
* You will get compile-time checks for your plugin metadata.
* You can use annotations on interface getter methods 
  instead of field annotations, which allows for greater 
  flexibility in your plugin object model.
* Since JDK 1.5 annotations are supported in most IDEs, you 
  will benefit from code-completion and syntactic checks.


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

%description javadoc
%{summary}.

%prep
%setup -q 
#%patch0 -b .sav0

%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}-parent.pom
%add_to_maven_depmap org.jfrog.maven.annomojo maven-plugin-anno-parent %{version} JPP/%{name} parent

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

install -m 644 maven-plugin-tools-anno/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-maven-plugin-tools-anno.pom
%add_to_maven_depmap org.jfrog.maven.annomojo maven-plugin-tools-anno %{version} JPP/%{name} maven-plugin-tools-anno
install -m 644 maven-plugin-tools-anno/target/maven-plugin-tools-anno-%{version}.jar \
               $RPM_BUILD_ROOT%{_javadir}/%{name}/maven-plugin-tools-anno-%{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}/maven-plugin-anno
cp -pr maven-plugin-anno/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/maven-plugin-anno
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/maven-plugin-tools-anno
cp -pr maven-plugin-tools-anno/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/maven-plugin-tools-anno

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:1.3.1-1.jpp5
- Initial release





More information about the JPackage-commits mailing list