signserver-ce icon indicating copy to clipboard operation
signserver-ce copied to clipboard

com.keyfactor:servicemanifestbuilder:jar:1.0.2 was not found in https://ec.europa.eu/cefdigital/artifact/content/repositories/esignaturedss/

Open r-shafi opened this issue 1 year ago • 6 comments

Environment:

  • openjdk version "17.0.11" 2024-04-16
  • OpenJDK Runtime Environment (Red_Hat-17.0.11.0.9-1) (build 17.0.11+9)
  • OpenJDK 64-Bit Server VM (Red_Hat-17.0.11.0.9-1) (build 17.0.11+9, mixed mode, sharing)
  • Apache Maven 3.9.1 (Red Hat 3.9.1-3)

Steps to reproduce the behavior:

  1. git clone --depth 1 https://github.com/Keyfactor/signserver-ce.git
  2. cd signserver-ce
  3. cd lib
  4. ./update-jars-list.sh
  5. ./update-projects-list.sh
  6. ./maven-install-files.sh
  7. cd ..
  8. mvn install

Error Log:

...
[INFO] SignServer-Test-AdminWS ............................ SKIPPED
[INFO] SignServer-Test-System ............................. SKIPPED
[INFO] SignServer-Test-Random ............................. SKIPPED
[INFO] SignServer-Test-Performance ........................ SKIPPED
[INFO] SignServer-Test-ClientWS ........................... SKIPPED
[INFO] SignServer-Doc-web ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.623 s
[INFO] Finished at: 2024-05-19T16:35:29+06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SignServer-Common: Could not resolve dependencies for project org.signserver:SignServer-Common:jar:6.2.1.Alpha1-SNAPSHOT: The following artifacts could not be resolved: com.keyfactor:servicemanifestbuilder:jar:1.0.2 (absent): Could not find artifact com.keyfactor:servicemanifestbuilder:jar:1.0.2 in cefdigital (https://ec.europa.eu/cefdigital/artifact/content/repositories/esignaturedss/) -> [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 full debug logging.
[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> -rf :SignServer-Common

r-shafi avatar May 19 '24 10:05 r-shafi

I think you need to run:

./bin/ant init from the signserver directory before building

mlundblad avatar May 20 '24 07:05 mlundblad

Oh, another thing. building SignServer is still only supported with JDK 11 (we don't officially support building on JDK 17 yet, it's planed) running on JDK 17 is supported, however.

mlundblad avatar May 20 '24 08:05 mlundblad

Also, there is no need to run the update-jars-list.sh and update-projects-list.sh scripts, they are only used to update the dependency lists when new JAR dependencies has been added (in lib/ext).

mlundblad avatar May 20 '24 09:05 mlundblad

Thanks for checking this issue out. I've tried it again cleaning up my environment, removed old files, all old caches, and started again.

Environment

  • openjdk version "11.0.23" 2024-04-16
  • OpenJDK Runtime Environment (Red_Hat-11.0.23.0.9-1) (build 11.0.23+9)
  • OpenJDK 64-Bit Server VM (Red_Hat-11.0.23.0.9-1) (build 11.0.23+9, mixed mode, sharing)
  • Apache Maven 3.9.1 (Red Hat 3.9.1-3)

Steps to reproduce the behavior:

  • git clone --depth 1 https://github.com/Keyfactor/signserver-ce.git
  • cd signserver-ce/signserver
  • bin/ant init
  • cd lib
  • ./maven-install-files.sh
  • cd ..
  • mvn install

Error Output: mvn install

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:19 min
[INFO] Finished at: 2024-05-20T15:38:47+06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SignServer-Common: Could not resolve dependencies for project org.signserver:SignServer-Common:jar:6.2.1.Alpha1-SNAPSHOT: The following artifacts could not be resolved: com.keyfactor:servicemanifestbuilder:jar:1.0.2 (absent): Could not find artifact com.keyfactor:servicemanifestbuilder:jar:1.0.2 in cefdigital (https://ec.europa.eu/cefdigital/artifact/content/repositories/esignaturedss/) -> [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 full debug logging.
[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> -rf :SignServer-Common

r-shafi avatar May 20 '24 09:05 r-shafi

Reproduce in SignServer CE 7.0.0.

The root cause is that there is a dependency from x509-common-util on servicemanifestbuilder via SignServer-Common. Actually, the servicemanifestbuilder is not needed for building SignServer and I am considering this a bug in the dependency management of x509-common-util.

Quick fix in order to be able to build is to exclude that dependency:

diff --git a/signserver/modules/SignServer-Common/pom.xml b/signserver/modules/SignServer-Common/pom.xml
index a907007..bd01c5b 100644
--- a/signserver/modules/SignServer-Common/pom.xml
+++ b/signserver/modules/SignServer-Common/pom.xml
@@ -79,6 +79,12 @@
         <dependency>
             <groupId>com.keyfactor</groupId>
             <artifactId>x509-common-util</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.keyfactor</groupId>
+                    <artifactId>service-manifest-builder</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>

netmackan avatar Feb 25 '25 07:02 netmackan

I believe it should be servicemanifestbuilder, not service-manifest-builder:

        <dependency>
            <groupId>com.keyfactor</groupId>
            <artifactId>x509-common-util</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.keyfactor</groupId>
                    <artifactId>servicemanifestbuilder</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

3keyroman avatar Mar 17 '25 14:03 3keyroman