rpms/mercury/devel 0001-Make-it-build.patch, NONE, 1.1 0001-Replace-plexus.lang-dependency-with-plexus.i18n.patch, NONE, 1.1 mercury.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Lubomir Rintel lkundrak at fedoraproject.org
Mon Feb 15 11:33:25 UTC 2010


Author: lkundrak

Update of /cvs/pkgs/rpms/mercury/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32486/devel

Modified Files:
	.cvsignore sources 
Added Files:
	0001-Make-it-build.patch 
	0001-Replace-plexus.lang-dependency-with-plexus.i18n.patch 
	mercury.spec 
Log Message:
Initial import

0001-Make-it-build.patch:
 pom.xml |   39 +++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 20 deletions(-)

--- NEW FILE 0001-Make-it-build.patch ---
>From 6475e591167759d3784b9d75bdecf20bd66ce63f Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak at v3.sk>
Date: Sun, 29 Nov 2009 11:52:22 +0100
Subject: [PATCH] Make it build

Remove dependencies on maven-enforcer-plugin, maven-release-plugin,
plexus-component-metadata and subprojects with unsatisfied dependencies.
---
 pom.xml |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/pom.xml b/pom.xml
index 47a515b..cefeefc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,16 +55,16 @@ under the License.
 
   <modules>
     <module>mercury-artifact</module>
-    <module>mercury-md</module>
-    <module>mercury-repo</module>
-    <module>mercury-transport</module>
+    <!--<module>mercury-md</module> needs mercury-util -->
+    <!--module>mercury-repo</module> needs mercury-md -->
+    <!--module>mercury-transport</module> mercury-crypto -->
     <module>mercury-external</module>
-    <module>mercury-crypto</module>
-    <module>mercury-util</module>
+    <!--module>mercury-crypto</module> needs bcpg -->
+    <!--module>mercury-util</module> needs mercury-crypto -->
     <module>mercury-event</module>
     <module>mercury-logging</module>
-    <module>mercury-plexus</module>
-    <module>mercury-wagon</module>
+    <!--module>mercury-plexus</module> needs plexus-component-metadata -->
+    <!--module>mercury-wagon</module> needs plexus-component-metadata -->
 <!-- 
     <module>mercury-it</module>
 -->
@@ -270,11 +270,11 @@ under the License.
         <version>${plexus.lang.version}</version>
       </dependency>
 
-      <dependency>
+      <!--dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-component-metadata</artifactId>
         <version>${plexus.component.metadata.version}</version>
-      </dependency>
+      </dependency-->
       
       <dependency>
         <groupId>org.sonatype.spice</groupId>
@@ -491,7 +491,7 @@ under the License.
     <pluginManagement>
 
       <plugins>
-        <plugin>
+        <!--plugin>
           <artifactId>maven-release-plugin</artifactId>
           <version>2.0-beta-8</version>
           <configuration>
@@ -501,8 +501,8 @@ under the License.
             <goals>deploy</goals>
             <arguments>-Prelease</arguments>
           </configuration>
-        </plugin>
-        <plugin>
+        </plugin-->
+        <!--plugin>
           <groupId>org.codehaus.plexus</groupId>
           <artifactId>plexus-component-metadata</artifactId>
           <version>${plexus.component.metadata.version}</version>
@@ -513,7 +513,7 @@ under the License.
               </goals>
             </execution>
           </executions>
-        </plugin>
+        </plugin-->
         <plugin>
           <groupId>org.codehaus.modello</groupId>
           <artifactId>modello-maven-plugin</artifactId>
@@ -524,10 +524,10 @@ under the License.
 
     <plugins>
 
-      <plugin>
+      <!--plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-release-plugin</artifactId>
-      </plugin>
+      </plugin-->
 
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -555,7 +555,7 @@ under the License.
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
       </plugin>
-      <plugin>
+      <!--plugin>
         <artifactId>maven-enforcer-plugin</artifactId>
         <version>1.0-alpha-4</version>
         <executions>
@@ -574,15 +574,15 @@ under the License.
                       that is plexus component made
                       with older plexus container. </message>
                 </bannedDependencies>
-                <!--  <requirePluginVersions>
+                <!- - <requirePluginVersions>
                   <banSnapshots>false</banSnapshots>
-                  </requirePluginVersions>-->
+                  </requirePluginVersions>- ->
               </rules>
               <fail>true</fail>
             </configuration>
           </execution>
         </executions>
-      </plugin>
+      </plugin-->
     </plugins>
   </build>
 
