I get the problem as well with Java 7 on MacoSX.
I'm not sure why the warnings disappear with Java 8 as GuardedBy does
not appear to be included in Java 8. Perhaps the warning settings are
different.

I think part of the problem is that HC Client 4.5.2 is designed to
work with core 4.4.4, not core 4.4.5.
The GuardedBy annotation was removed from core in core 4.4.5; it looks
like the references have not yet been removed in HC Client.
Reverting to core 4.4.4 should solve this.

It also looks like ph-css-4.1.5.jar was compiled using
javax.annotation.concurrent.GuardedBy. This is not standard Java, so
should be avoided for general purpose jars.
Maybe revert to a previous version?

[Note: there's a problem with the JCIP annotations: they have runtime
retention which means the JCIP jar is needed at runtime.
They should have used classfile retention which would have been fine
for use by FindBugs etc.]


On 12 October 2016 at 21:01, Philippe Mouawad
<philippe.moua...@gmail.com> wrote:
> On Wed, Oct 12, 2016 at 9:53 PM, Felix Schumacher <
> felix.schumac...@internetallee.de> wrote:
>
>> Am 12.10.2016 um 21:39 schrieb Philippe Mouawad:
>>
>>> Hi Felix,
>>> I run package-and-check with 1.7u71 or 1.7u79 and either ant-1.8.X or
>>> 1.9.7.
>>> I get the warnings.
>>>
>> Did you do a clean before?
>>
> you mean ant clean ?
> If so yes, I have just retried , I get same warnings.
>
>>
>> I ran "ant clean package-and-check" on my svn workspace and got no such
>> warnings. Tried both oracle java 1.7u80 and 1.8u101.
>>
>> I remember that I got them once, though.
>>
>> Felix
>>
>>>
>>> If I upgrade to JDK8 (ant 1.9.7) warnings disappear.
>>>
>>> Regards
>>> Philippe
>>>
>>> On Wed, Oct 12, 2016 at 8:05 PM, Felix Schumacher <
>>> felix.schumac...@internetallee.de> wrote:
>>>
>>> Am 12.10.2016 um 13:31 schrieb Philippe Mouawad:
>>>>
>>>> Hello,
>>>>> We have those warning in build:
>>>>>       [javac] Compiling 121 source files to
>>>>> /data/decathlon/workspace/jmeter_trunk/build/protocol/http
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy':
>>>>> class
>>>>> file for org.apache.http.annotation.GuardedBy not found
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/httpclient-4.5.2.
>>>>> jar(org/apache/http/impl/client/AbstractHttpClient.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/ph-css-4.1.5.jar(
>>>>> com/helger/css/reader/CSSReader.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy':
>>>>> class
>>>>> file for javax.annotation.concurrent.GuardedBy not found
>>>>>       [javac]
>>>>> /data/decathlon/workspace/jmeter_trunk/lib/ph-css-4.1.5.jar(
>>>>> com/helger/css/reader/CSSReader.class):
>>>>> warning: Cannot find annotation method 'value()' in type 'GuardedBy'
>>>>>       [javac] Note: Some input files use or override a deprecated API.
>>>>>       [javac] Note: Recompile with -Xlint:deprecation for details.
>>>>>
>>>>> Is there a way to fix it ?
>>>>>
>>>>> Have you tried to do "ant clean install"? Which java version do you use?
>>>>
>>>> Regards,
>>>>   Felix
>>>>
>>>>
>>>>
>>>>
>>>
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.

Reply via email to