Hi Praveen,

Good idea to use Maven ! First of all, you don't need to put jwebunit-core in your dependencies, as jwebunit-XX-plugin depend on it (transitive dependencies power !).

Concerning your missing dependencies, there are different solutions. In fact, httpunit and htmlunit are managed thanks to Maven 1, and are not up-to-date on ibiblio. That's why I had to create a private repository for each plugin, that contains the missing ones.
Finally, you could create a corporate repository for your compagny, and put in it these dependencies (you could find them in jwebunit SVN). But the simplest solution is putting theses dependencies in jwebunit m2 repository.

I will do this and give you feedback.

++
Julien

----- Message d'origine ----
De : Praveen Kallakuri <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Samedi, 17 Juin 2006, 9h30mn 23s
Objet : [Jwebunit-users] htmlunit and httpunit jar download problem with m2

I am trying to create a new maven project for creating our regression
tests with jwebunit. I want to save our developers from having to
manage the dependencies manually, so I created a pom (attached).

However, when I try to compile the project with a simple
helloworld.java, I end up with maven being unable to find all the
necessary transitive dependencies. Looks like each of httpunit plugin
and htmlunit plugin refer to httpunit and htmlunit jars respectively
that don't seem to be available.

Here's the output:

[EMAIL PROTECTED]:~/qa/src/java/rtst $ mvn compile
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype
[INFO]    task-segment: [compile]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://jwebunit.sourceforge.net/m2-repo-snapshots/net/sourceforge/htmlunit/htmlunit/1.9-SNAPSHOT/htmlunit-1.9-SNAPSHOT.pom
[WARNING] Unable to get resource from repository jwebunit-snapshots
(http://jwebunit.sourceforge.net/m2-repo-snapshots)
Downloading: http://jwebunit.sourceforge.net/m2-repo-snapshots/net/sourceforge/httpunit/httpunit/1.6.1-20060101/httpunit-1.6.1-20060101.pom
[WARNING] Unable to get resource from repository jwebunit-snapshots
(http://jwebunit.sourceforge.net/m2-repo-snapshots)
Downloading: http://repo1.maven.org/maven2/net/sourceforge/httpunit/httpunit/1.6.1-20060101/httpunit-1.6.1-20060101.pom
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org/maven2)
Downloading: http://jwebunit.sourceforge.net/m2-repo-snapshots/net/sourceforge/httpunit/httpunit/1.6.1-20060101/httpunit-1.6.1-20060101.jar
[WARNING] Unable to get resource from repository jwebunit-snapshots
(http://jwebunit.sourceforge.net/m2-repo-snapshots)
Downloading: file:${basedir}/private-repository/net/sourceforge/httpunit/httpunit/1.6.1-20060101/httpunit-1.6.1-20060101.jar
[WARNING] Unable to get resource from repository private
(file:${basedir}/private-repository)
Downloading: http://repo1.maven.org/maven2/net/sourceforge/httpunit/httpunit/1.6.1-20060101/httpunit-1.6.1-20060101.jar
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org/maven2)
Downloading: http://jwebunit.sourceforge.net/m2-repo-snapshots/net/sourceforge/htmlunit/htmlunit/1.9-SNAPSHOT/htmlunit-1.9-SNAPSHOT.jar
[WARNING] Unable to get resource from repository jwebunit-snapshots
(http://jwebunit.sourceforge.net/m2-repo-snapshots)
Downloading: file:${basedir}/private-repository/net/sourceforge/htmlunit/htmlunit/1.9-SNAPSHOT/htmlunit-1.9-SNAPSHOT.jar
[WARNING] Unable to get resource from repository private
(file:${basedir}/private-repository)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) net.sourceforge.httpunit:httpunit:jar:1.6.1-20060101

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=net.sourceforge.httpunit
-DartifactId=httpunit \
          -Dversion=1.6.1-20060101 -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
        1) com.gallup.rtst:rtst:jar:1.0-SNAPSHOT
        2) net.sourceforge.jwebunit:jwebunit-httpunit-plugin:jar:1.3-SNAPSHOT
        3) net.sourceforge.httpunit:httpunit:jar:1.6.1-20060101

2) net.sourceforge.htmlunit:htmlunit:jar:1.9-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=net.sourceforge.htmlunit
-DartifactId=htmlunit \
          -Dversion=1.9-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
        1) com.gallup.rtst:rtst:jar:1.0-SNAPSHOT
        2) net.sourceforge.jwebunit:jwebunit-htmlunit-plugin:jar:1.3-SNAPSHOT
        3) net.sourceforge.htmlunit:htmlunit:jar:1.9-SNAPSHOT

----------
2 required artifacts are missing.

for artifact:
  com.gallup.rtst:rtst:jar:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  jwebunit-snapshots (http://jwebunit.sourceforge.net/m2-repo-snapshots)


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Sat Jun 17 13:11:10 CDT 2006
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------


--

                                                       k.p.
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.gallup.rtst</groupId>

  <artifactId>rtst</artifactId>

  <packaging>jar</packaging>

  <version>1.0-SNAPSHOT</version>

  <name>Maven Quick Start Archetype</name>

  <url>http://maven.apache.org</url>

  <repositories>

    <repository>

      <id>jwebunit-snapshots</id>

      <name>jWebUnit private maven2 repository</name>

      <url>http://jwebunit.sourceforge.net/m2-repo-snapshots</url>

    </repository>

  </repositories>

  <dependencies>

    <dependency>

      <groupId>junit</groupId>

      <artifactId>junit</artifactId>

      <version>3.8.1</version>

    </dependency>

    <dependency>

        <groupId>net.sourceforge.jwebunit</groupId>

        <artifactId>jwebunit-core</artifactId>

        <version>1.3-SNAPSHOT</version>

  ;   </dependency>

    <dependency>

        <groupId>net.sourceforge.jwebunit</groupId>

        <artifactId>jwebunit-httpunit-plugin</artifactId>

        <version>1.3-SNAPSHOT</version>

    </dependency>

    <dependency>

        <groupId>net.sourceforge.jwebunit</groupId>

        <artifactId>jwebunit-htmlunit-plugin</artifactId>

        <version>1.3-SNAPSHOT</version>

    </dependency>

  </dependencies>

</project>

__________ _____________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to