Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build jar - deps? #54

Open
lelvisl opened this issue Jul 2, 2020 · 11 comments
Open

build jar - deps? #54

lelvisl opened this issue Jul 2, 2020 · 11 comments

Comments

@lelvisl
Copy link

lelvisl commented Jul 2, 2020

how i can build jar?

git clone git@github.com:cloudtrust/keycloak-wsfed.git
cd keycloak-wsfed
mvn clean install
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/io/cloudtrust/kc-cloudtrust-module/8.0.1/kc-cloudtrust-module-8.0.1.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for io.cloudtrust:keycloak-wsfed-parent:8.0.1: Could not find artifact io.cloudtrust:kc-cloudtrust-module:pom:8.0.1 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 6, column 13
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project io.cloudtrust:keycloak-wsfed-parent:8.0.1 (/private/tmp/keycloak-wsfed/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for io.cloudtrust:keycloak-wsfed-parent:8.0.1: Could not find artifact io.cloudtrust:kc-cloudtrust-module:pom:8.0.1 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
git clone git@github.com:cloudtrust/cloudtrust-parent.git
cd cloudtrust-parent
mvn clean install
Cloning into 'cloudtrust-parent'...
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 187 (delta 2), reused 7 (delta 1), pack-reused 175
Receiving objects: 100% (187/187), 52.50 KiB | 590.00 KiB/s, done.
Resolving deltas: 100% (46/46), done.
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/keycloak/keycloak-parent/8.0.1/keycloak-parent-8.0.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/keycloak/keycloak-parent/8.0.1/keycloak-parent-8.0.1.pom (75 kB at 85 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/keycloak/testsuite/integration-arquillian-tests/8.0.1/integration-arquillian-tests-8.0.1.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for io.cloudtrust:kc-cloudtrust-testsuite:8.0.1: Could not find artifact org.keycloak.testsuite:integration-arquillian-tests:pom:8.0.1 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at no local POM @ line 5, column 13
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project io.cloudtrust:kc-cloudtrust-testsuite:8.0.1 (/private/tmp/cloudtrust-parent/kc-cloudtrust-testsuite/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for io.cloudtrust:kc-cloudtrust-testsuite:8.0.1: Could not find artifact org.keycloak.testsuite:integration-arquillian-tests:pom:8.0.1 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at no local POM @ line 5, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
@vloup
Copy link

vloup commented Jul 2, 2020

As already mentioned by #35 , you need to build cloudtrust-parent first since it is not deployed on maven central.

As @fperot74 told in the other issue, do run:

git clone git@github.com:cloudtrust/cloudtrust-parent.git
cd cloudtrust-parent
mvn clean install

Then you should be able to have this repo compile.
Feel free to come back to us if this does not solve your issue.

@fperot74
Copy link

fperot74 commented Jul 2, 2020

I'll add this in the README.md

@lelvisl
Copy link
Author

lelvisl commented Jul 2, 2020

@vloup as you see in first post, i can't build cloudtrust-parent to.

[FATAL] Non-resolvable parent POM for io.cloudtrust:kc-cloudtrust-testsuite:8.0.1: Could not find artifact org.keycloak.testsuite:integration-arquillian-tests:pom:8.0.1 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at no local POM @ line 5, column 13

@fperot74
Copy link

fperot74 commented Jul 2, 2020

Ok... Not all modules from Keycloak are built by default...
Build Keycloak with mvn install -Pconsole-ui-tests -DskipTests -Dbrowser=chrome

(hmm... that's what I have in my notes but actually, I'm not sure it make sens to specify -Dbrowser as tests are skipped)

@evilrussian
Copy link

Hi! Another problems with deps:

  1. kc-cloudtrust-module needs maven-pmd-plugin
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                </plugin>

It's here https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-pmd-plugin/
Version of plugin is not specified in pom.xml. Maven trying to get latest module.

In https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-pmd-plugin/maven-metadata.xml latest is
<latest>3.13.0</latest>

but there isnt't 3.13.0 there

  1. kc-cloudtrust-testsuite module needs io.cloudtrust:kc-cloudtrust-testsuite:8.0.1
    I found only one maven repo with it https://repository.jboss.org/nexus/content/repositories/ea/org/keycloak/testsuite/integration-arquillian-tests/

All versions are empty

@fperot74
Copy link

fperot74 commented Jul 2, 2020

  1. kc-cloudtrust-module needs maven-pmd-plugin
    Version of plugin is not specified in pom.xml. Maven trying to get latest module.

Actually, version is specified in line 30 : <version.pmd.plugin>3.12.0</version.pmd.plugin>
It overrides version 3.10.0 used in a parent POM from Keycloak

  1. kc-cloudtrust-testsuite module needs io.cloudtrust:kc-cloudtrust-testsuite:8.0.1
    I found only one maven repo with it https://repository.jboss.org/nexus/content/repositories/ea/org/keycloak/testsuite/integration-arquillian-tests/

kc-cloudtrust-testsuite needs itself ? I guess there was a confusion when copying artifacts names and you wanted to tell that kc-cloudtrust-testsuite needs org.keycloak.testsuite:integration-arquillian-tests. For that point, please check my previous comment.

@evilrussian
Copy link

Actually, version is specified in line 30 : <version.pmd.plugin>3.12.0</version.pmd.plugin>

it's my mistake. Version of maven-pmd-plugin is not set in cloudtrust-common/pom.xml, not in kc-cloudtrust-module

@fperot74
Copy link

fperot74 commented Jul 2, 2020

Sorry but I don't see any problem with PMD plugin. It works fine with maven 3.6.0...
If you run the command to build Keycloak with console-ui-tests, I should be fine

@lelvisl
Copy link
Author

lelvisl commented Jul 2, 2020

i disabled <!-- <module>keycloak-wsfed-tests</module> --> in keycloak-wsfed and <!-- <module>kc-cloudtrust-testsuite</module> --> in cloudtrust-parent and build jar.

but i don't think that it is good decision.

@fperot74
Copy link

fperot74 commented Jul 2, 2020

As previously suggested, did you try to first build the missing module from keycloak? (org.keycloak.testsuite:integration-arquillian-tests:pom)
You have to get Keycloak (8.0.1) then build with mvn install -Pconsole-ui-tests -DskipTests (Keycloak team doesn't publish this module in its processes)

If built correctly, you should be able to build keycloak-wsfed without any change

If you want to build without tests, you can build keycloak-wsfed with mvn clean install -DskipTests. You don't need to update the pom.xml (they are used to ensure that unit tests are passing but you're right: for code already merged on master, tests are supposed to have been already successfully executed in our CI)

@lelvisl
Copy link
Author

lelvisl commented Jul 2, 2020

I had tried -DskipTests, but

/tmp/keycloak-wsfed::$ mvn clean install -DskipTests                                                                                                  
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for io.cloudtrust:keycloak-wsfed-tests:8.0.1: Failure to find io.cloudtrust:kc-cloudtrust-testsuite:pom:8.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 5, column 13

Tomorrow i'll try to build module from keycloak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants