eclipse-edc / MinimumViableDataspace

Guidance on documentation, scripts and integration steps on using the EDC project results
Apache License 2.0
52 stars 160 forks source link

Building MinimumViableDataspace with gradlew #116

Closed aramirezarsys closed 1 year ago

aramirezarsys commented 1 year ago

Bug Report

Describe the Bug

When trying to build the project with gradlew according to documentation it fails with the following error:

> Task :system-tests:compileTestJava
/home/aramirez/PROJECTS/aramirez/REPOSITORIES/MinimumViableDataspace/system-tests/src/test/java/org/eclipse/edc/system/tests/identityhub/IdentityHubIntegrationTest.java:89: error: constructor IdentityHubClientImpl in class IdentityHubClientImpl cannot be applied to given types;
        client = new IdentityHubClientImpl(OK_HTTP_CLIENT, OBJECT_MAPPER, CONSOLE_MONITOR);
                 ^
  required: OkHttpClient,ObjectMapper,Monitor,CredentialEnvelopeTransformerRegistry
  found: OkHttpClient,ObjectMapper,ConsoleMonitor
  reason: actual and formal argument lists differ in length

This is due because of in the repository: https://github.com/eclipse-edc/IdentityHub the definition/contructor for class IdentityHubClientImpl has been changed from: public IdentityHubClientImpl(OkHttpClient httpClient, ObjectMapper objectMapper, Monitor monitor) to: public IdentityHubClientImpl(OkHttpClient httpClient, ObjectMapper objectMapper, Monitor monitor, CredentialEnvelopeTransformerRegistry transformerRegistry) As you can see there is a new element in the contructor: CredentialEnvelopeTransformerRegistry transformerRegistry And this new element is not taking into account in Test file: MinimumViableDataspace/system-tests/src/test/java/org/eclipse/edc/system/tests/identityhub/IdentityHubIntegrationTest.java

Expected Behavior

It should be changed the file: MinimumViableDataspace/system-tests/src/test/java/org/eclipse/edc/system/tests/identityhub/IdentityHubIntegrationTest.java to get it working properly.

Observed Behavior

Same as issue description.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Clone repository: git clone https://github.com/eclipse-edc/MinimumViableDataspace
  2. Go to repository directory: cd MinimumViableDataspace;
  3. Build de project: ./gradlew build -x test
  4. See error

Context Information

Detailed Description

Same as description

Possible Implementation

Sugested Solution:

Change repository: https://github.com/eclipse-edc/MinimumViableDataspace according to last implementation of repository: https://github.com/eclipse-edc/IdentityHub

or apply this files diff:

diff --git a/gradle.properties b/gradle.properties
index cce66e7..0177229 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,7 +1,7 @@
 version=0.0.1-SNAPSHOT
 edcGroup=org.eclipse.edc
 registrationServiceVersion=0.0.1-SNAPSHOT
-identityHubVersion=0.0.1-SNAPSHOT
+identityHubVersion=0.0.1-20221229-SNAPSHOT
 edcGradlePluginsVersion=0.0.1-SNAPSHOT
 annotationProcessorVersion=0.0.1-SNAPSHOT
 metaModelVersion=0.0.1-SNAPSHOT
diff --git a/settings.gradle.kts b/settings.gradle.kts
index e0ef03c..d9a53bd 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -26,7 +26,7 @@ dependencyResolutionManagement {
             library("gatling-highcharts", "io.gatling.highcharts", "gatling-charts-highcharts").version("3.7.5")
         }
         create("identityHub") {
-            version("identityHub", "0.0.1-SNAPSHOT")
+            version("identityHub", "0.0.1-20221229-SNAPSHOT")
             library("spi-core", "org.eclipse.edc", "identity-hub-spi").versionRef("identityHub")
             library("core", "org.eclipse.edc", "identity-hub").versionRef("identityHub")
             library("core-client", "org.eclipse.edc", "identity-hub-client").versionRef("identityHub")
wolf4ood commented 1 year ago

Hi @aramirezarsys thanks for reporting this, the fix is on it's way with this PR once it's merged

Thanks

aramirezarsys commented 1 year ago

Thanks in advance for fast response, I updated 2 repositories and dependecies and execution is right now.