[Jpackage-commits] dist/maven-release/devel .cvsignore, 1.1, 1.2 maven-release-CommandLineFactoryTest.patch, NONE, 1.1 maven-release-ForkedMavenExecutorTest.patch, NONE, 1.1 maven-release-build.xml, NONE, 1.1 maven-release-jpp-depmap.xml, NONE, 1.1 maven-release-settings.xml, NONE, 1.1 maven-release.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 21:10:30 CEST 2008


Update of /home/projects/jpackage/cvs/dist/maven-release/devel
In directory ryu.zarb.org:/tmp/cvs-serv6470/devel

Modified Files:
	.cvsignore sources 
Added Files:
	maven-release-CommandLineFactoryTest.patch 
	maven-release-ForkedMavenExecutorTest.patch 
	maven-release-build.xml maven-release-jpp-depmap.xml 
	maven-release-settings.xml maven-release.spec 
Log Message:
Import from JPP 5.0

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/maven-release/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 19:10:09 -0000	1.1
--- .cvsignore	28 May 2008 19:10:27 -0000	1.2
***************
*** 0 ****
--- 1,2 ----
+ maven-release-4.tar.gz
+ maven-release-autogenerated-files.tar.gz

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

--- NEW FILE: maven-release-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: maven-release.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 release
%define manager_version 1.0-alpha-4
%define plugin_version 2.0-beta-7

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

Name:           maven-release
Version:        4
Release:        2jpp
Epoch:          0
Summary:        Maven Release
License:        Apache Software License 2.0
Group:          Development/Java
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
URL:            http://maven.apache.org/
Source0:        %{name}-%{version}.tar.gz
# svn export http://svn.apache.org/repos/asf/maven/release/tags/maven-release-4/


Source1:        %{name}-build.xml
Source2:        %{name}-jpp-depmap.xml
Source3:        %{name}-settings.xml
Source4:        %{name}-autogenerated-files.tar.gz
Patch0:         %{name}-ForkedMavenExecutorTest.patch
Patch1:         %{name}-CommandLineFactoryTest.patch

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

BuildArch:      noarch
BuildRequires:  jpackage-utils >= 0:1.7.4
BuildRequires:  java-devel = 0:1.5.0
BuildRequires:  ant >= 0:1.6.5
%if %{with_maven}
BuildRequires:  maven2-common-poms
BuildRequires:  maven2 >= 0:2.0.7
BuildRequires:  maven2-plugin-ant
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:  modello-maven-plugin >= 0:1.0-0.a15.2
BuildRequires:  plexus-maven-plugin >= 0:1.3.5
%endif
BuildRequires:  geronimo-jta-1.0.1B-api
BuildRequires:  jaxen
BuildRequires:  jdom
BuildRequires:  jmock
BuildRequires:  maven2-bootstrap >= 0:2.0.7
BuildRequires:  maven-scm >= 0:1.0-1
BuildRequires:  maven-scm-test >= 0:1.0-1
BuildRequires:  maven-shared-plugin-testing-harness
BuildRequires:  maven-wagon
BuildRequires:  modello >= 0:1.0-0.a15.2
BuildRequires:  plexus-container-default
BuildRequires:  plexus-interactivity
BuildRequires:  plexus-utils

Requires:  jaxen
Requires:  jdom
Requires:  maven2-bootstrap >= 0:2.0.7
Requires:  maven-scm >= 0:1.0-1
Requires:  plexus-container-default
Requires:  plexus-interactivity
Requires:  plexus-utils

Requires(post):   jpackage-utils >= 0:1.7.4
Requires(postun): jpackage-utils >= 0:1.7.4
Provides:  maven2-plugin-release = %{epoch}:%{version}-%{release}
Obsoletes: maven2-plugin-release < %{epoch}:2.0.5

%description
Maven Release.

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation
Requires(post):   /bin/rm,/bin/ln
Requires(postun): /bin/rm

%description javadoc
%{summary}.

%prep
%setup -q 
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
%patch0 -b .sav0
%patch1 -b .sav1

%build
export JAVA_HOME=%{_jvmdir}/java-1.5.0

export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL

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
pushd maven-release-manager
    mvn-jpp \
        -e \
        -s $M2_SETTINGS \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        javadoc:javadoc
popd
pushd maven-release-plugin
    mvn-jpp \
        -e \
        -s $M2_SETTINGS \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        javadoc:javadoc
popd
%else
export CLASSPATH=$(build-classpath \
modello/core \
modello/plugin-xml \
modello/plugin-xpp3 \
plexus/classworlds \
plexus/containers-component-api \
plexus/containers-container-default \
plexus/utils \
)

pushd maven-release-manager
java org.codehaus.modello.ModelloCli src/main/mdo/release-descriptor.mdo xpp3-reader src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/release-descriptor.mdo java src/main/java 1.0.0 false
java org.codehaus.modello.ModelloCli src/main/mdo/release-descriptor.mdo xpp3-writer src/main/java 1.0.0 false
popd

