Maven Upload Requests

Please upload XMLUnit for Java 1.1

Details

  • Type: Wish Wish
  • Status: Closed Closed
  • Resolution: Fixed
  • Labels:
    None

Description

XMLUnit for Java 1.1 has been released today.

http://xmlunit.sf.net/

I am listed as a project admin at http://sourceforge.net/projects/xmlunit/

Activity

Hide
Henri Yandell added a comment -
Would love to, but the pom looks too sparse. There are no dependencies listed and at least JUnit is a dependency (by looking at the javadoc).

Could you repeat with a pom that lists the dependencies?
Show
Henri Yandell added a comment - Would love to, but the pom looks too sparse. There are no dependencies listed and at least JUnit is a dependency (by looking at the javadoc). Could you repeat with a pom that lists the dependencies?
Hide
Stefan Bodewig added a comment -
Hi Henri,

I've updated the POM to include name and scm information and should now have all elements required by http://maven.apache.org/guides/mini/guide-central-repository-upload.html. The jar has been updated.

Yes, we do have two classes that depend on JUnit (three if you want to be strict), but we don't list JUnit as a dependency for good reasons (or so we think).

There are two kinds of users of XMLUnit:

* people who write JUnit tests and use the two classes of XMLUnit that depend on JUnit. These people already know they need JUnit (because the already use it themselves) and don't need us to provide a transitive dependency.

* people who use the rest of XMLUnit via its API and don't use JUnit at all. They may use XMLUnit together with TestNG or outside of any tests at all. We really wouldn't want to force those people to manually exclude the transitive dependency on JUnit introduced by XMLUnit.

We feel it is to our user's benefit to not list a dependency on JUnit.

I hope you understand our indent.

Thanks

Stefan
Show
Stefan Bodewig added a comment - Hi Henri, I've updated the POM to include name and scm information and should now have all elements required by http://maven.apache.org/guides/mini/guide-central-repository-upload.html. The jar has been updated. Yes, we do have two classes that depend on JUnit (three if you want to be strict), but we don't list JUnit as a dependency for good reasons (or so we think). There are two kinds of users of XMLUnit: * people who write JUnit tests and use the two classes of XMLUnit that depend on JUnit. These people already know they need JUnit (because the already use it themselves) and don't need us to provide a transitive dependency. * people who use the rest of XMLUnit via its API and don't use JUnit at all. They may use XMLUnit together with TestNG or outside of any tests at all. We really wouldn't want to force those people to manually exclude the transitive dependency on JUnit introduced by XMLUnit. We feel it is to our user's benefit to not list a dependency on JUnit. I hope you understand our indent. Thanks Stefan
Hide
Joerg Schaible added a comment -
Such a dependency should then be marked as optional.
-- Jörg
Show
Joerg Schaible added a comment - Such a dependency should then be marked as optional. -- Jörg
Hide
Stefan Bodewig added a comment -
As both of you are certainly aware, I'm not a Maven person at all.

If I mark the dependency as optional, what will be Maven's default behavior for our TestNG users who happen to use Maven for their builds?

Will Maven download JUnit as well unless they explicitly override it?

I really want the default to be that the transitive dependency is ignored and user's need to ask for JUnit explicitly.

If this can be done with an optional dependency I'll be happy to add it.

Oh, and if you could tell me how to mark a dependency as optional, I'd really appreciate it. http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html doesn't contain the word "optional".
Show
Stefan Bodewig added a comment - As both of you are certainly aware, I'm not a Maven person at all. If I mark the dependency as optional, what will be Maven's default behavior for our TestNG users who happen to use Maven for their builds? Will Maven download JUnit as well unless they explicitly override it? I really want the default to be that the transitive dependency is ignored and user's need to ask for JUnit explicitly. If this can be done with an optional dependency I'll be happy to add it. Oh, and if you could tell me how to mark a dependency as optional, I'd really appreciate it. http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html doesn't contain the word "optional".
Hide
Carlos Sanchez added a comment -
optional dependencies are not downloaded

