[Jpackage-commits] rpms/free/mina0 mina-0.8.0.pom, NONE, 1.1.2.1 mina0-0.8.0-echoserver_AcceptorTest.patch, NONE, 1.1.2.1 mina0-0.8.0-echoserver_ConnectorTest.patch, NONE, 1.1.2.1 mina0-0.8.0-echoserver_Main.patch, NONE, 1.1.2.1 mina0-0.8.0-httpserver_Main.patch, NONE, 1.1.2.1 mina0-0.8.0-jpp-depmap.xml, NONE, 1.1.2.1 mina0-0.8.0-maven_xml.patch, NONE, 1.1.2.1 mina0-0.8.0-project_xml.patch, NONE, 1.1.2.1 mina0.spec, NONE, 1.1.2.1 pom-maven2jpp-depcat.xsl, NONE, 1.1.2.1 pom-maven2jpp-mapdeps.xsl, NONE, 1.1.2.1 pom-maven2jpp-newdepmap.xsl, NONE, 1.1.2.1

jpackage jpackage at ryu.zarb.org
Sat Feb 7 15:28:46 CET 2009


Update of /home/projects/jpackage/cvs/rpms/free/mina0
In directory ryu.zarb.org:/tmp/vEPT4ixhue/rpms/free/mina0

Added Files:
      Tag: JPACKAGE-5_0
	mina-0.8.0.pom mina0-0.8.0-echoserver_AcceptorTest.patch 
	mina0-0.8.0-echoserver_ConnectorTest.patch 
	mina0-0.8.0-echoserver_Main.patch 
	mina0-0.8.0-httpserver_Main.patch mina0-0.8.0-jpp-depmap.xml 
	mina0-0.8.0-maven_xml.patch mina0-0.8.0-project_xml.patch 
	mina0.spec pom-maven2jpp-depcat.xsl pom-maven2jpp-mapdeps.xsl 
	pom-maven2jpp-newdepmap.xsl 
Log Message:
0.8.0-3.jpp5

--- NEW FILE: pom-maven2jpp-depcat.xsl ---
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="*[name() != 'dependencies']|*/text()">
     <xsl:apply-templates/>
 </xsl:template>
 <xsl:template match="//dependencies">
  <xsl:for-each select="./dependency">
   <xsl:element name="dependency">
    <xsl:element name="maven">
     <xsl:choose>
      <xsl:when test="./groupId">
       <xsl:copy-of select="./groupId"/>
       <xsl:copy-of select="./artifactId"/>
      </xsl:when>
      <xsl:when test="./id">
       <xsl:choose>
        <xsl:when test="substring-before(./id/text(),':') != ''">
         <xsl:element name="groupId">
          <xsl:value-of select="substring-before(./id/text(),':')"/>
         </xsl:element>
         <xsl:element name="artifactId">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:element>
        </xsl:when>
        <xsl:otherwise>
         <xsl:element name="groupId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
         <xsl:element name="artifactId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
ERROR
      </xsl:otherwise>
     </xsl:choose>
     <xsl:for-each select="./*">
      <xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
       <xsl:copy-of select="."/>
      </xsl:if>
     </xsl:for-each>
    </xsl:element>
    <xsl:element name="jpp">
     <xsl:element name="groupId">JPP</xsl:element>
     <xsl:choose>
      <xsl:when test="./artifactId">
       <xsl:copy-of select="./artifactId"/>
      </xsl:when>
      <xsl:when test="./id">
       <xsl:choose>
        <xsl:when test="substring-after(./id/text(),':') != ''">
         <xsl:element name="artifactId">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:element>
        </xsl:when>
        <xsl:otherwise>
         <xsl:element name="artifactId">
          <xsl:value-of select="./id/text()"/>
         </xsl:element>
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
ERROR
      </xsl:otherwise>
     </xsl:choose>
     <xsl:element name="jar">
      <xsl:choose>
       <xsl:when test="./artifactId">
        <xsl:value-of select="./artifactId/text()"/>
       </xsl:when>
       <xsl:when test="./id">
        <xsl:choose>
         <xsl:when test="substring-after(./id/text(),':') != ''">
          <xsl:value-of select="substring-after(./id/text(),':')"/>
         </xsl:when>
         <xsl:otherwise>
          <xsl:value-of select="./id/text()"/>
         </xsl:otherwise>
        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
