[Jpackage-commits] dist/htmlunit2/devel .cvsignore, 1.1, 1.2 htmlunit2-apache-james.patch, NONE, 1.1 htmlunit2-attributes.patch, NONE, 1.1 htmlunit2-compile.patch, NONE, 1.1 htmlunit2-jpp-depmap.xml, NONE, 1.1 htmlunit2-no-test.patch, NONE, 1.1 htmlunit2-settings.xml, NONE, 1.1 htmlunit2.spec, NONE, 1.1 sources, 1.1, 1.2

David Walluck david at ryu.zarb.org
Sat Dec 11 05:44:16 CET 2010


Update of /home/projects/jpackage/cvs/dist/htmlunit2/devel
In directory ryu.zarb.org:/tmp/cvs-serv25820/devel

Modified Files:
	.cvsignore sources 
Added Files:
	htmlunit2-apache-james.patch htmlunit2-attributes.patch 
	htmlunit2-compile.patch htmlunit2-jpp-depmap.xml 
	htmlunit2-no-test.patch htmlunit2-settings.xml htmlunit2.spec 
Log Message:
- initial import

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/htmlunit2/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	11 Dec 2010 04:34:00 -0000	1.1
--- .cvsignore	11 Dec 2010 04:44:14 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ htmlunit2-2.8.tar.bz2

--- NEW FILE: htmlunit2-compile.patch ---
--- src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java.sav3	2010-08-05 04:17:55.000000000 -0400
+++ src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java	2010-12-10 21:40:47.874512232 -0500
@@ -336,9 +336,9 @@
             final java.lang.reflect.Field field = MultipartEntity.class.getDeclaredField("multipart");
             field.setAccessible(true);
             final HttpMultipart multipart = (HttpMultipart) field.get(multipartEntity);
-            final BodyPart lastOne = multipart.getBodyParts().get(multipart.getBodyParts().size() - 1);
-            final org.apache.james.mime4j.message.Header header = lastOne.getHeader();
-            final Field cntDispHeader = header.getField(MIME.CONTENT_DISPOSITION);
+            final org.apache.http.entity.mime.FormBodyPart lastOne = multipart.getBodyParts().get(multipart.getBodyParts().size() - 1);
+            final org.apache.http.entity.mime.Header header = lastOne.getHeader();
+            final org.apache.http.entity.mime.MinimalField cntDispHeader = header.getField(MIME.CONTENT_DISPOSITION);
             header.removeFields(MIME.CONTENT_DISPOSITION);
             final Field newCntDispHeader = new Field() {
                 public String getBody() {
@@ -351,7 +351,7 @@
                     throw new RuntimeException("No in the hack");
                 }
             };
-            header.addField(newCntDispHeader);
+            header.addField((org.apache.http.entity.mime.MinimalField) newCntDispHeader);
         }
         catch (final Exception e) {
             throw new RuntimeException("Hack to fix Content-Type submission failed", e);

--- NEW FILE: htmlunit2-attributes.patch ---
--- src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLImageElement.java.orig	2010-05-20 07:31:17.000000000 -0400
+++ src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLImageElement.java	2010-12-10 19:44:11.863487411 -0500
@@ -18,7 +18,7 @@
 
 import net.sourceforge.htmlunit.corejs.javascript.Context;
 
-import org.apache.xalan.xsltc.runtime.AttributeList;
+import org.xml.sax.helpers.AttributesImpl;
 
 import com.gargoylesoftware.htmlunit.Page;
 import com.gargoylesoftware.htmlunit.SgmlPage;
@@ -59,7 +59,7 @@
         instantiatedViaJavaScript_ = true;
         final SgmlPage page = (SgmlPage) getWindow().getWebWindow().getEnclosedPage();
         final HtmlElement fake =
-                HTMLParser.getFactory(HtmlImage.TAG_NAME).createElement(page, HtmlImage.TAG_NAME, new AttributeList());
+                HTMLParser.getFactory(HtmlImage.TAG_NAME).createElement(page, HtmlImage.TAG_NAME, new AttributesImpl());
         setDomNode(fake);
     }
 

