I'm working on solving this now. Looks like I totally missed the obvious
way to embed the plugin processor in log4j-core that Ralph was suggesting.
Basically, for default-compile, I set <proc>none</proc>. Then, I added an
execution for process-classes that does <proc>only</proc>. I'll have this
committed after I verify the tests.


On 23 April 2014 20:50, Matt Sicker <boa...@gmail.com> wrote:

> Sorry, I've been a little busy the past couple days and haven't done this
> yet. I'll be reverting it to the previous form where two of the annotations
> were copied. This shouldn't be a problem for OSGi since compiler annotation
> plugins aren't really bundles.
>
>
> On 21 April 2014 23:16, Matt Sicker <boa...@gmail.com> wrote:
>
>> Yeah. Tomorrow, I'm going to look into trying to add the annotation
>> processor to log4j-core. If that doesn't work for log4j-core, then I'll
>> just add the maven-exec-plugin for core. I should have a solution within
>> the next couple days (or at least a revert to using the exec plugin in core
>> for now until I can figure out how to use the plugin in the same module
>> it's located).
>>
>>
>> On 21 April 2014 22:10, Ralph Goers <rgo...@apache.org> wrote:
>>
>>> Matt, Will you be making this change soon? I consider this a blocker for
>>> the next release.
>>>
>>> Ralph
>>>
>>> On Apr 21, 2014, at 10:29 AM, Ralph Goers <ralph.go...@dslextreme.com>
>>> wrote:
>>>
>>> Then go back to using the exec plugin for core if you can’t get it to
>>> work.
>>>
>>> Ralph
>>>
>>> On Apr 21, 2014, at 9:58 AM, Matt Sicker <boa...@gmail.com> wrote:
>>>
>>> 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>
>>>
>>>
>>>
>>
>>
>> --
>> Matt Sicker <boa...@gmail.com>
>>
>
>
>
> --
> Matt Sicker <boa...@gmail.com>
>



-- 
Matt Sicker <boa...@gmail.com>

Reply via email to