export CLASSPATH=$(build-classpath \
cglib-nodep \
classworlds \
jaxen \
jdom \
jmock \
jmock-cglib \
maven2/artifact \
maven2/artifact-manager \
maven2/core \
maven2/model \
maven2/plugin-api \
maven2/plugin-descriptor \
maven2/profile \
maven2/project \
maven2/settings \
maven-scm \
maven-shared/plugin-testing-harness \
maven-wagon/provider-api \
plexus/container-default \
plexus/interactivity-api \
plexus/utils \
)
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
CLASSPATH=$CLASSPATH:src/test/resources
pushd maven-release-manager
   ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
CLASSPATH=$CLASSPATH:$(pwd)/maven-release-manager/target/maven-release-manager-%{manager_version}.jar
pushd maven-release-plugin
mkdir -p target/classes/META-INF/maven/org.apache.maven.plugins/maven-release-plugin
cp pom.xml target/classes/META-INF/maven/org.apache.maven.plugins/maven-release-plugin
cat > target/classes/META-INF/maven/org.apache.maven.plugins/maven-release-plugin/pom.properties <<EOT
version=%{plugin_version}
groupId=org.apache.maven.plugins
artifactId=maven-release-plugin
EOT
   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.release %{name} %{version} JPP/maven-release parent
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.maven-release-parent.pom

install -m 644 %{name}-manager/target/%{name}-manager-%{manager_version}.jar \
               $RPM_BUILD_ROOT%{_javadir}/%{name}/manager-%{manager_version}.jar
%add_to_maven_depmap org.apache.maven.release %{name}-manager %{manager_version} JPP/%{name} manager
install -pm 644 %{name}-manager/pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP.%{name}-manager.pom

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

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


# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/manager
cp -pr %{name}-manager/target/site/apidocs/* \
                    $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/manager
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/plugin
cp -pr %{name}-plugin/target/site/apidocs/* \
                    $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/plugin
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

%clean
rm -rf $RPM_BUILD_ROOT

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
  rm -f %{_javadocdir}/%{name}
fi

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%{_javadir}/%{name}
%{_datadir}/maven2
%{_mavendepmapfragdir}

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

%changelog
* Tue Feb 12 2008 Ralph Apel <r.apel at r-apel.de> 0:4-2jpp
- Obsolete maven2-plugin-release < 0:2.0.5

* Fri Jan 25 2008 Ralph Apel <r.apel at r-apel.de> 0:4-1jpp
- First release


--- NEW FILE: maven-release-jpp-depmap.xml ---
<dependencies>
   <dependency>
      <maven>
         <groupId>javax.servlet</groupId>
         <artifactId>servlet-api</artifactId>
         <version>2.3</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>servlet_2_4_api</artifactId>
         <version>2.4</version>
      </jpp>
   </dependency>

</dependencies>

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/maven-release/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 19:10:09 -0000	1.1
--- sources	28 May 2008 19:10:28 -0000	1.2
***************
*** 0 ****
--- 1,2 ----
+ 29231573468ab171dc74fb5c38926795  maven-release-4.tar.gz
+ 2dabd9a2d596a6798c1edd1c01341285  maven-release-autogenerated-files.tar.gz

--- NEW FILE: maven-release-CommandLineFactoryTest.patch ---
--- maven-release-manager/src/test/java/org/apache/maven/shared/release/exec/CommandLineFactoryTest.java.sav1	2008-01-04 15:54:31.000000000 +0100
+++ maven-release-manager/src/test/java/org/apache/maven/shared/release/exec/CommandLineFactoryTest.java	2008-01-04 15:55:48.000000000 +0100
@@ -46,7 +46,7 @@
         Commandline cl = factory.createCommandLine( "exec" );
 
         assertEquals( "Check executable", "exec", cl.getExecutable() );
-        assertNotNull( "Check environment", cl.getEnvironments() );
-        assertFalse( "Check environment", cl.getEnvironments().length == 0 );
+        assertNotNull( "Check environment", cl.getEnvironmentVariables() );
+        assertFalse( "Check environment", cl.getEnvironmentVariables().length == 0 );
     }
 }

--- NEW FILE: maven-release-ForkedMavenExecutorTest.patch ---
--- maven-release-manager/src/test/java/org/apache/maven/shared/release/exec/ForkedMavenExecutorTest.java.sav0	2007-01-03 07:56:15.000000000 +0100
+++ maven-release-manager/src/test/java/org/apache/maven/shared/release/exec/ForkedMavenExecutorTest.java	2008-01-04 19:17:38.000000000 +0100
@@ -24,7 +24,8 @@
 import org.codehaus.plexus.util.StringInputStream;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.Commandline;
-import org.jmock.cglib.Mock;
+import org.jmock.Mock;
+import org.jmock.cglib.CGLIBCoreMock;
 import org.jmock.core.constraint.IsEqual;
 import org.jmock.core.matcher.InvokeOnceMatcher;
 import org.jmock.core.stub.ReturnStub;
@@ -60,7 +61,7 @@
         Mock commandLineMock = createMockCommandLine( workingDirectory, process );
         expectDefaultArguments( commandLineMock );
 
-        Mock mock = new Mock( CommandLineFactory.class );
+        Mock mock = new Mock( new CGLIBCoreMock( CommandLineFactory.class, "CommandLineFactory" ) );
 
         mock.expects( new InvokeOnceMatcher() ).method( "createCommandLine" ).with( new IsEqual( "mvn" ) ).will(
             new ReturnStub( commandLineMock.proxy() ) );
@@ -86,7 +87,7 @@
         commandLineMock.expects( new InvokeOnceMatcher() ).method( "createArgument" ).will(
             new ReturnStub( createArgumentLineMock( arguments ) ) );
 
-        Mock mock = new Mock( CommandLineFactory.class );
+        Mock mock = new Mock( new CGLIBCoreMock( CommandLineFactory.class, "CommandLineFactory" ) );
 
         mock.expects( new InvokeOnceMatcher() ).method( "createCommandLine" ).with( new IsEqual( "mvn" ) ).will(
             new ReturnStub( commandLineMock.proxy() ) );
@@ -113,7 +114,7 @@
 
         expectDefaultArguments( commandLineMock );
 
-        Mock mock = new Mock( CommandLineFactory.class );
+        Mock mock = new Mock( new CGLIBCoreMock( CommandLineFactory.class, "CommandLineFactory" ) );
 
         mock.expects( new InvokeOnceMatcher() ).method( "createCommandLine" ).with( new IsEqual( "mvn" ) ).will(
             new ReturnStub( commandLineMock.proxy() ) );
@@ -136,7 +137,7 @@
 
         expectDefaultArguments( commandLineMock );
 
-        Mock mock = new Mock( CommandLineFactory.class );
+        Mock mock = new Mock( new CGLIBCoreMock( CommandLineFactory.class, "CommandLineFactory" ) );
 
         mock.expects( new InvokeOnceMatcher() ).method( "createCommandLine" ).with( new IsEqual( "mvn" ) ).will(
             new ReturnStub( commandLineMock.proxy() ) );
@@ -160,7 +161,7 @@
     {
         File workingDirectory = getTestFile( "target/working-directory" );
 
-        Mock commandLineMock = new Mock( Commandline.class );
+        Mock commandLineMock = new Mock( new CGLIBCoreMock( Commandline.class, "Commandline" ) );
         commandLineMock.expects( new InvokeOnceMatcher() ).method( "setWorkingDirectory" ).with(
             new IsEqual( workingDirectory.getAbsolutePath() ) );
         commandLineMock.expects( new InvokeOnceMatcher() ).method( "addEnvironment" ).with(
@@ -170,7 +171,7 @@
 
         expectDefaultArguments( commandLineMock );
 
-        Mock mock = new Mock( CommandLineFactory.class );
+        Mock mock = new Mock( new CGLIBCoreMock( CommandLineFactory.class, "CommandLineFactory" ) );
 
         mock.expects( new InvokeOnceMatcher() ).method( "createCommandLine" ).with( new IsEqual( "mvn" ) ).will(
             new ReturnStub( commandLineMock.proxy() ) );
@@ -201,7 +202,7 @@
 
     private static Mock createMockCommandLine( File workingDirectory, Process process )
     {
-        Mock commandLineMock = new Mock( Commandline.class );
+        Mock commandLineMock = new Mock( new CGLIBCoreMock( Commandline.class, "Commandline" ) );
         commandLineMock.expects( new InvokeOnceMatcher() ).method( "setWorkingDirectory" ).with(
             new IsEqual( workingDirectory.getAbsolutePath() ) );
         commandLineMock.expects( new InvokeOnceMatcher() ).method( "addEnvironment" ).with(
@@ -213,21 +214,21 @@
 
     private static Commandline.Argument createArgumentValueMock( String value )
     {
-        Mock mock = new Mock( Commandline.Argument.class );
+        Mock mock = new Mock( new CGLIBCoreMock( Commandline.Argument.class, "Commandline.Argument" ) );
         mock.expects( new InvokeOnceMatcher() ).method( "setValue" ).with( new IsEqual( value ) );
         return (Commandline.Argument) mock.proxy();
     }
 
     private static Commandline.Argument createArgumentLineMock( String value )
     {
-        Mock mock = new Mock( Commandline.Argument.class );
+        Mock mock = new Mock( new CGLIBCoreMock( Commandline.Argument.class, "Commandline.Argument" ) );
         mock.expects( new InvokeOnceMatcher() ).method( "setLine" ).with( new IsEqual( value ) );
         return (Commandline.Argument) mock.proxy();
     }
 
     private static Process createMockProcess( int exitCode )
     {
-        Mock mockProcess = new Mock( Process.class );
+        Mock mockProcess = new Mock( new CGLIBCoreMock( Process.class, "Process" ) );
         mockProcess.expects( new InvokeOnceMatcher() ).method( "getInputStream" ).will(
             new ReturnStub( new StringInputStream( "" ) ) );
         mockProcess.expects( new InvokeOnceMatcher() ).method( "getErrorStream" ).will(




More information about the JPackage-commits mailing list