[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17751978#comment-17751978 ] Julian Reschke commented on OAK-10288: -- I'm not convinced that doing this is actually worth the effort. Note we'd need to define the release process etc. > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17751975#comment-17751975 ] Manfred Baedke commented on OAK-10288: -- Yes, just how it was done with Guava or any other external dependency, which it actually is. I agree that it wouldn't be worth the effort. I guess we should live with the tiny issue. > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17751973#comment-17751973 ] Julian Reschke commented on OAK-10288: -- bq. One way to solve it: use released version of the shaded jar for the dependencies of the other subprojects. I guess that even makes sense, the shaded jar only needs to change when the Guave version changes. That would be equivalent to releasing it independently. There are two drawbacks with that: 1. Additional complexity 2. We'd need a mechanism to ensure that all Oak subprojects actually use the same version. > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17751971#comment-17751971 ] Manfred Baedke commented on OAK-10288: -- One way to solve it: use released version of the shaded jar for the dependencies of the other subprojects. > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17751950#comment-17751950 ] Manfred Baedke commented on OAK-10288: -- To solve this, I think we'd have to attach the shade execution to the compile phase and and unpack the bundle afterwards. > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17751939#comment-17751939 ] Manfred Baedke commented on OAK-10288: -- [~reschke], That is reasonable. When the compile phase runs in the subproject directory, maven may assume that the dependencies are available in the repo. When it's run in the parent directory, it has to assume that the oak-shaded-guava bundle hasn't been installed yet. > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17735230#comment-17735230 ] Julian Reschke commented on OAK-10288: -- So the difference is that "mvn test" in the subproject pulls the shaded-guava jar from the local M2 repo, while when run from the reactor pom, it adds "oak-shaded-guava/target/classes" to the class path. And that folder does not contain any class files. (Why?) > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17735213#comment-17735213 ] Julian Reschke commented on OAK-10288: -- So, the transitive dependency is fixed, but the problem stays. "git bisect" finds that it exists since we switched oak-commons to shaded-guava (OAK-10179). This may actually be not specific to oak-commons; it just happens to be early in the build order. > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17733049#comment-17733049 ] Marcel Reutegger commented on OAK-10288: Created OAK-10307 for the transitive dependency issue with oak-shaded-guava. > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17733030#comment-17733030 ] Julian Reschke commented on OAK-10288: -- It's not supposed to do that :-) > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17733026#comment-17733026 ] Marcel Reutegger commented on OAK-10288: It doesn't really explain the different behaviour, but oak-commons still has an undeclared dependency to Guava 15. {noformat} mvn dependency:analyze -pl :oak-commons {noformat} says: {noformat} [INFO] --- dependency:3.4.0:analyze (default-cli) @ oak-commons --- [WARNING] Used undeclared dependencies found: [WARNING]ch.qos.logback:logback-core:jar:1.2.10:test [WARNING]org.hamcrest:hamcrest-core:jar:1.3:test [WARNING]com.google.guava:guava:jar:15.0:compile {noformat} Hmm, it is a transitive dependency through oak-shaded-guava. {noformat} $ mvn dependency:tree -pl :oak-commons [INFO] Scanning for projects... [INFO] [INFO] -< org.apache.jackrabbit:oak-commons >-- [INFO] Building Oak Commons 1.53-SNAPSHOT [INFO] from pom.xml [INFO] ---[ bundle ]--- [INFO] [INFO] --- dependency:3.4.0:tree (default-cli) @ oak-commons --- [INFO] org.apache.jackrabbit:oak-commons:bundle:1.53-SNAPSHOT [INFO] +- org.osgi:org.osgi.annotation:jar:6.0.0:provided [INFO] +- org.slf4j:slf4j-api:jar:1.7.36:compile [INFO] +- org.jetbrains:annotations:jar:18.0.0:provided [INFO] +- commons-io:commons-io:jar:2.11.0:compile [INFO] +- org.apache.jackrabbit:jackrabbit-jcr-commons:jar:2.20.10:compile [INFO] +- org.apache.jackrabbit:oak-shaded-guava:jar:1.53-SNAPSHOT:compile [INFO] | \- com.google.guava:guava:jar:15.0:compile [INFO] +- junit:junit:jar:4.13.1:test [INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test [INFO] +- ch.qos.logback:logback-classic:jar:1.2.10:test [INFO] | \- ch.qos.logback:logback-core:jar:1.2.10:test [INFO] +- org.apache.commons:commons-math3:jar:3.6.1:test [INFO] +- org.apache.commons:commons-lang3:jar:3.12.0:test [INFO] +- org.mockito:mockito-core:jar:4.11.0:test [INFO] | +- net.bytebuddy:byte-buddy:jar:1.12.19:test [INFO] | +- net.bytebuddy:byte-buddy-agent:jar:1.12.19:test [INFO] | \- org.objenesis:objenesis:jar:3.3:test [INFO] \- org.lz4:lz4-java:jar:1.8.0:test {noformat} Wouldn't it be better if oak-shaded-guava doesn't leak native guava 15? > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (OAK-10288) mvn test for oak-commons fails in top level directory, but not in project directory
[ https://issues.apache.org/jira/browse/OAK-10288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17732015#comment-17732015 ] Julian Reschke commented on OAK-10288: -- [~kwin] - as a Maven expert, do you have some idea what's wrong here? > mvn test for oak-commons fails in top level directory, but not in project > directory > --- > > Key: OAK-10288 > URL: https://issues.apache.org/jira/browse/OAK-10288 > Project: Jackrabbit Oak > Issue Type: Test > Components: commons >Reporter: Manfred Baedke >Priority: Minor > > While > {code:java} > mvn clean install{code} > is running fine, > {code:java} > mvn test{code} > is failing due to > {code:java} > java.lang.ClassNotFoundException: > org.apache.jackrabbit.guava.common.collect.Sets{code} > , but only when run in the top level directory. It will succeed when run in > the oak-commons project directory. > -- This message was sent by Atlassian Jira (v8.20.10#820010)