ERROR
       </xsl:otherwise>
      </xsl:choose>
      <xsl:choose>
       <xsl:when test="./type">
        <xsl:choose>
         <xsl:when test="./type/text() = 'plugin'">.jar</xsl:when>
         <xsl:otherwise>.<xsl:value-of select="./type/text()"/></xsl:otherwise>
        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>.jar</xsl:otherwise>
      </xsl:choose>
     </xsl:element>
     <xsl:for-each select="./*">
      <xsl:if test="(name() != 'groupId') and (name() != 'artifactId') and (name() != 'id')">
       <xsl:copy-of select="."/>
      </xsl:if>
     </xsl:for-each>
    </xsl:element>
   </xsl:element>
  </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>

--- NEW FILE: mina0-0.8.0-project_xml.patch ---
--- project.xml.sav	2005-10-21 08:59:15.000000000 +0200
+++ project.xml	2007-07-18 14:48:24.000000000 +0200
@@ -92,6 +92,12 @@
 
     <dependency>
       <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>1.0-beta9</version>
+      <url>http://www.slf4j.org/</url>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
       <version>1.0-beta9</version>
       <url>http://www.slf4j.org/</url>
@@ -162,7 +168,6 @@
       </excludes>
     </unitTest>
 
-    <jars/>
 
     <resources>
       <resource>
@@ -182,7 +187,6 @@
     <report>maven-junit-report-plugin</report>
     <report>maven-emma-plugin</report>
     <report>maven-jdepend-plugin</report>
-    <report>maven-simian-plugin</report>
     <report>maven-tasklist-plugin</report>
     <report>maven-faq-plugin</report>
   </reports>

--- NEW FILE: mina0-0.8.0-echoserver_AcceptorTest.patch ---
--- src/test/org/apache/mina/examples/echoserver/AcceptorTest.java.sav	2006-02-12 16:27:59.000000000 +0100
+++ src/test/org/apache/mina/examples/echoserver/AcceptorTest.java	2006-02-12 16:31:15.000000000 +0100
@@ -35,7 +35,7 @@
 import org.apache.mina.examples.echoserver.ssl.SSLServerSocketFactory;
 import org.apache.mina.examples.echoserver.ssl.SSLSocketFactory;
 import org.apache.mina.io.IoAcceptor;
-import org.apache.mina.io.filter.SSLFilter;
+// import org.apache.mina.io.filter.SSLFilter;
 
 /**
  * Tests echo server example.
@@ -55,64 +55,64 @@
         testTCP0( client );
     }
 
-    public void testTCPWithSSL() throws Exception
-    {
+//    public void testTCPWithSSL() throws Exception
+//    {
         // Add an SSL filter
-        SSLFilter sslFilter =
-            new SSLFilter( BogusSSLContextFactory.getInstance( true ) );
-        IoAcceptor acceptor = registry.getIoAcceptor( TransportType.SOCKET );
-        acceptor.getFilterChain().addLast( "SSL", sslFilter );
+//        SSLFilter sslFilter =
+//            new SSLFilter( BogusSSLContextFactory.getInstance( true ) );
+//        IoAcceptor acceptor = registry.getIoAcceptor( TransportType.SOCKET );
+//        acceptor.getFilterChain().addLast( "SSL", sslFilter );
         
         // Create a commons-net socket factory
-        SSLSocketFactory.setSslEnabled(true);
-        SSLServerSocketFactory.setSslEnabled(true);
-        org.apache.commons.net.SocketFactory factory = new org.apache.commons.net.SocketFactory() {
-
-            private SocketFactory f = SSLSocketFactory.getSocketFactory();
-            private ServerSocketFactory ssf = SSLServerSocketFactory.getServerSocketFactory();
-
-            public Socket createSocket( String arg0, int arg1 ) throws UnknownHostException, IOException
-            {
-                return f.createSocket(arg0, arg1);
-            }
-
-            public Socket createSocket( InetAddress arg0, int arg1 ) throws IOException
-            {
-                return f.createSocket(arg0, arg1);
-            }
-
-            public Socket createSocket( String arg0, int arg1, InetAddress arg2, int arg3 ) throws UnknownHostException, IOException
-            {
-                return f.createSocket(arg0, arg1, arg2, arg3);
-            }
-
-            public Socket createSocket( InetAddress arg0, int arg1, InetAddress arg2, int arg3 ) throws IOException
-            {
-                return f.createSocket(arg0, arg1, arg2, arg3);
-            }
-
-            public ServerSocket createServerSocket( int arg0 ) throws IOException
-            {
-                return ssf.createServerSocket(arg0);
-            }
-
-            public ServerSocket createServerSocket( int arg0, int arg1 ) throws IOException
-            {
-                return ssf.createServerSocket(arg0, arg1);
-            }
-
-            public ServerSocket createServerSocket( int arg0, int arg1, InetAddress arg2 ) throws IOException
-            {
-                return ssf.createServerSocket(arg0, arg1, arg2);
-            }
+//        SSLSocketFactory.setSslEnabled(true);
+//        SSLServerSocketFactory.setSslEnabled(true);
+//        org.apache.commons.net.SocketFactory factory = new org.apache.commons.net.SocketFactory() {
+
+//            private SocketFactory f = SSLSocketFactory.getSocketFactory();
+//            private ServerSocketFactory ssf = SSLServerSocketFactory.getServerSocketFactory();
+
+//            public Socket createSocket( String arg0, int arg1 ) throws UnknownHostException, IOException
+//            {
+//                return f.createSocket(arg0, arg1);
+//            }
+
+//            public Socket createSocket( InetAddress arg0, int arg1 ) throws IOException
+//            {
+//                return f.createSocket(arg0, arg1);
+//            }
+
+//            public Socket createSocket( String arg0, int arg1, InetAddress arg2, int arg3 ) throws UnknownHostException, IOException
+//            {
+//                return f.createSocket(arg0, arg1, arg2, arg3);
+//            }
+
+//            public Socket createSocket( InetAddress arg0, int arg1, InetAddress arg2, int arg3 ) throws IOException
+//            {
+//                return f.createSocket(arg0, arg1, arg2, arg3);
+//            }
+
+//            public ServerSocket createServerSocket( int arg0 ) throws IOException
+//            {
+//                return ssf.createServerSocket(arg0);
+//            }
+
+//            public ServerSocket createServerSocket( int arg0, int arg1 ) throws IOException
+//            {
+//                return ssf.createServerSocket(arg0, arg1);
+//            }
+
+//            public ServerSocket createServerSocket( int arg0, int arg1, InetAddress arg2 ) throws IOException
+//            {
+//                return ssf.createServerSocket(arg0, arg1, arg2);
+//            }
             
-        };
+//        };
         
         // Create a echo client with SSL factory and test it.
-        EchoTCPClient client = new EchoTCPClient();
-        client.setSocketFactory( factory );
-        testTCP0( client );
-    }
+//        EchoTCPClient client = new EchoTCPClient();
+//        client.setSocketFactory( factory );
+//        testTCP0( client );
+//    }
     
     private void testTCP0( EchoTCPClient client ) throws Exception
     {

--- NEW FILE: pom-maven2jpp-newdepmap.xsl ---
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:saxon="http://icl.com/saxon"
	extension-element-prefixes="saxon">
 <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="/" >
  <xsl:element name="depset">
   <saxon:group select="//dependency" group-by="./maven/artifactId">
    <xsl:sort select="./maven/artifactId"/>
    <xsl:element name="dependency">
     <xsl:element name="maven">
      <xsl:copy-of select="./maven/*[name() != 'properties']"/>
     </xsl:element>
     <xsl:element name="jpp">
      <xsl:copy-of select="./jpp/*[name() != 'properties']"/>
     </xsl:element>
    </xsl:element>
    <saxon:item/>
   </saxon:group>
  </xsl:element>
 </xsl:template>
</xsl:stylesheet>

--- NEW FILE: mina-0.8.0.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>directory-network</groupId>
  <artifactId>mina</artifactId>
  <name>MINA</name>
  <version>0.8.0</version>
  <description>MINA (Multipurpose Infrastructure for Network Applications) is a
    network application framework which helps users develop high
    performance and high scalability network applications easily.</description>
  <url>http://directory.apache.org/</url>
  <issueManagement>
    <url>http://issues.apache.org/jira/</url>
  </issueManagement>
  <ciManagement>
    <notifiers>
      <notifier>
        <configuration>
          <address>dev at directory.apache.org</address>
        </configuration>
      </notifier>
    </notifiers>
  </ciManagement>
  <inceptionYear>2004</inceptionYear>
  <mailingLists>
    <mailingList>
      <name>Apache Directory Developement - use [mina] prefix</name>
      <subscribe>dev-subscribe at directory.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe at directory.apache.org</unsubscribe>
      <archive>http://www.archivum.info/dev@directory.apache.org/</archive>
    </mailingList>
  </mailingLists>
  <developers>
    <developer>
      <id>trustin</id>
      <name>Trustin Lee</name>
      <email>trustin at gmail.com</email>
      <url>http://gleamynode.net/</url>
      <organization>Solarsis LLC</organization>
      <timezone>+9</timezone>
    </developer>
  </developers>
  <contributors>
    <contributor>
      <name>Jan Andersson</name>
      <email></email>
      <url></url>
      <organization></organization>
      <timezone></timezone>
    </contributor>
    <contributor>
      <name>Vinod Panicker</name>
      <email></email>
      <url></url>
      <organization></organization>
      <timezone></timezone>
    </contributor>
  </contributors>
  <licenses>
    <license>
      <name>Apache 2.0 License</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <comments></comments>
    </license>
  </licenses>
  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/directory:network/branches/0.8</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/directory:network/branches/0.8</developerConnection>
    <url>http://svn.apache.org/viewcvs.cgi/directory/network/branches/0.8/?root=Apache-SVN</url>
  </scm>
  <build>
    <sourceDirectory>D:\My Documents\workspaces\directory\network\tags\release-0.8.0/src/java</sourceDirectory>
    <testSourceDirectory>D:\My Documents\workspaces\directory\network\tags\release-0.8.0/src/test</testSourceDirectory>
    <resources>
      <resource>
        <targetPath></targetPath>
        <directory>D:\My Documents\workspaces\directory\network\tags\release-0.8.0/src/examples</directory>
        <includes>
          <include>**/*.cert</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/*Test*</include>
            <include>**/*TestCase*</include>
          </includes>
          <excludes>
            <exclude>**/Abstract*</exclude>
            <exclude>**/datagram/BindTest*</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>emma</groupId>
        <artifactId>maven-emma-plugin</artifactId>
        <version>0.4</version>
        <configuration />
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.0-beta9</version>
    </dependency>
    <dependency>
      <groupId>commons-net</groupId>
      <artifactId>commons-net</artifactId>
      <version>1.3.0</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
    </dependency>
    <dependency>
      <groupId>emma</groupId>
      <artifactId>emma</artifactId>
      <version>2.0.5312</version>
    </dependency>
  </dependencies>
  <distributionManagement>
    <repository>
      <id>default</id>
      <name>Default Repository</name>
      <url>file:///www/cvs.apache.org/dist/directory</url>
    </repository>
    <site>
      <id>default</id>
      <name>Default Site</name>
      <url>scp://minotaur.apache.org//www/directory.apache.org/subprojects/network/branches/0.8</url>
    </site>
  </distributionManagement>
