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

Failure to find io.openliberty.tools:liberty-maven-app-parent:pom:${project.version} #1135

Closed
kgibm opened this issue May 10, 2021 · 4 comments · Fixed by #1136
Closed

Failure to find io.openliberty.tools:liberty-maven-app-parent:pom:${project.version} #1135

kgibm opened this issue May 10, 2021 · 4 comments · Fixed by #1136

Comments

@kgibm
Copy link
Member

kgibm commented May 10, 2021

Using the liberty-archetype-webapp archtype instructions with the latest release of 3.3.4 doesn't work:

kevin@Kevins-MBP helloworld_microprofile $ mvn archetype:generate -DarchetypeGroupId=io.openliberty.tools -DarchetypeArtifactId=liberty-archetype-webapp -DarchetypeVersion=3.3.4 -DgroupId=test -DartifactId=test -Dversion=1.0-SNAPSHOT -B
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] >>> maven-archetype-plugin:3.2.0:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO] 
[INFO] <<< maven-archetype-plugin:3.2.0:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO] 
[INFO] 
[INFO] --- maven-archetype-plugin:3.2.0:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] Archetype repository not defined. Using the one from [io.openliberty.tools:liberty-archetype-webapp:3.3.5-M1] found in catalog remote
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: liberty-archetype-webapp:3.3.4
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: test
[INFO] Parameter: artifactId, Value: test
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: test
[INFO] Parameter: packageInPathFormat, Value: test
[INFO] Parameter: package, Value: test
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: libertyPluginVersion, Value: ${project.version}
[INFO] Parameter: runtimeVersion, Value: [20.0.0.8,)
[INFO] Parameter: runtimeArtifactId, Value: openliberty-runtime
[INFO] Parameter: groupId, Value: test
[INFO] Parameter: runtimeGroupId, Value: io.openliberty
[INFO] Parameter: artifactId, Value: test
[INFO] Project created from Archetype in dir: /Users/kevin/git/helloworld_microprofile/test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.588 s
[INFO] Finished at: 2021-05-10T12:11:50-07:00
[INFO] ------------------------------------------------------------------------
kevin@Kevins-MBP helloworld_microprofile $ cd test
kevin@Kevins-MBP test $ mvn clean install
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for test:test:1.0-SNAPSHOT: Failure to find io.openliberty.tools:liberty-maven-app-parent:pom:${project.version} 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 wrong local POM @ line 8, column 13
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project test:test:1.0-SNAPSHOT (/Users/kevin/git/helloworld_microprofile/test/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for test:test:1.0-SNAPSHOT: Failure to find io.openliberty.tools:liberty-maven-app-parent:pom:${project.version} 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 wrong local POM @ line 8, 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
@cherylking
Copy link
Member

@kgibm Does it not prompt you for the libertyPluginVersion ? I am trying to recreate, and I get a prompt for libertyPluginVersion. If I enter a valid value such as 3.3.4, it works fine. If I just hit Enter, then I see the problem you reported above. I am looking into why the ${project.version} does not get resolved for later versions (it does get resolved for 3.2.3). But wanted to see if you are able to specify a valid value as a work around.

@kgibm
Copy link
Member Author

kgibm commented May 11, 2021

@cherylking Ah, no, I was running in batch mode (-B). Adding -DlibertyPluginVersion=3.3.4 worked, thanks!

@cherylking
Copy link
Member

@cherylking
Copy link
Member

Issue #929 and PR #931 are related to this and I think fixed one problem and introduced another. The filtering was removed when it should have been fixed. It was needed for the proper variable substituion.

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

Successfully merging a pull request may close this issue.

2 participants