softwaremill / demo-spring-boot-docker-compose

Demo application with comparison of spring-boot-docker-compose to testcontainers
2 stars 1 forks source link

mvn clean test or mvn install both fail #1

Open nagkumar opened 1 year ago

nagkumar commented 1 year ago
/spring-boot-docker-compose-3.1.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-docker-compose/3.1.0/spring-boot-docker-compose-3.1.0.jar (162 kB at 5.1 MB/s)
[INFO] ----------------------------------------------------------------------------------------------------------------
[INFO] Reactor Summary for demo-spring-boot-docker-compose 0.0.1-SNAPSHOT:
[INFO]
[INFO] demo-spring-boot-docker-compose ............................................................ SUCCESS [  0.428 s]
[INFO] core ....................................................................................... SUCCESS [ 51.256 s]
[INFO] docker-compose ............................................................................. FAILURE [  1.384 s]
[INFO] testcontainers ............................................................................. SKIPPED
[INFO] ----------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ----------------------------------------------------------------------------------------------------------------
[INFO] Total time:  01:09 min
[INFO] Finished at: 2023-06-16T12:34:55+05:30
[INFO] ----------------------------------------------------------------------------------------------------------------
[ERROR] Failed to execute goal on project docker-compose: Could not resolve dependencies for project com.softwaremill:docker-compose:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.example:core:jar:0.0.1-SNAPSHOT (absent): Could not find artifact com.example:core:jar:0.0.1-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' switch
[ERROR] Re-run Maven using the '-X' switch to enable verbose output
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn [args] -r
nagkumar commented 1 year ago

it needs the following changes

 docker-compose/pom.xml | 2 +-
 testcontainers/pom.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docker-compose/pom.xml b/docker-compose/pom.xml
index d1464a2..e57f73a 100644
--- a/docker-compose/pom.xml
+++ b/docker-compose/pom.xml
@@ -9,7 +9,7 @@
     <artifactId>docker-compose</artifactId>
     <dependencies>
         <dependency>
-            <groupId>com.example</groupId>
+            <groupId>${project.groupId}</groupId>
             <artifactId>core</artifactId>
             <version>${project.version}</version>
         </dependency>
diff --git a/testcontainers/pom.xml b/testcontainers/pom.xml
index 1e53d26..501f9dc 100644
--- a/testcontainers/pom.xml
+++ b/testcontainers/pom.xml
@@ -13,7 +13,7 @@

     <dependencies>
         <dependency>
-            <groupId>com.example</groupId>
+       <groupId>${project.groupId}</groupId>
             <artifactId>core</artifactId>
             <version>${project.version}</version>
         </dependency>
nagkumar commented 1 year ago

image image

reference IDE errors shown