You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Steinar Bang <sb...@dod.no> on 2024/06/03 20:14:43 UTC
Removing unnecessary JUnit maven dependencies break dependencies to karaf-maven-plugin generated karaf feature repos
Does anyone know why this happens?
For some reason, this change:
https://github.com/steinarb/sampleapp/commit/9d1b1766096482b47f51651baf4b955fc3244888
Causes this dependency to break:
https://github.com/steinarb/sampleapp/blob/9d1b1766096482b47f51651baf4b955fc3244888/sampleapp.web.api/pom.xml#L40
The error message, is:
[ERROR] Failed to execute goal on project sampleapp.web.api: Could not resolve dependencies for project no.priv.bang.sampleapp:sampleapp.web.api:jar:1.0.0-SNAPSHOT: Could not find artifact no.priv.bang.sampleapp:sampleapp.backend:xml:features:1.0.0-SNAPSHOT in liquibase-github (https://maven.pkg.github.com/liquibase/liquibase) -> [Help 1]
I noticed it because I had cleared out the project's artifact from the local repo:
rm -rf ~/.m2/repository/no/priv/bang/sampleapp/
Then I noticed that the github actions build (which of course starts out
with an empty local maven repo every time) had broken on that change.
https://github.com/steinarb/sampleapp/actions/workflows/sampleapp-maven-ci-build.yml
And this is fully reproducable locally:
1. Builds from a4f698a works with a clean repo
2. Builds from 9d1b176 fails with a clean repo
Weird! Why does removing JUnit-jupiter dependencies break depdencies to
feature repositories? Makes no sense.
This is the repository, in case you would like to try:
https://github.com/steinarb/sampleapp
Builds from 9d1b176 fails for me locally (on debian 12.5 "bookworm" with
OpenJDK Java 17) and it fails on github actions.
Re: Removing unnecessary JUnit maven dependencies break dependencies to karaf-maven-plugin generated karaf feature repos
Posted by Steinar Bang <sb...@dod.no>.
>>>>> João Assunção <jo...@exploitsys.com>:
> Hi Steinar.
> I was unable to build the project until I removed the extra 'x' in the
> artifactid sample.backend pom.xml file.
> A mvn clean install runs without issues. Using JDK 20 on Linux.
Ahhhh! Thank you!
It happened here:
https://github.com/steinarb/sampleapp/commit/a4f698a6552ec5f75e2ef2766588bd11bd3dd09d
(I thought I had checked out this commit as good, but apparently I
hadn't done a very good job...?)
But that means it isn't something that has fooled me for a long time.
Re: Removing unnecessary JUnit maven dependencies break dependencies to karaf-maven-plugin generated karaf feature repos
Posted by João Assunção <jo...@exploitsys.com>.
Hi Steinar.
I was unable to build the project until I removed the extra 'x' in the
artifactid sample.backend pom.xml file.
A mvn clean install runs without issues. Using JDK 20 on Linux.
Regards
João
On Mon, Jun 3, 2024 at 9:14 PM Steinar Bang <sb...@dod.no> wrote:
> Does anyone know why this happens?
>
> For some reason, this change:
>
> https://github.com/steinarb/sampleapp/commit/9d1b1766096482b47f51651baf4b955fc3244888
>
> Causes this dependency to break:
>
> https://github.com/steinarb/sampleapp/blob/9d1b1766096482b47f51651baf4b955fc3244888/sampleapp.web.api/pom.xml#L40
>
> The error message, is:
> [ERROR] Failed to execute goal on project sampleapp.web.api: Could not
> resolve dependencies for project
> no.priv.bang.sampleapp:sampleapp.web.api:jar:1.0.0-SNAPSHOT: Could not find
> artifact
> no.priv.bang.sampleapp:sampleapp.backend:xml:features:1.0.0-SNAPSHOT in
> liquibase-github (https://maven.pkg.github.com/liquibase/liquibase) ->
> [Help 1]
>
> I noticed it because I had cleared out the project's artifact from the
> local repo:
> rm -rf ~/.m2/repository/no/priv/bang/sampleapp/
>
> Then I noticed that the github actions build (which of course starts out
> with an empty local maven repo every time) had broken on that change.
>
> https://github.com/steinarb/sampleapp/actions/workflows/sampleapp-maven-ci-build.yml
>
> And this is fully reproducable locally:
> 1. Builds from a4f698a works with a clean repo
> 2. Builds from 9d1b176 fails with a clean repo
>
> Weird! Why does removing JUnit-jupiter dependencies break depdencies to
> feature repositories? Makes no sense.
>
> This is the repository, in case you would like to try:
> https://github.com/steinarb/sampleapp
>
> Builds from 9d1b176 fails for me locally (on debian 12.5 "bookworm" with
> OpenJDK Java 17) and it fails on github actions.
>
>