Hi, If you want your log4j-core checkout to use changes you make in log4j-api locally, then you MUST install log4j-api in your local repository (see the mvn commands I provided). BUT...
In this case, the log4j-api changes are already in git master. If you want to make sure you have the latest SNAPSHOT version of jars, you can force Maven to update with the -U option: mvn -U clean test -pl log4j-core -Dtest=AbstractStringLayoutTest You should _not_ need to build log4j-api since the length() change is already in git master. I forgot that we already had the log4j-api change in git master, so I am sorry for that mixup. In my case, I have everything checked out and built locally. I build and install log4j-api, then test log4j-core (all on the command line), then there is no downloading of log4j-api because what I have locally is the newer than anything and Maven is not checking remotely for a newer version. If I waited longer, it is possible that Maven might pick a version from a remote repo, I am not sure if Maven works that way. This should not matter in this case since the log4j-api changes are already in git master and therefore should be reflected in any modules downloaded remotely. Now here is another issue: Over the weekend, our CI system went through a major upgrade and we've had build failures. Maybe that causes old versions to still be served. To avoid any potential issues, I just deployed a fresh log4j-api to the SNAPSHOT repo ( https://repository.apache.org/content/repositories/snapshots/) Gary On Mon, Jul 17, 2017 at 9:05 AM, xnslong <g...@git.apache.org> wrote: > Github user xnslong commented on the issue: > > https://github.com/apache/logging-log4j2/pull/92 > > After this failure, could you please check your local maven repository > for the log4j-api-2.9-SNAPSHOT version, decompile the jar and check the > StringBuilders class. After I got the failure, I found it is not compiled > from my code. > > I didn't check the command I provided above, I just wrote it on my > experience. My point is that the two modules may have to be compiled in > only 1 command. For me, my settings for maven will download the dependent > SNAPSHOT artifacts every time I build a module, so even when I installed > the SNAPSHOT version, it will be rewritten when I try to build the other > module. I'm not sure what's your settings, so I suggest to check the jar > file in the repository. > > ```java > public static void trimToMaxSize(final StringBuilder stringBuilder, > final int maxSize) { > if (stringBuilder != null && stringBuilder.capacity() > maxSize) { > // I modified this line, but I found it remains unchanged and still check > the stringBuilder.length() in the decompiled code. > stringBuilder.setLength(maxSize); > stringBuilder.trimToSize(); > } > } > ``` > > > --- > If your project is set up for it, you can reply to this email and have your > reply appear on GitHub as well. If your project does not have this feature > enabled and wishes so, or if the feature is enabled but not working, please > contact infrastructure at infrastruct...@apache.org or file a JIRA ticket > with INFRA. > --- >