</project>
--- NEW FILE: mina0-0.8.0-maven_xml.patch ---
--- maven.xml.sav	2005-10-19 18:45:35.000000000 +0200
+++ maven.xml	2006-02-01 11:48:50.000000000 +0100
@@ -31,8 +31,14 @@
       </ant:fileset>
     </ant:copy>
     <ant:javadoc
+      packagenames="org.apache.mina.*"
+      sourcepath="${basedir}/src/java"
+      classpath="${basedir}/.maven/repository/JPP/jars/slf4j/simple.jar:target/classes"
+      destdir="${maven.docs.dest}/apidocs" />
+    <ant:javadoc
       packagenames="org.apache.mina.examples.*"
       sourcepath="${basedir}/src/examples"
+      classpath="${basedir}/.maven/repository/JPP/jars/slf4j/simple.jar:target/classes"
       destdir="${maven.docs.dest}/apidocs-examples" />
   </postGoal>
   <postGoal name="maven-jxr-plugin:register">

--- NEW FILE: mina0.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 bname           mina
%define section         free

Summary:        A Multipurpose Infrastrusture for Network Applications
Name:           mina0
Version:        0.8.0
Release:        3%{dist}
Epoch:          0
Group:          System/Networking
License:        Apache 2.0 License
URL:            http://directory.apache.org/subprojects/network/mina/
BuildArch:      noarch
Source0:        %{bname}-%{version}-src.tar.gz
# svn export -r 359572 https://svn.apache.org/repos/asf/directory/network/tags/release-0.8.0 release-0.8.0
Source1:        pom-maven2jpp-depcat.xsl
Source2:        pom-maven2jpp-newdepmap.xsl
Source3:        pom-maven2jpp-mapdeps.xsl
Source4:        %{name}-%{version}-jpp-depmap.xml
Source5:        http://repo1.maven.org/maven2/directory-network/mina/0.8.0/mina-0.8.0.pom
Patch0:         %{name}-%{version}-project_xml.patch
Patch1:         %{name}-%{version}-maven_xml.patch