-- 
1.6.5.2


0001-Replace-plexus.lang-dependency-with-plexus.i18n.patch:
 mercury-lang-i18n.pl |   29 +++++++++++++++++++++++++++++
 pom.xml              |    9 ++++-----
 2 files changed, 33 insertions(+), 5 deletions(-)

--- NEW FILE 0001-Replace-plexus.lang-dependency-with-plexus.i18n.patch ---
>From 816e8ce50a3cf3cfa300935aff0a8e8faca57400 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak at v3.sk>
Date: Thu, 24 Dec 2009 17:22:01 +0100
Subject: [PATCH] Replace plexus.lang dependency with plexus.i18n

Changes to POM and script that migrates the source.
---
 mercury-lang-i18n.pl |   29 +++++++++++++++++++++++++++++
 pom.xml              |    8 ++++----
 2 files changed, 33 insertions(+), 4 deletions(-)
 create mode 100644 mercury-lang-i18n.pl

diff --git a/mercury-lang-i18n.pl b/mercury-lang-i18n.pl
new file mode 100644
index 0000000..33c6817
--- /dev/null
+++ b/mercury-lang-i18n.pl
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -ni
+
+# Refactor mercury to use plexus.i18n instead of plexus.lang (which is, according to upstream, "stalled")
+# find -name '*.java' -exec grep -l org.codehaus.plexus.lang '{}' \; |xargs perl -ni mercury-lang-i18n.pl
+
+# Replace plexus.lang with plexus.i18n
+s/org.codehaus.plexus.lang.DefaultLanguage/org.codehaus.plexus.i18n.DefaultI18N;\nimport org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException/;
+s/org.codehaus.plexus.lang.Language/org.codehaus.plexus.i18n.I18N/;
+s/private static final Language (\S+) = new DefaultLanguage\S*\([^\)]*\)/private static final DefaultI18N $1 = new DefaultI18N ()/ and ($lang = $1, $thisclass = $class);
+
+# Initialize I18N in constructors of classes that instantiate I18N
+/^\s*(public)?\s*class\s+(\S+)/ and ($class = $2, $thisclass = undef);
+if ($inclass == 2)
+{
+	/^(\s*)(\})?/; $ws = $2 ? "$1    " : $1;
+	$f = "$1try { $lang.initialize (); } catch( InitializationException e ) {} /* $class = $thisclass */";
+	if (/this/) { s/$/\n$f/ }
+	else { s/^/$f\n/ }
+	$inclass = 0;
+}
+$thisclass and /(public|protected)\s+$thisclass/ and $inclass = 1;
+/\}/ and $inclass = 0;
+$inclass and /\{/ and $inclass++;
+
+# Rewrite getMessage calls
+s/$lang.getMessage\s*\(\s*(\"[^\"\)]*\")\s*\)/$lang.getString ($class.class.getPackage().getName()+".Messages", null, $1)/;
+s/$lang.getMessage\s*\(([^\)]*,[^\)]*)/$lang.format ($class.class.getPackage().getName()+".Messages", null, $1/;
+
+print;
diff --git a/pom.xml b/pom.xml
index cefeefc..4a03c50 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,7 +80,7 @@ under the License.
     <plexus.component.annotations.version>1.0-beta-3.0.6</plexus.component.annotations.version>
     <plexus.component.metadata.version>1.0-beta-3.0.6</plexus.component.metadata.version>
     <plexus.utils.version>1.5.5</plexus.utils.version>
-    <plexus.lang.version>1.1</plexus.lang.version>
+    <plexus.i18n.version>1.0</plexus.i18n.version>
 
     <plexus.spice.model.builder.version>1.8</plexus.spice.model.builder.version>
 
@@ -266,8 +266,8 @@ under the License.
 
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-lang</artifactId>
-        <version>${plexus.lang.version}</version>
+        <artifactId>plexus-i18n</artifactId>
+        <version>${plexus.i18n.version}</version>
       </dependency>
 
       <!--dependency>
@@ -442,7 +442,7 @@ under the License.
   <dependencies>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-lang</artifactId>
+      <artifactId>plexus-i18n</artifactId>
       <exclusions>
         <exclusion>
           <groupId>org.codehaus.plexus</groupId>
-- 
1.6.5.2



--- NEW FILE mercury.spec ---
Name:           mercury
Version:        1.0
Release:        0.2.alpha6%{?dist}
Summary:        Replacement for the Maven Artifact subsystem

Group:          Development/Tools
License:        ASL 2.0
URL:            http://maven.apache.org/mercury/mercury-artifact/
# svn export http://svn.apache.org/repos/asf/maven/mercury/tags/mercury-1.0-alpha-6
# tar czf mercury-1.0-alpha-6.tar.gz mercury-1.0-alpha-6
Source0:        mercury-%{version}-alpha-6.tar.gz
Patch0:         0001-Make-it-build.patch
Patch1:         0001-Replace-plexus.lang-dependency-with-plexus.i18n.patch
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires:  classworlds
BuildRequires:  jakarta-commons-collections
BuildRequires:  jakarta-commons-lang
BuildRequires:  jakarta-commons-logging
BuildRequires:  java-devel-openjdk
BuildRequires:  jpackage-utils
BuildRequires:  junit4
BuildRequires:  log4j
BuildRequires:  maven2
BuildRequires:  maven2-common-poms
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-site
BuildRequires:  maven-doxia
BuildRequires:  maven-doxia-sitetools
BuildRequires:  maven-shared
BuildRequires:  maven-shared-archiver
BuildRequires:  maven-surefire
BuildRequires:  maven-surefire-maven-plugin
BuildRequires:  maven-wagon
BuildRequires:  plexus-archiver
BuildRequires:  plexus-compiler
BuildRequires:  plexus-container-default
BuildRequires:  plexus-digest
BuildRequires:  plexus-i18n
BuildRequires:  plexus-utils
BuildRequires:  plexus-velocity
BuildRequires:  servlet_2_4_api
BuildRequires:  tomcat5
BuildRequires:  velocity

Requires:       jpackage-utils
BuildArch:      noarch

%description
Maven Mercury is a replacement for the Maven Artifact subsystem, and a
complete replacement for the HTTP/HTTPS/DAV/DAVS portions of the existing
transport.

This package only contains Logging, Artifact, External Dependencies and
Event Framework. Transports, Mercury Repositories, Crypto, Metadata, Ant
Tasks, Shared Utilities, Maven resolusion comparison, Wagon provider
and Plexus Component are not provided.


%package javadoc
Summary:        API documentation for %{name}
Group:          Documentation
Requires:       jpackage-utils

%description javadoc
Javadoc HTML documentation for %{name}.


%prep
%setup -q -n %{name}-%{version}-alpha-6
%patch0 -p1 -b .build
%patch1 -p1 -b .lang


%build
find -name '*.java' -exec grep -l org.codehaus.plexus.lang '{}' \; |
        xargs perl -ni mercury-lang-i18n.pl

MAVEN_REPO_LOCAL=$PWD/.m2/repository
rm -rf $MAVEN_REPO_LOCAL
mkdir -p $MAVEN_REPO_LOCAL

mvn-jpp install javadoc:javadoc \
        -Dmaven.test.skip=true \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL


%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT%{_javadir}/mercury
for S in logging artifact external event
do
        # Code
        install -p -m644 mercury-$S/target/mercury-$S-%{version}-alpha-6.jar \
                $RPM_BUILD_ROOT%{_javadir}/mercury/$S-%{version}-alpha-6.jar
        ln -s $S-%{version}-alpha-6.jar \
                $RPM_BUILD_ROOT%{_javadir}/mercury/$S.jar

        # Javadoc
        install -d $RPM_BUILD_ROOT%{_javadir}/mercury-%{version}/$S
        cp -a mercury-$S/target/site/apidocs/* \
                $RPM_BUILD_ROOT%{_javadir}/mercury-%{version}/$S
done


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%{_javadir}/mercury
%doc release.notes.txt ./src/licenses/apache.txt


%files javadoc
%defattr(-,root,root,-)
%{_javadir}/mercury-%{version}


%changelog
* Thu Dec 24 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.0-0.2.alpha6
- Replace plexus.lang with plexus.i18n, as advised by upstream

* Sun Nov 29 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.0-0.1.alpha6
- Initial packaging


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/mercury/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	15 Feb 2010 11:21:02 -0000	1.1
+++ .cvsignore	15 Feb 2010 11:33:24 -0000	1.2
@@ -0,0 +1 @@
+mercury-1.0-alpha-6.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/mercury/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	15 Feb 2010 11:21:02 -0000	1.1
+++ sources	15 Feb 2010 11:33:24 -0000	1.2
@@ -0,0 +1 @@
+ab5c4e432a3c7e94a7b79f80549366d5  mercury-1.0-alpha-6.tar.gz



More information about the scm-commits mailing list