--- NEW FILE: htmlunit2-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: htmlunit2-jpp-depmap.xml ---
<dependencies>
  <dependency>
    <maven>
      <groupId>net.sourceforge.nekohtml</groupId>
      <artifactId>nekohtml</artifactId>
      <version>1.9.14</version>
    </maven>
    <jpp>
      <groupId>JPP</groupId>
      <artifactId>nekohtml</artifactId>
      <version>1.9.11</version>
    </jpp>
  </dependency>
  <dependency>
    <maven>
      <groupId>junitperf</groupId>
      <artifactId>junitperf</artifactId>
      <version>1.8</version>
    </maven>
    <jpp>
      <groupId>JPP</groupId>
      <artifactId>junitperf</artifactId>
      <version>1.8</version>
    </jpp>
  </dependency>
</dependencies>

--- NEW FILE: htmlunit2-apache-james.patch ---
--- pom.xml.sav2	2010-12-10 21:58:45.000000000 -0500
+++ pom.xml	2010-12-10 21:59:17.068258704 -0500
@@ -643,6 +643,11 @@
     </contributors>
     <dependencies>
         <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>apache-mime4j</artifactId>
+            <version>0.6</version>
+        </dependency>
+        <dependency>
             <groupId>xalan</groupId>
             <artifactId>xalan</artifactId>
             <version>2.7.1</version>

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/htmlunit2/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	11 Dec 2010 04:34:00 -0000	1.1
--- sources	11 Dec 2010 04:44:14 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ 702752e52d2cf985559faa04b6344f89  htmlunit2-2.8.tar.bz2

--- NEW FILE: htmlunit2.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 with()          %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without()       %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with()    %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}

%bcond_with gcj_support
%bcond_with test

%if %with gcj_support
%define gcj_support 1
%else
%define gcj_support 0
%endif

%define section free

Name:           htmlunit2
Version:        2.8
Release:        0.1%{?dist}
Epoch:          0
Summary:        Browser for Java programs
License:        ASL 2.0
Group:          Development/Java
URL:            http://htmlunit.sourceforge.net/
# svn export http://htmlunit.svn.sourceforge.net/svnroot/htmlunit/tags/HtmlUnit-2.8/ htmlunit2-2.8 && tar cjf htmlunit2-2.8.tar.bz2 htmlunit2-2.8
# Exported revision 6155.
Source0:        htmlunit2-2.8.tar.bz2
Source1:        htmlunit2-settings.xml
Source2:        htmlunit2-jpp-depmap.xml
Patch0:         htmlunit2-no-test.patch
Patch1:         htmlunit2-attributes.patch
Patch2:         htmlunit2-apache-james.patch
Patch3:         htmlunit2-compile.patch
Requires(post): jpackage-utils >= 0:1.7.3
Requires(postun): jpackage-utils >= 0:1.7.3
Requires:       commons-codec
Requires:       commons-collections
Requires:       commons-httpclient
Requires:       jakarta-commons-io
Requires:       commons-lang
Requires:       jakarta-commons-logging
Requires:       jpackage-utils
Requires:       cssparser
Requires:       hc-httpclient
Requires:       htmlunit-core-js >= 0:%{version}
Requires:       xalan-j2
BuildRequires:  commons-codec >= 0:1.3
# XXX: lowered from 3.2.1
BuildRequires:  commons-collections >= 0:3.2
BuildRequires:  commons-httpclient >= 0:3.1
# XXX: should provide commons-io
BuildRequires:  jakarta-commons-io >= 0:1.4
BuildRequires:  commons-lang >= 0:2.4
# XXX: should provide commons-logging
BuildRequires:  jakarta-commons-logging >= 0:1.1.1
BuildRequires:  cssparser >= 0:0.9.5
BuildRequires:  hc-httpclient >= 0:4.0.1
BuildRequires:  htmlunit-core-js >= 0:%{version}
# XXX: 1.9.14
BuildRequires:  nekohtml >= 0:1.9.11
BuildRequires:  xalan-j2 >= 0:2.7.1
%if %with test
BuildRequires:  commons-fileupload >= 0:1.2.1
BuildRequires:  gsbase >= 0:2.0.1
BuildRequires:  jfreechart >= 0:1.0.12
BuildRequires:  junit4 >= 0:4.5
BuildRequires:  maven-surefire-provider-junit4
BuildRequires:  log4j >= 0:1.2.14
BuildRequires:  easymock2 >= 0:2.5.1
BuildRequires:  jetty6 >= 0:6.1.14
BuildRequires:  slf4j >= 0:1.4.3
BuildRequires:  oss-parent >= 0:3
%if 0
org.eclipse.equinox:common:3.3.0-v20070426:test
org.eclipse.jdt:core:3.4.2.v_883_R34x:test
org.openqa.selenium.webdriver:webdriver-firefox:0.5.524:test
org.openqa.selenium.webdriver:webdriver-htmlunit:0.5.524:test
org.openqa.selenium.webdriver:webdriver-ie:0.5.524:test
%endif
%endif
BuildRequires:  java-devel >= 0:1.5.0
BuildRequires:  jpackage-utils >= 0:1.7.3
BuildRequires:  maven2 >= 0:2.0.7
BuildRequires:  maven2-plugin-antrun
BuildRequires:  maven2-plugin-assembly
BuildRequires:  maven2-plugin-checkstyle
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-release
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-site
BuildRequires:  maven2-plugin-source
BuildRequires:  maven-surefire-maven-plugin
%if %{gcj_support}
BuildRequires:  java-gcj-compat-devel
%else
BuildArch:      noarch
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
HtmlUnit is a "browser for Java programs". It models the HTML
documents and provides an API that allows you to invoke pages,
fill forms, click links, etc. just like you do in your
"normal" browser.