Patch2:         %{name}-%{version}-echoserver_Main.patch
Patch3:         %{name}-%{version}-httpserver_Main.patch
Patch4:         %{name}-%{version}-echoserver_AcceptorTest.patch
Patch5:         %{name}-%{version}-echoserver_ConnectorTest.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  junit
BuildRequires:  emma
BuildRequires:  emma-maven-plugin
BuildRequires:  maven => 0:1.1
BuildRequires:  maven-plugins-base
BuildRequires:  maven-plugin-changes
BuildRequires:  maven-plugin-faq
BuildRequires:  maven-plugin-jdepend
BuildRequires:  maven-plugin-jxr
BuildRequires:  maven-plugin-license
BuildRequires:  maven-plugin-tasklist
BuildRequires:  maven-plugin-test
BuildRequires:  maven-plugin-xdoc
BuildRequires:  saxon
BuildRequires:  saxon-scripts
BuildRequires:  jakarta-commons-net
BuildRequires:  slf4j >= 0:1.4.2
Requires:       java >= 0:1.5.0
Requires:       slf4j >= 0:1.4.2

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

%description
MINA (Multipurpose Infrastructure for Network Applications) is a
network application framework which helps users develop high
performance and high scalability network applications easily.

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

%description javadoc
%{summary}.

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

%description manual
%{summary}.

%prep
%setup -q -n %{bname}-%{version}

#for f in $(find src -name "*.java" -exec grep -l SSLEngine {} \;); do
#    mv $f $f.no
#done

%patch0 -b .sav0
%patch1 -b .sav1

%patch2 -b .sav2
%patch3 -b .sav3
%patch4 -b .sav4
%patch5 -b .sav5

%build
export DEPCAT=$(pwd)/%{name}-%{version}-depcat.new.xml
echo '<?xml version="1.0" standalone="yes"?>' > $DEPCAT
echo '<depset>' >> $DEPCAT
for p in $(find . -name project.xml); do
    pushd $(dirname $p)
    /usr/bin/saxon project.xml %{SOURCE1} >> $DEPCAT
    popd
done
echo >> $DEPCAT
echo '</depset>' >> $DEPCAT
/usr/bin/saxon $DEPCAT %{SOURCE2} > %{name}-%{version}-depmap.new.xml
for p in $(find . -name project.xml); do
    pushd $(dirname $p)
    cp project.xml project.xml.orig
    /usr/bin/saxon -o project.xml project.xml.orig %{SOURCE3} map=%{SOURCE4}
    popd
done

mkdir .maven
maven \
    -Dmaven.repo.remote=file:/usr/share/maven/repository \
    -Dmaven.home.local=$(pwd)/.maven \
    jar:jar javadoc:generate xdoc:transform

%install
rm -rf $RPM_BUILD_ROOT

# jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}

