freemarker-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Dekany <ddek...@freemail.hu>
Subject How to fix problem with @SuppressFBWarnings and Gradle (Was: [VOTE] Release Apache FreeMarker 2.3.24 (incubating))
Date Sat, 16 Apr 2016 10:30:30 GMT
TL;DR version: Anyone is interested in writing (or finding) an
javax.annotation.processing.Processor that removes @SuppressFBWarnings
annotation when we compile with javac, and integrate that with our
build?


Long version:

Compiling code that depends on FreeMarker 2.3.24 with Gradle issues a
bunch of these:

  warning: Cannot find annotation method 'value()' in type
  'SuppressFBWarnings': class file for
  edu.umd.cs.findbugs.annotations.SuppressFBWarnings not found

It turns out that it happens with the default Gradle setup as well.
Worse, the project where I ran into this has -Werror switch, which
means that compilation warnings and treated as errors. Thus the
upgrade to 2.3.24 has broken that build. So clearly, either the
SuppressFBWarnings-s will have to be removed or commented out (which
is a loss in code quality control), or somehow they have to be removed
automatically on compilation. Maybe a custom annotation processor
(javax.annotation.processing.Processor) can do that (removing
SuppressFBWarnings annotations). If that's not possible, then copying
and filter the source code is another option, though it's ugly (and
maybe will get even uglier if we switch to in FM3 Maven). Anyone is
interested in figuring this out?

-- 
Thanks,
 Daniel Dekany


Tuesday, March 22, 2016, 9:01:51 PM, David E Jones wrote:

>
> +1 (binding)
>
> Others have reviewed the various release artifacts (and my
> experience with ASF releases is now dated anyway) so I focused my
> review on testing Freemarker with a few automated test sets I have
> around. Everything ran well in these tests with hundreds of web
> pages, including significant XML transformation using a couple of large FTL macro libraries.
>
> I noticed one thing… during a build with the jar file for this
> release it I’m seeing this warning and a half dozen similar ones like it:
>
> freemarker-2.3.24-incubating.jar(freemarker/core/Environment.class):
> warning: Cannot find annotation method 'value()' in type
> 'SuppressFBWarnings': class file for
> edu.umd.cs.findbugs.annotations.SuppressFBWarnings not found
>
> I built it with the jar file in a local directory instead of the
> staging maven repo, so no POM file to grab dependencies, but looking
> at the freemarker-2.3.24-incubating.pom the dependency for this
> isn’t included there anyway. Everything built and ran just fine,
> just warnings on build. I don’t know that anything needs to be done
> about them, and I imagine adding the findbugs annotations jar file during build would
resolve these.
>
> -David
>
>
>> On 20 Mar 2016, at 16:02, Daniel Dekany <ddekany@freemail.hu> wrote:
>> 
>> Hi all,
>> 
>> Please vote on releasing FreeMarker 2.3.24-incubating! This will be
>> our first stable release (not just a Release Candidate) from the ASF.
>> If this voting passes, another similar voting will be started on
>> general@incubator.apache.org, and if that passes too, then we can
>> release this version.
>> 
>> Release Notes:
>> http://freemarker.org/builds/2.3.24-unvoted/_html/versions_2_3_24.html
>> 
>> Before proceed, you should know that FreeMarker 2.3.x, for a long
>> time, always releases a normal and a "gae" variant on the same time,
>> which are technically two independent source trees (Git branches). The
>> "gae" variant contains a few small modification in the Java source
>> code to be Google App Engine compliant, and has freemarker-gae as the
>> Maven artifact name. Otherwise the normal and the "gae" branches are
>> identical. Hence they will be voted on together.
>> 
>> The commits to be voted upon are:
>> - Normal (non-gae) variant:
>>  https://git-wip-us.apache.org/repos/asf?p=incubator-freemarker.git;a=commit;h=4a723fc1e89c3f258b00e6ee40ba3c60d076aa89
>>  Commit hash: 4a723fc1e89c3f258b00e6ee40ba3c60d076aa89
>> - "gae" variant:
>>  https://git-wip-us.apache.org/repos/asf?p=incubator-freemarker.git;a=commit;h=4b8df1fd03c21495e646ac1721734811564317f5
>>  Commit hash: 4b8df1fd03c21495e646ac1721734811564317f5
>> 
>> The artifacts to be voted upon are located here:
>> https://dist.apache.org/repos/dist/dev/incubator/freemarker/engine/2.3.24-incubating/source/
>> where the source release artifacts are:
>> - Normal (non-gae) variant:
>>  apache-freemarker-2.3.24-incubating-src.tar.gz
>> - "gae" variant:
>>  apache-freemarker-gae-2.3.24-incubating-src.tar.gz
>> 
>> See the README inside them for build instructions!
>> 
>> Release artifacts are signed with the following key:
>> https://people.apache.org/keys/committer/ddekany.asc
>> 
>> Note that for convenience, we also provide binaries:
>> https://dist.apache.org/repos/dist/dev/incubator/freemarker/engine/2.3.24-incubating/binaries/
>> and Maven artifacts in the ASF staging repository:
>> https://repository.apache.org/content/repositories/staging/org/freemarker/
>> 
>> Please try out the package and vote!
>> 
>> The vote is open for a minimum of 72 hours or until the necessary number of
>> votes (3 binding +1s) is reached.
>> 
>> [ ] +1 Release this package as Apache FreeMarker 2.3.24-incubating
>> [ ]  0 I don't feel strongly about it, but I'm okay with the release
>> [ ] -1 Do not release this package because...
>> 
>> Please add "(binding)" if your vote is binding.
>> 
>> -- 
>> Thanks,
>> Daniel Dekany
>> 
>
>


Mime
View raw message