[Jpackage-commits] rpms/free/apache-mime4j apache-mime4j-TestHandler.patch, NONE, 1.1 apache-mime4j-jpp-depmap.xml, NONE, 1.1 apache-mime4j-pom.patch, NONE, 1.1 apache-mime4j-settings.xml, NONE, 1.1 apache-mime4j.spec, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Tue Dec 14 08:28:17 CET 2010


Update of /home/projects/jpackage/cvs/rpms/free/apache-mime4j
In directory ryu.zarb.org:/tmp/sxKzfqkk4U/rpms/free/apache-mime4j

Added Files:
	apache-mime4j-TestHandler.patch apache-mime4j-jpp-depmap.xml 
	apache-mime4j-pom.patch apache-mime4j-settings.xml 
	apache-mime4j.spec 
Log Message:
0.6-2.jpp6

--- NEW FILE: apache-mime4j-TestHandler.patch ---
--- src/test/java/org/apache/james/mime4j/parser/TestHandler.java.sav	2010-10-16 10:40:30.000000000 +0200
+++ src/test/java/org/apache/james/mime4j/parser/TestHandler.java	2010-10-16 10:40:44.000000000 +0200
@@ -29,7 +29,7 @@
 /**
  * Helper class to run comparison of parsed results
  */
-class TestHandler implements ContentHandler {
+public class TestHandler implements ContentHandler {
     StringBuilder sb = new StringBuilder();
 
     private String escape(char c) {
@@ -109,4 +109,4 @@
     public void raw(InputStream is) throws IOException {
         MimeStreamParserExampleMessagesTest.fail("raw should never be called");
     }
-}
\ No newline at end of file
+}

--- NEW FILE: apache-mime4j-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: apache-mime4j-jpp-depmap.xml ---
<dependencies>
   <dependency>
      <maven>
         <groupId>net.java.dev.javacc</groupId>
         <artifactId>javacc</artifactId>
         <version>4.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>javacc</artifactId>
         <version>4.0</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>velocity</groupId>
         <artifactId>velocity</artifactId>
         <version>1.4</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>velocity14</artifactId>
         <version>1.4</version>
      </jpp>
   </dependency>
</dependencies>

--- NEW FILE: apache-mime4j.spec ---
# Copyright (c) 2000-2010, 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:           apache-mime4j
Version:        0.6
Release:        2%{?dist}
Epoch:          0
Summary:        Mime stream parser
Group:          Development/Libraries/Java
License:        BSD
URL:            http://james.apache.org/mime4j
Source0:        http://www.apache.org/dist/james/mime4j/apache-mime4j-0.6-src.tar.gz
Source1:        %{name}-jpp-depmap.xml
Source2:        %{name}-settings.xml
Patch0:         %{name}-pom.patch
Patch1:         %{name}-TestHandler.patch
Requires(post): jpackage-utils >= 0:1.7.3
Requires(postun): jpackage-utils >= 0:1.7.3
Requires:       apache-commons-logging
Requires:       java >= 0:1.6.0
Requires:       jpackage-utils
BuildRequires:  apache-jar-resource-bundle >= 0:1.3
BuildRequires:  james-project >= 0:1.2
BuildRequires:  jpackage-utils >= 0:1.7.3
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  maven2 >= 0:2.0.8
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-remote-resources
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-source
BuildRequires:  maven2-plugin-surefire
BuildRequires:  maven-doxia-sitetools
BuildRequires:  maven-shared-downloader
BuildRequires:  maven-surefire-maven-plugin
BuildRequires:  maven-surefire-provider-junit4
BuildRequires:  mojo-maven2-plugin-javacc
BuildRequires:  felix-maven2
BuildRequires:  apache-commons-parent
BuildRequires:  apache-commons-io
BuildRequires:  apache-commons-logging
BuildRequires:  log4j
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
Apache Mime4j is developed by the Apache James team but now
has a dedicated mailing list.
mime4j provides a parser, MimeStreamParser, for e-mail 
message streams in plain rfc822 and MIME format. The parser 
uses a callback mechanism to report parsing events such as 
the start of an entity header, the start of a body, etc. If 
you are familiar with the SAX XML parser interface you 
should have no problem getting started with mime4j.
The parser only deals with the structure of the message 
stream. It won't do any decoding of base64 or quoted-printable 
encoded header fields and bodies. This is intentional - the 
parser should only provide the most basic functionality needed 
to build more complex parsers. However, mime4j does include 
facilities to decode bodies and fields and the Message class 
described below handles decoding of fields and bodies 
transparently. 

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

%description javadoc
%{summary}.

%prep
%setup -q 
%patch0 -b .sav0
%patch1 -b .sav1

cp -p %{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

%build
export M2SETTINGS=$(pwd)/maven2-settings.xml
export MAVEN_REPO_LOCAL=$(pwd)/m2_repo/repository
%{_bindir}/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
install -dm 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar

install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -p -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap org.apache.james apache-mime4j %{version} JPP %{name}

# javadoc
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

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

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

%changelog
* Tue Dec 14 2010 David Walluck <dwalluck at redhat.com> 0:0.6-2
- build with external apache-jar-resource-bundle-1.3
- build with external james-project-1.2
- remove BuildRequires: junit44

* Sat Oct 16 2010 Ralph Apel <r.apel at r-apel.de> 0.6-1
- first release


--- NEW FILE: apache-mime4j-pom.patch ---
--- pom.xml.sav0	2009-03-02 21:34:07.000000000 +0100
+++ pom.xml	2010-07-12 20:44:25.035876208 +0200
@@ -50,6 +50,7 @@
   </scm>
   <build>
     <plugins>
+    <!--
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>rat-maven-plugin</artifactId>
@@ -63,6 +64,7 @@
           </execution>
         </executions>
       </plugin>
+      -->
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>javacc-maven-plugin</artifactId>
@@ -191,6 +193,7 @@
       		</instructions>
       	</configuration>
       </plugin>
+      <!--
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <version>2.2-beta-2</version>
@@ -200,14 +203,15 @@
         </configuration>
         <executions>
           <execution>
-            <id>make-assembly</id> <!-- this is used for inheritance merges -->
-            <phase>package</phase> <!-- append to the packaging phase. -->
+            <id>make-assembly</id> 
+            <phase>package</phase> 
             <goals>
-              <goal>attached</goal> <!-- goals == mojos -->
+              <goal>attached</goal> 
             </goals>
           </execution>
         </executions>
       </plugin>
+      -->
     </plugins>
   </build>
   <repositories>
@@ -329,17 +333,15 @@
         <artifactId>maven-site-plugin</artifactId>
         <version>2.0-beta-7</version>
       </plugin>
+      <!--
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>rat-maven-plugin</artifactId>
         <version>1.0-alpha-3</version>
         <configuration>
           <excludes>
-            <!-- test resources created by JAMES committers / we can't include ALv2 headers there -->
             <exclude>src/test/resources/testmsgs/*</exclude>
             <exclude>benchmarks/resources/*.msg</exclude>
-            <!-- 3rd party descriptors distributed via maven repositories
-                 and included "as is" -->
             <exclude>stage/commons-io/poms/commons-io-1.2.pom</exclude>
             <exclude>stage/commons-logging/poms/commons-logging-1.1.pom</exclude>
             <exclude>stage/org.apache.james/xmls/james-parent-1.1-site.xml</exclude>
@@ -350,6 +352,7 @@
           </excludes>
         </configuration>
       </plugin>
+      -->
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>taglist-maven-plugin</artifactId>




More information about the JPackage-commits mailing list