Search code examples
javamavenevosuite

How to only build the client module of evosuite


I'm trying to run the tests of Evosuite's client module, but when I try to compile the module alone maven is not able to find a dependency (evosuite-runtime) which is on the same repository and is correctly build when I compile the complete repository.

Taking a look at the POM for the client module, the dependency version is written as ${project.version} I'm assuming is not finding it to compile. This is shown:

[WARNING] Failed to execute goal on project evosuite-client: Could not resolve dependencies for project org.evosuite:evosuite-client:jar:1.0.7-SNAPSHOT: Could not find artifact org.evosuite:evosuite-runtime:jar:1.0.7-SNAPSHOT

...

[ERROR] Failed to execute goal on project evosuite-client: Could not resolve dependencies for project org.evosuite:evosuite-client:jar:1.0.7-SNAPSHOT: Could not find artifact org.evosuite:evosuite-runtime:jar:1.0.7-SNAPSHOT

When changing the version to 1.0.6 it works fine as that version is available on the online maven repository, but the 1.0.7 version should be locally compiled on the fly.

Here's the client's module pom section

<dependency>
    <groupId>org.evosuite</groupId>
    <artifactId>evosuite-runtime</artifactId>
    <version>${project.version}</version>
</dependency>

And the main project pom's module section

<modules>
    <module>master</module>
    <module>client</module>
    <module>runtime</module>
    <module>plugins</module>
    <module>standalone_runtime</module>
    <module>shaded</module>
    <module>generated</module>
</modules>

Has anyone had a similar issue?


Solution

  • The reason was that the runtime package needed to be installed locally in order to be used to compile the client. Just run from the root module

    mvn install
    

    and that should be it.