uvjar=$(echo %{name}-%{version}.jar | sed s+-%{version}++g)
install -m 644 target/%{bname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
   ln -fs %{name}-%{version}.jar $uvjar
popd

install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap directory-network %{bname} %{version} JPP %{name}

# javadoc
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/examples
cp -pr target/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/
cp -pr target/docs/apidocs-examples/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/examples
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
rm -rf target/docs/apidocs*

# manual
install -d -m 0755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr target/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
cp -p LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(0644,root,root,0755)
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
%{_javadir}/*
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*

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

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

%changelog
* Fri Feb 06 2009 Ralph Apel <r.apel at r-apel.de> 0:0.8.0-3.jpp5
- Rename to mina0
- Activate ssl support

* Wed Jul 18 2007 Ralph Apel <r.apel at r-apel.de> 0:0.8.0-2jpp
- Patch to current slf4j

* Sun Feb 12 2006 Ralph Apel <r.apel at r-apel.de> 0:0.8.0-1jpp
- First JPackage release.

--- NEW FILE: mina0-0.8.0-echoserver_Main.patch ---
--- src/examples/org/apache/mina/examples/echoserver/Main.java.sav	2006-02-12 16:17:46.000000000 +0100
+++ src/examples/org/apache/mina/examples/echoserver/Main.java	2006-02-12 16:18:39.000000000 +0100
@@ -22,7 +22,7 @@
 import org.apache.mina.examples.echoserver.ssl.BogusSSLContextFactory;
 import org.apache.mina.io.IoAcceptor;
 import org.apache.mina.io.filter.IoLoggingFilter;
-import org.apache.mina.io.filter.SSLFilter;
+//import org.apache.mina.io.filter.SSLFilter;
 import org.apache.mina.registry.Service;
 import org.apache.mina.registry.ServiceRegistry;
 import org.apache.mina.registry.SimpleServiceRegistry;
@@ -39,17 +39,17 @@
     private static final int PORT = 8080;
     
     /** Set this to true if you want to make the server SSL */
-    private static final boolean USE_SSL = false;
+//    private static final boolean USE_SSL = false;
 
     public static void main( String[] args ) throws Exception
     {
         ServiceRegistry registry = new SimpleServiceRegistry();
         
         // Add SSL filter if SSL is enabled.
-        if( USE_SSL )
-        {
-            addSSLSupport( registry );
-        }
+//        if( USE_SSL )
+//        {
+//            addSSLSupport( registry );
+//        }
         
         addLogger( registry );
         
@@ -60,15 +60,15 @@
         System.out.println( "Listening on port " + PORT );
     }
 
-    private static void addSSLSupport( ServiceRegistry registry )
-        throws Exception
-    {
-        SSLFilter sslFilter =
-            new SSLFilter( BogusSSLContextFactory.getInstance( true ) );
-        IoAcceptor acceptor = registry.getIoAcceptor( TransportType.SOCKET );
-        acceptor.getFilterChain().addLast( "sslFilter", sslFilter );
-        System.out.println( "SSL ON" );
-    }
+//    private static void addSSLSupport( ServiceRegistry registry )
+//        throws Exception
+//    {
+//        SSLFilter sslFilter =
+//            new SSLFilter( BogusSSLContextFactory.getInstance( true ) );
+//        IoAcceptor acceptor = registry.getIoAcceptor( TransportType.SOCKET );
+//        acceptor.getFilterChain().addLast( "sslFilter", sslFilter );
+//        System.out.println( "SSL ON" );
+//    }
     
     private static void addLogger( ServiceRegistry registry )
     {

--- NEW FILE: mina0-0.8.0-echoserver_ConnectorTest.patch ---
--- src/test/org/apache/mina/examples/echoserver/ConnectorTest.java.sav	2006-02-12 16:27:41.000000000 +0100
+++ src/test/org/apache/mina/examples/echoserver/ConnectorTest.java	2006-02-12 16:32:17.000000000 +0100
@@ -32,7 +32,7 @@
 import org.apache.mina.io.IoHandlerAdapter;
 import org.apache.mina.io.IoSession;
 import org.apache.mina.io.datagram.DatagramConnector;
-import org.apache.mina.io.filter.SSLFilter;
+// import org.apache.mina.io.filter.SSLFilter;
 import org.apache.mina.io.socket.SocketConnector;
 import org.apache.mina.util.AvailablePortFinder;
 
@@ -67,25 +67,25 @@
     /**
      * Client-side SSL doesn't work for now.
      */
-    public void testTCPWithSSL() throws Exception
-    {
-        // Add an SSL filter to acceptor
-        SSLFilter acceptorSSLFilter =
-            new SSLFilter( BogusSSLContextFactory.getInstance( true ) );
-        IoAcceptor acceptor = registry.getIoAcceptor( TransportType.SOCKET );
-        acceptor.getFilterChain().addLast( "SSL", acceptorSSLFilter );
+//    public void testTCPWithSSL() throws Exception
+//    {
+//        // Add an SSL filter to acceptor
+//        SSLFilter acceptorSSLFilter =
+//            new SSLFilter( BogusSSLContextFactory.getInstance( true ) );
+//        IoAcceptor acceptor = registry.getIoAcceptor( TransportType.SOCKET );
+//        acceptor.getFilterChain().addLast( "SSL", acceptorSSLFilter );
 
         // Create a connector
-        IoConnector connector = new SocketConnector();
+//        IoConnector connector = new SocketConnector();
         
         // Add an SSL filter to connector
-        SSLFilter connectorSSLFilter =
-            new SSLFilter( BogusSSLContextFactory.getInstance( false ) );
-        connectorSSLFilter.setUseClientMode( true ); // set client mode
-        connector.getFilterChain().addLast( "SSL", connectorSSLFilter );
+//        SSLFilter connectorSSLFilter =
+//            new SSLFilter( BogusSSLContextFactory.getInstance( false ) );
+//        connectorSSLFilter.setUseClientMode( true ); // set client mode
+//        connector.getFilterChain().addLast( "SSL", connectorSSLFilter );
 
-        testConnector( connector );
-    }
+//        testConnector( connector );
+//    }
     
     public void testUDP() throws Exception
     {

--- NEW FILE: pom-maven2jpp-mapdeps.xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:param name="map" /> 
 <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> 
 <xsl:strip-space elements="*"/> 
 <xsl:template match="/project" >
  <xsl:element name="project">
   <xsl:copy-of select="child::*[not(self::dependencies)]"/>
   <xsl:if test="not(./dependencies)">
    <xsl:element name="dependencies">
     <xsl:for-each select="document($map)//add/dependency">
       <xsl:copy-of select="."/>
     </xsl:for-each>
    </xsl:element>
   </xsl:if>
   <xsl:apply-templates select="dependencies"/>
  </xsl:element>
 </xsl:template>
 <xsl:template match="dependencies" >
  <xsl:element name="dependencies">
   <xsl:for-each select="dependency">
    <xsl:if test="./artifactId">
     <xsl:call-template name="replace">
      <xsl:with-param name="artifact" select="./artifactId/text()"/>
     </xsl:call-template>
    </xsl:if>
    <xsl:if test="./id">
     <xsl:choose>
      <xsl:when test="substring-after(./id/text(),':') != ''">
       <xsl:call-template name="replace">
        <xsl:with-param name="artifact" select="substring-after(./id/text(),':')"/>
       </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
       <xsl:call-template name="replace">
        <xsl:with-param name="artifact" select="./id/text()"/>
       </xsl:call-template>
      </xsl:otherwise>
     </xsl:choose>
    </xsl:if>
   </xsl:for-each>
   <xsl:for-each select="document($map)//add/dependency">
    <xsl:copy-of select="."/>
   </xsl:for-each>
  </xsl:element>
 </xsl:template>
 <xsl:template name="replace">
  <xsl:param name="artifact"/>
  <xsl:variable name="this" select="."/>
  <xsl:element name="dependency">
   <xsl:choose>
    <xsl:when test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
     <xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
      <xsl:copy-of select="../jpp/*"/>
      <xsl:copy-of select="$this/properties"/>
     </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
     <xsl:copy-of select="./*"/>
    </xsl:otherwise>
   </xsl:choose>
  </xsl:element>
  <xsl:if test="document($map)//dependency/maven[./artifactId/text() = $artifact]">
   <xsl:for-each select="document($map)//dependency/maven[./artifactId/text() = $artifact][1]">
    <xsl:for-each select="../add/dependency">
     <xsl:element name="dependency">
      <xsl:copy-of select="./*"/>
      <xsl:copy-of select="$this/properties"/>
     </xsl:element>
    </xsl:for-each>
   </xsl:for-each>
  </xsl:if>
 </xsl:template>
</xsl:stylesheet>

--- NEW FILE: mina0-0.8.0-jpp-depmap.xml ---
<?xml version="1.0" encoding="utf-8"?>
<depset>
   <dependency>
      <maven>
         <groupId>commons-net</groupId>
         <artifactId>commons-net</artifactId>
         <version>1.3.0</version>
         <url>http://jakarta.apache.org/commons/net/</url>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-net</artifactId>
         <jar>commons-net.jar</jar>
         <version>1.3.0</version>
         <url>http://jakarta.apache.org/commons/net/</url>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>emma</groupId>
         <artifactId>emma</artifactId>
         <version>2.0.latest</version>
         <url>http://emma.sourceforge.net/</url>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>emma</artifactId>
         <jar>emma.jar</jar>
         <version>2.0.latest</version>
         <url>http://emma.sourceforge.net/</url>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
         <url>http://junit.org/</url>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>junit</artifactId>
         <jar>junit.jar</jar>
         <version>3.8.1</version>
         <url>http://junit.org/</url>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>emma</groupId>
         <artifactId>maven-emma-plugin</artifactId>
         <version>0.4</version>
         <url>http://emma.sourceforge.net/</url>
         <type>plugin</type>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>maven-emma-plugin</artifactId>
         <jar>maven-emma-plugin.jar</jar>
         <version>0.4</version>
         <url>http://emma.sourceforge.net/</url>
         <type>plugin</type>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <version>1.0-beta9</version>
         <url>http://www.slf4j.org/</url>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>slf4j-api</artifactId>
         <jar>slf4j/api.jar</jar>
         <version>1.0-beta9</version>
         <url>http://www.slf4j.org/</url>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <version>1.0-beta9</version>
         <url>http://www.slf4j.org/</url>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>slf4j-simple</artifactId>
         <jar>slf4j/simple.jar</jar>
         <version>1.0-beta9</version>
         <url>http://www.slf4j.org/</url>
      </jpp>
   </dependency>
</depset>

--- NEW FILE: mina0-0.8.0-httpserver_Main.patch ---
--- src/examples/org/apache/mina/examples/httpserver/Main.java.sav	2006-02-12 16:22:47.000000000 +0100
+++ src/examples/org/apache/mina/examples/httpserver/Main.java	2006-02-12 16:23:41.000000000 +0100
@@ -21,7 +21,7 @@
 import org.apache.mina.common.TransportType;
 import org.apache.mina.examples.echoserver.ssl.BogusSSLContextFactory;
 import org.apache.mina.io.IoAcceptor;
-import org.apache.mina.io.filter.SSLFilter;
+// import org.apache.mina.io.filter.SSLFilter;
 import org.apache.mina.registry.Service;
 import org.apache.mina.registry.ServiceRegistry;
 import org.apache.mina.registry.SimpleServiceRegistry;
@@ -37,17 +37,17 @@
     /** Choose your favorite port number. */
     private static final int PORT = 8081;
     
-    private static final boolean USE_SSL = true;
+//     private static final boolean USE_SSL = true;
 
     public static void main( String[] args ) throws Exception
     {
         ServiceRegistry registry = new SimpleServiceRegistry();
         
         // Add SSL filter if SSL is enabled.
-        if( USE_SSL )
-        {
-            addSSLSupport( registry );
-        }
+//         if( USE_SSL )
+//         {
+//             addSSLSupport( registry );
+//         }
 
         // Bind
         Service service = new Service( "http", TransportType.SOCKET, PORT );
@@ -57,13 +57,13 @@
     }
 
 
-    private static void addSSLSupport( ServiceRegistry registry )
-        throws Exception
-    {
-        System.out.println( "SSL is enabled." );
-        SSLFilter sslFilter =
-            new SSLFilter( BogusSSLContextFactory.getInstance( true ) );
-        IoAcceptor acceptor = registry.getIoAcceptor( TransportType.SOCKET );
-        acceptor.getFilterChain().addLast( "sslFilter", sslFilter );
-    }
+//     private static void addSSLSupport( ServiceRegistry registry )
+//         throws Exception
+//     {
+//         System.out.println( "SSL is enabled." );
+//         SSLFilter sslFilter =
+//             new SSLFilter( BogusSSLContextFactory.getInstance( true ) );
+//         IoAcceptor acceptor = registry.getIoAcceptor( TransportType.SOCKET );
+//         acceptor.getFilterChain().addLast( "sslFilter", sslFilter );
+//     }
 }




More information about the JPackage-commits mailing list