grasshopper7 / extentreports-cucumber6-adapter

Cucumber-JVM 6 Adapter for Extent Framework
https://ghchirp.online/2098/
MIT License
16 stars 15 forks source link

Could not find com.github.ralfstuckert.pdfbox-layout:pdfbox2-layout:1.0.0. #36

Closed j-c17 closed 2 years ago

j-c17 commented 3 years ago

Hi,

When resolving this dependency with Gradle and the newest IntelliJ 2021.1 https://mvnrepository.com/artifact/tech.grasshopper/extentreports-cucumber6-adapter

implementation group: 'tech.grasshopper', name: 'extentreports-cucumber6-adapter', version: '2.7.0'

I find an error today

Execution failed for task ':compileJava'. Could not resolve all files for configuration ':compileClasspath'. Could not find com.github.ralfstuckert.pdfbox-layout:pdfbox2-layout:1.0.0. Required by: project : Could not find com.github.ralfstuckert.pdfbox-layout:pdfbox2-layout:1.0.0. Required by: project : > tech.grasshopper:extentreports-cucumber6-adapter:2.7.0 > tech.grasshopper:extent-pdf-report:1.6.0 > tech.grasshopper:cucumber-pdf-report:2.1.0`

2 weeks ago it was fine.

Learning from a discussion here https://github.com/jitpack/jitpack.io/issues/4490 , it seems like the pdfbox2 repo is failing (not sure for how long).

Is there any suggestion or anything we can do in the meantime , so we can keep using this extentreports-cucumber6-adapter ?

Thanks.

grasshopper7 commented 3 years ago

Thanks for pointing this out.

This artifact is also available in another public repository called Mulesoft (https://repository.mulesoft.org/nexus/content/repositories/public/com/github/ralfstuckert/pdfbox-layout/ and https://mvnrepository.com/artifact/com.github.ralfstuckert.pdfbox-layout/pdfbox2-layout/1.0.0) as mentioned here - https://github.com/ralfstuckert/pdfbox-layout/issues/88. For a temporary fix u can add the following to your project POM.

  1. Add Mulesoft repository declaration.

    <repositories>
    <repository>
        <id>mulesoft-releases</id>
        <name>MuleSoft Repository</name>
        <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
    </repository>
    </repositories>
  2. Add pdfbox2 layout version 1.0.0 jar.

    <dependency>
    <groupId>com.github.ralfstuckert.pdfbox-layout</groupId>
    <artifactId>pdfbox2-layout</artifactId>
    <version>1.0.0</version>
    </dependency>
  3. Unfortunately the above dependency imports an old version of pdfbox (2.0.4) but version 2.0.22 is required, so add this dependency also.

    <dependency>
    <groupId>org.apache.pdfbox</groupId>
    <artifactId>pdfbox</artifactId>
    <version>2.0.22</version>
    </dependency>

For a permanent solution (sort of) will update the repository settings in the appropriate jar and upload to Maven Central in a couple of days. The bigger issue is that the pdfbox2 code base is no longer maintained, so have to look for other solutions.

Let me know if the workaround works. Thanks.

grasshopper7 commented 2 years ago

This dependency is no longer required.