I was using the plugin processor in core to generate the Log4j2plugins.dat file. I'm not sure how well it works to have a plugin processor in the same module that you're using the processor on. That works much more easily in an Ant environment, but Maven doesn't seem to like it. I had enough hassle getting the log4j-plugin-processor unit tests to work with the processor.
On 21 April 2014 06:26, Ralph Goers <rgo...@apache.org> wrote: > Here is another option. Move the processor into core. Then invoke the > compiler once for just the plugin stuff and then again for everything (or > everything else). Then the second invocation should have the plugin > processor available. > > Ralph > > On Apr 21, 2014, at 5:13 AM, Ralph Goers <rgo...@apache.org> wrote: > > I thought I said how. Plugin processor is dependent on core and core does > not use the plugin processor. > > Ralph > > On Apr 21, 2014, at 12:06 AM, Matt Sicker <boa...@gmail.com> wrote: > > Oh. Well, in that case, log4j-plugin-processor needs to be provided-scope, > right? > > I can't think of a good way to do this without introducing circular > dependencies or duplicating annotations across both modules. > > > On 21 April 2014 00:22, Ralph Goers <ralph.go...@dslextreme.com> wrote: > >> <sigh> >> >> I thought we had agreed that the plugin processor would only be a compile >> time dependency for things building plugins. I believe this now makes the >> additional jar a runtime dependency, which was what we said we didn’t want. >> >> Ralph >> >> Begin forwarded message: >> >> *From: *mattsic...@apache.org >> *Subject: **svn commit: r1588809 - in /logging/log4j/log4j2/trunk: >> log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/ >> log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/* >> *Date: *April 20, 2014 at 10:57:31 AM PDT >> *To: *comm...@logging.apache.org >> *Reply-To: *d...@logging.apache.org >> >> Author: mattsicker >> Date: Sun Apr 20 17:57:31 2014 >> New Revision: 1588809 >> >> URL: http://svn.apache.org/r1588809 >> Log: >> Move the rest of the plugin annotations. >> >> - All the @PluginFoo annotations are now housed in the >> log4j-plugin-processor module. >> - log4j-core already depends on this :) >> >> Added: >> >> >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginAttribute.java >> - copied unchanged from r1588797, >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginAttribute.java >> >> >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginConfiguration.java >> - copied unchanged from r1588797, >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginConfiguration.java >> >> >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginElement.java >> - copied unchanged from r1588797, >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginElement.java >> >> >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginFactory.java >> - copied unchanged from r1588797, >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginFactory.java >> >> >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginNode.java >> - copied unchanged from r1588797, >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginNode.java >> >> >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginValue.java >> - copied unchanged from r1588797, >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginValue.java >> >> >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java >> - copied, changed from r1588797, >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java >> >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/package-info.java >> (with props) >> Removed: >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginAliases.java >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginAttribute.java >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginConfiguration.java >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginElement.java >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginFactory.java >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginNode.java >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginValue.java >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java >> >> >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/package-info.java >> >> Copied: >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java >> (from r1588797, >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java) >> URL: >> http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java?p2=logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java&p1=logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java&r1=1588797&r2=1588809&rev=1588809&view=diff >> >> ============================================================================== >> --- >> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java >> (original) >> +++ >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/SensitivePluginAttribute.java >> Sun Apr 20 17:57:31 2014 >> @@ -1,12 +1,12 @@ >> /* >> * Licensed to the Apache Software Foundation (ASF) under one or more >> - * contributor license agreements. See the NOTICE file distributed with >> + * contributor license agreements. See the NOTICE file distributed with >> * this work for additional information regarding copyright ownership. >> * The ASF licenses this file to You under the Apache License, Version 2.0 >> * (the "License"); you may not use this file except in compliance with >> - * the License. You may obtain a copy of the License at >> + * the License. You may obtain a copy of the License at >> * >> - * http://www.apache.org/licenses/LICENSE-2.0 >> + * http://www.apache.org/licenses/LICENSE-2.0 >> * >> * Unless required by applicable law or agreed to in writing, software >> * distributed under the License is distributed on an "AS IS" BASIS, >> @@ -27,7 +27,7 @@ import java.lang.annotation.Target; >> * and instead should be hashed. >> * >> * @see org.apache.logging.log4j.core.helpers.NameUtil#md5(String) MD5 >> - * @see PluginAttribute >> + * @see org.apache.logging.log4j.core.config.plugins.PluginAttribute >> */ >> @Retention(RetentionPolicy.RUNTIME) >> @Target(ElementType.PARAMETER) >> >> Added: >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/package-info.java >> URL: >> http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/package-info.java?rev=1588809&view=auto >> >> ============================================================================== >> --- >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/package-info.java >> (added) >> +++ >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/package-info.java >> Sun Apr 20 17:57:31 2014 >> @@ -0,0 +1,21 @@ >> +/* >> + * Licensed to the Apache Software Foundation (ASF) under one or more >> + * contributor license agreements. See the NOTICE file distributed with >> + * this work for additional information regarding copyright ownership. >> + * The ASF licenses this file to You under the Apache License, Version >> 2.0 >> + * (the "License"); you may not use this file except in compliance with >> + * the License. You may obtain a copy of the License at >> + * >> + * http://www.apache.org/licenses/LICENSE-2.0 >> + * >> + * Unless required by applicable law or agreed to in writing, software >> + * distributed under the License is distributed on an "AS IS" BASIS, >> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or >> implied. >> + * See the License for the specific language governing permissions and >> + * limitations under the License. >> + */ >> + >> +/** >> + * Annotations for Log4j 2 plugins. >> + */ >> +package org.apache.logging.log4j.core.config.plugins; >> \ No newline at end of file >> >> Propchange: >> logging/log4j/log4j2/trunk/log4j-plugin-processor/src/main/java/org/apache/logging/log4j/core/config/plugins/package-info.java >> >> ------------------------------------------------------------------------------ >> svn:eol-style = native >> >> >> >> > > > -- > Matt Sicker <boa...@gmail.com> > > -- Matt Sicker <boa...@gmail.com>