http://maven.apache.org/ref/current/maven-model/maven.html
Show
Carlos Sanchez added a comment - optional dependencies are not downloaded http://maven.apache.org/ref/current/maven-model/maven.html
Hide
Joerg Schaible added a comment -
And to make the long story short: Simply add

<optional>true</optional>

to the dependency.
:)

- Jörg
Show
Joerg Schaible added a comment - And to make the long story short: Simply add <optional>true</optional> to the dependency. :) - Jörg
Hide
Paul King added a comment -
Changing the dependencies to the following was what I required to compile:
{code}
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.2</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
{code}
Show
Paul King added a comment - Changing the dependencies to the following was what I required to compile: {code}   <dependencies>     <dependency>       <groupId>junit</groupId>       <artifactId>junit</artifactId>       <version>3.8.2</version>       <scope>compile</scope>       <optional>true</optional>     </dependency>   </dependencies> {code}
Hide
Paul King added a comment -
Actually, thinking a bit more about this, junit is a required compile-time dependency but optional run-time dependency. I am not sure if the above is the way to capture that or not.
Show
Paul King added a comment - Actually, thinking a bit more about this, junit is a required compile-time dependency but optional run-time dependency. I am not sure if the above is the way to capture that or not.
Hide
Carlos Sanchez added a comment -
if it's only used for testing then
 <scope>test</scope>

no need for optional
Show
Carlos Sanchez added a comment - if it's only used for testing then  <scope>test</scope> no need for optional
Hide
Paul King added a comment - - edited
It is needed to compile a production class file of XmlUnit. The class file is only used by a subset of users. Many users will have XmlUnit as a test-scoped dependency.
Show
Paul King added a comment - - edited It is needed to compile a production class file of XmlUnit. The class file is only used by a subset of users. Many users will have XmlUnit as a test-scoped dependency.
Hide
Paul King added a comment -
Any suggestions on the path forward? Is there a standard maven way to handle the above or is this use case outside what the standard model supports? Or to rephrase, does moving forward while sticking with the current model involve splitting the deliverables into two: one which would have the required compile-time dependency, the other would have to remove the class and remove the dependency? Is there something equivalent to ivy's profiles? I am not 100% sure about the full capabilities of ivy's profiles but I believe they can handle scenarios like this.
Show
Paul King added a comment - Any suggestions on the path forward? Is there a standard maven way to handle the above or is this use case outside what the standard model supports? Or to rephrase, does moving forward while sticking with the current model involve splitting the deliverables into two: one which would have the required compile-time dependency, the other would have to remove the class and remove the dependency? Is there something equivalent to ivy's profiles? I am not 100% sure about the full capabilities of ivy's profiles but I believe they can handle scenarios like this.
Hide
Stefan Bodewig added a comment -
Sorry for the delay, I've been on vacation.

As requested I've added an optional dependency on JUnit, so please upload the artifact.

The XMLUnit developers (me ;-) do not intend to build XMLUnit using Maven, but we do want to provide it via the repository because our users asked for it.

The dependency on JUnit is non-optional at compile time, but as I said, we don't build with Maven, so marking it as optional (as it is at runtime) will be fine for us.
Show
Stefan Bodewig added a comment - Sorry for the delay, I've been on vacation. As requested I've added an optional dependency on JUnit, so please upload the artifact. The XMLUnit developers (me ;-) do not intend to build XMLUnit using Maven, but we do want to provide it via the repository because our users asked for it. The dependency on JUnit is non-optional at compile time, but as I said, we don't build with Maven, so marking it as optional (as it is at runtime) will be fine for us.
Hide
Erik van Oosten added a comment -
Meanwhile, is there another repository?
Show
Erik van Oosten added a comment - Meanwhile, is there another repository?

People

Vote (2)
Watch (6)

Dates

  • Created:
    Updated:
    Resolved: