Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load requirements after updating to serenity 2.2.2 #2057

Closed
fsaltiu opened this issue Apr 27, 2020 · 4 comments
Closed

Failed to load requirements after updating to serenity 2.2.2 #2057

fsaltiu opened this issue Apr 27, 2020 · 4 comments

Comments

@fsaltiu
Copy link

fsaltiu commented Apr 27, 2020

I was working with Serenity version 2.0.48, and I decided to upgrade to version 2.2.2. Now when I try to build my project I get this error:

[INFO] --- serenity-maven-plugin:2.2.2:aggregate (serenity-reports) @ 
[WARNING] Failed to load requirements: net/serenitybdd/screenplay/PerformsTasks
java.lang.NoClassDefFoundError: net/serenitybdd/screenplay/PerformsTasks

I'm working with Java version 11.0.6 and Maven 3.6.3 and the part of the pom where this happens is in:

   <plugin>
      <groupId>net.serenity-bdd.maven.plugins</groupId>
      <artifactId>serenity-maven-plugin</artifactId>
      <version>${serenity.version}</version>
     <dependencies>
       <dependency>
         <groupId>net.serenity-bdd</groupId>
         <artifactId>serenity-core</artifactId>
         <version>${serenity.version}</version>
       </dependency>
     </dependencies>
      <executions>
        <execution>
          <id>serenity-reports</id>
          <phase>post-integration-test</phase>
          <goals>
            <goal>aggregate</goal>
          </goals>
        </execution>
      </executions>
    </plugin>

@wakaleo
Copy link
Member

wakaleo commented Apr 27, 2020

NoClassDefFoundError is due to a version conflict. Make sure all the serenity library versions are the same, or do a Maven dependency analysis to isolate the conflict.

@fsaltiu
Copy link
Author

fsaltiu commented Apr 28, 2020

Thanks for your answer. I resolved some conflicts using the dependency analizer, but the error keeps happening. I'm sure that I'm using the same serenity version (2.2.2) for all the dependencies, except the Jira plugin that I'm using version 1.12.0.

Can the problem be caused by this dependency:

<dependency>
  <groupId>net.bytebuddy</groupId>
  <artifactId>byte-buddy</artifactId>
  <version>1.9.6</version>
  <scope>compile</scope>
</dependency>
That I had to include to be able t work with Java 11?

Thanks again for your help.

@fsaltiu
Copy link
Author

fsaltiu commented Apr 28, 2020

I've manage to get it work with all serenity dependencies to 2.2.2 but this

     <groupId>net.serenity-bdd.maven.plugins</groupId>
      <artifactId>serenity-maven-plugin</artifactId>
      <version>2.0.48</version>

The aggregate where it was failing I left with the version 2.0.48 and it seems to work...

@wakaleo
Copy link
Member

wakaleo commented May 10, 2020

serenity-maven-plugin needs to be the same version as serenity-core

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants