I've finally found and solved the problem! It is right there in my post: -Dmaven.test.skip=true. This causes test-jar generation to be skipped and hence modules with dependencies to test-jars cannot resolve them. One should instead use -DskipTests, which will skip tests, but will still generate the test-jar.
Speaking of subtle details ruining a developer's life... Renaming <id>default-jar</id> in maven-jar-plugin configuration to something else also breaks the compilation. Though I did not further dig this down. Just don't do it. On Wed, Mar 4, 2020 at 12:51 PM Volkan Yazıcı <volkan.yaz...@gmail.com> wrote: > > Hello, > > While developing it is really difficult to keep up with the master > branch, it continuously gets broken. master and release-2.x diverge a > lot as well, hence I am sitting on the fence for whether I should base > my changes on master or release-2.x. This is my current state: > > $ git remote -v > origin g...@github.com:vy/log4j2.git (fetch) > origin g...@github.com:vy/log4j2.git (push) > upstream https://github.com/apache/logging-log4j2.git (fetch) > upstream https://github.com/apache/logging-log4j2.git (push) > $ git fetch -pP upstream > $ git rebase upstream/master > Current branch master is up to date. > $ git diff master..upstream/master > $ rm -rf ~/.m2/repository/org/apache/logging > $ ./mvnw clean package -Dmaven.test.skip=true > ... > [ERROR] Failed to execute goal on project log4j-plugins: Could not > resolve dependencies for project > org.apache.logging.log4j:log4j-plugins:jar:3.0.0-SNAPSHOT: Could not > find artifact org.apache.logging.log4j:log4j-api:jar:tests:3.0.0-SNAPSHOT > > I have checked Travis[1] and Jenkins[2], their end doesn't look bright either. > > How do you people deal with this? How do you develop? Which branch > shall I use to base JsonTemplateLayout? > > Kind regards. > > [1] https://travis-ci.org/apache/logging-log4j2/builds > [2] https://builds.apache.org/view/L/view/Logging/