Keycloak build failure due to missing artifact org.keycloak:keycloak-server-feature-pack

1,920 views
Skip to first unread message

Fesenmeyer Daniel (IOC/PAU2)

unread,
Jun 29, 2021, 4:12:23 AM6/29/21
to keyclo...@googlegroups.com

Hi Keycloak developers,

 

On one of our build infrastructures, we build Keycloak with the following mvn command:

 

mvn -nsu -Pauth-server-wildfly -Pdistribution -DskipTests -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean install

 

Since Keycloak 14 was released, our build fails with the following error:

 

Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:unpack (unpack-and-inject-keycloak-server-feature-pack-licenses) on project keycloak-server-dist: Unable to find/resolve artifact.: Could not find artifact org.keycloak:keycloak-server-feature-pack:zip:15.0.0-SNAPSHOT in jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/) -> [Help 1]

 

This error occurs when the corresponding dependency does not already exist in the local maven repository, before the build is started.

I was able to fix this by adding the following dependency to distribution/server-dist/pom.xml:

 

        <dependency>

            <groupId>org.keycloak</groupId>

            <artifactId>keycloak-server-feature-pack</artifactId>

            <type>zip</type>

            <scope>provided</scope>

        </dependency>

 

 

This makes sure that the module keycloak-server-feature-pack is built before keycloak-server-dist.

 

Interestingly, the issue does not occur when we omit the auth-server-wildfly profile – because the Maven Build Order is different in this case, keycloak-server-feature-pack is then built before keycloak-server-dist.

 

Does anyone else have similar issues?

 

Our build has been inspired by the travis scripts provided in the Keycloak repo. Probably we should better switch to Github Actions? (With Github Actions, the issue does not occur, as we observed on one of our Keycloak forks on Github.)

 

Nevertheless, the missing dependency declaration is a bug imo, and I would like to provide a corresponding PR.

 

I am happy about your feedback.

 

 

Mit freundlichen Grüßen / Best regards

Daniel Fesenmeyer


Bosch IoT Permissions - Product Area User Management (IOC/PAU-PM)
Bosch.IO GmbH | Ziegelei 7 | 88090 Immenstaad | GERMANY |
www.bosch.io
Tel. +49 7545 202-360 | Telefax +49 7545 202-301 |
Daniel.F...@bosch.io

Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Dr. Aleksandar Mitrovic, Yvonne Reckling

Andrew Summers

unread,
Jul 11, 2021, 1:11:28 PM7/11/21
to Keycloak Dev
I got it to work by setting:
    export KC_VERSION=14.0.0

I don't know if that's required, but I found it while looking at this repo:

The necessary commands:
    KC_VERSION=14.0.0
    git clone https://github.com/keycloak/keycloak
    git fetch origin --tags
    git checkout $KC_VERSION
    mvn clean install -DskipTests

Andrew Summers

unread,
Jul 11, 2021, 1:12:27 PM7/11/21
to Keycloak Dev
That first line of the last block should probably include "export." Might not be required, but I forgot to add it.

Fesenmeyer Daniel (IOC/PAU2)

unread,
Jul 21, 2021, 11:11:41 AM7/21/21
to Andrew Summers, Keycloak Dev

Hi Andrew,

 

Thanks for the link and the explanation how you build Keycloak.

 

Sadly, we cannot use your setup because we have a build similar to the Keycloak travis build, which specifies the profiles “auth-server-wildfly” and “distribution” (which are not included in your example, but these are the ones which cause the build to fail).

 

As a workaround, we switched to Github Actions, which works fine so far.

 

 

Mit freundlichen Grüßen / Best regards

Daniel Fesenmeyer


Bosch IoT Permissions - Product Area User Management (IOC/PAU-PM)
Bosch.IO GmbH | Ziegelei 7 | 88090 Immenstaad | GERMANY |
www.bosch.io
Tel. +49 7545 202-360 | Telefax +49 7545 202-301 |
Daniel.F...@bosch.io

Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Dr. Aleksandar Mitrovic, Yvonne Reckling

--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/d683d54e-d3bf-4c64-b2dd-1acefb616795n%40googlegroups.com.

Nikolas Laskaris

unread,
Jul 22, 2021, 3:17:38 AM7/22/21
to Keycloak Dev
There is already an ongoing pull request about that. I assume if it eventually gets in the master, the problem will be resolved.
https://github.com/keycloak/keycloak/pull/8174
Reply all
Reply to author
Forward
0 new messages