It has fairly good JavaScript support (which gets continuously
improved) and is able to work even with quite complex AJAX
libraries simulating either Firefox or Internet Explorer
depending on the configuration you want to use. 
It is typically used for testing purposes or to retrieve 
information from web sites. 

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation
Requires:       jpackage-utils

%description javadoc
%{summary}.

%prep
%setup -q 
%if %without test
%patch0 -p0 -b .sav0
%endif
%patch1 -p0 -b .sav1
%patch2 -p0 -b .sav2
%patch3 -p0 -b .sav3
%{_bindir}/find -type f -name "*.jar"  | %{_bindir}/xargs -t %{__rm}

%{__cp} -p %{SOURCE1} maven2-settings.xml

%{__sed} -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/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/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 MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
%{__mkdir_p} ${MAVEN_REPO_LOCAL}
%{_bindir}/mvn-jpp \
        -e \
        -s $(pwd)/maven2-settings.xml \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=${MAVEN_REPO_LOCAL} \
        -Dmaven.test.failure.ignore=true \
%if %without test
        -Dmaven.test.skip=true \
%endif
        install javadoc:javadoc

%install
%{__rm} -rf %{buildroot}

# jars
%{__mkdir_p} %{buildroot}%{_javadir}
%{__cp} -p target/htmlunit-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} `/bin/echo ${jar} | %{__sed} "s|-%{version}||g"`; done)

# poms
%{__mkdir_p} %{buildroot}%{_datadir}/maven2/poms
%{__cp} -p pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap net.sourceforge.htmlunit htmlunit %{version} JPP %{name}

# javadoc
%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__cp} -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%clean
%{__rm} -rf %{buildroot}

%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)
%{_javadir}*/%{name}-%{version}.jar
%{_javadir}*/%{name}.jar
%{_datadir}/maven2/poms/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

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

%changelog
* Fri Dec 10 2010 David Walluck <dwalluck at redhat.com> 0:2.8-0.1
- 2.8

* Fri May 21 2010 David Walluck <dwalluck at redhat.com> 0:2.4-0.1
- release

--- NEW FILE: htmlunit2-no-test.patch ---
--- pom.xml.sav0	2010-08-05 04:53:11.000000000 -0400
+++ pom.xml	2010-12-10 21:58:26.808049322 -0500
@@ -723,7 +723,7 @@
             <version>1.1.1</version>
         </dependency>
         <!-- Test dependencies. -->
-        <dependency>
+        <!--<dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.7</version>
@@ -758,9 +758,9 @@
             <artifactId>jetty</artifactId>
             <version>6.1.25</version>
             <scope>test</scope>
-        </dependency>
+        </dependency>-->
         <!-- The presence of slf4j on the classpath during the unit tests triggers correct logging in Jetty. -->
-        <dependency>
+        <!--<dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
             <version>1.6.1</version>
@@ -777,9 +777,9 @@
             <artifactId>jfreechart</artifactId>
             <version>1.0.12</version>
             <scope>test</scope>
-        </dependency>
+        </dependency>-->
         <!-- WebDriver -->
-        <dependency>
+        <!--<dependency>
             <groupId>net.sourceforge.htmlunit</groupId>
             <artifactId>webdriver</artifactId>
             <version>2.8-SNAPSHOT</version>
@@ -802,7 +802,7 @@
             <artifactId>selenium-firefox-driver</artifactId>
             <version>2.0a5</version>
             <scope>test</scope>
-        </dependency>
+        </dependency>-->
     </dependencies>
     <distributionManagement>
         <site>




More information about the JPackage-commits mailing list