cjstehno / ersatz

🤖 A simulated HTTP server for testing client code with configurable responses.
https://cjstehno.github.io/ersatz
Apache License 2.0
47 stars 5 forks source link

Release 1.9.0 not usable from Maven Central #119

Closed TobiX closed 4 years ago

TobiX commented 5 years ago

Since 1.9.0 depends on space.jasan:groovy-closure-support, which is not available from Maven Central, one cannot use Ersatz if you only use Maven Central. I opened an issue on that project too (https://github.com/jasanspace/groovy-closure-support/issues/4), but I wonder if anything could be done from the Ersatz side?

I realize I can probably just use the safe artifact:

    <dependency>
      <groupId>com.stehno.ersatz</groupId>
      <artifactId>ersatz</artifactId>
      <version>1.9.0</version>
      <scope>test</scope>
      <classifier>safe</classifier>
      <exclusions>
      <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

This looks like a reasonable workaround, so feel free to close this issue if you think that is the way to go.

cjstehno commented 5 years ago

I would suggest using the "safe" jar work-around. Other than bringing the code from that library into Ersatz, there is not much I can do. I will keep an eye on the external library - if it does not get added to maven-central soon, I will consider other options.

Thanks for pointing out the issue.

Note: Getting a library added to maven-central is a bit of a pain, which is why I think a lot of devs skip it until it becomes an issue.

cjstehno commented 5 years ago

Has the "safe" jar been working as a work-around?

I am trying to decide whether to promote that as the official solution for those requiring maven-central vs the other option, which is to bring the source for the one class I am using in the library into the ersatz codebase (with attribution of course).

TobiX commented 5 years ago

Yeah, that works for me. If you want to make it easier for Maven users, you could publish the safe artefact with a different artifactId without dependencies, so one doesn't have to exclude transitive dependencies when declaring the dependency to the safe JAR...

cjstehno commented 5 years ago

I hate to do it, but I think I will just pull in the few lines of code that I use from that library (with attribution).

cjstehno commented 4 years ago

I had to bring the source for the two classes in... grr. If only the most-used maven repository were actually friendly to use :-/