[ https://issues.apache.org/jira/browse/LUCENE-9411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17142809#comment-17142809 ]
Dawid Weiss commented on LUCENE-9411: ------------------------------------- For gradle-only I don't think we need to care about the license. We're not using it for anything other than compilation (so that compiler can resolve annotation signatures). This isn't distributed or used at runtime, no license file or notice is needed. {quote}What's the magic for getting a distribution package in Gradle? I tried these: {quote} The distribution package should be assembled with: {code:java} gradlew -p solr/packaging assemble {code} {quote}and nowhere in the tree, even after exploding the war file is there any reference to spotbugs/findbugs or error_prone. They're in my gradle cache of course, but you said "don't look there" {quote} These are not in the distribution because they shouldn't be. It's a compileOnly dependency and these are not exported by projects that declare them (and so are not collected to the distribution). {quote}There'd still be some cleanup, for instance "gradlew check" is complaining about checksums and license files. {quote} Any hack like this one is going to be a headache and liability for the future, sigh. I attach a patch that does what is needed, I think. I only include three libraries: com.google.errorprone:error_prone_annotations com.google.code.findbugs:jsr305 com.google.code.findbugs:annotations Don't know (and didn't check) if they overlap or are replacements of each other. I wouldn't worry about keeping these in sync with their original dependencies - we just silence javac from emitting false warnings, that's it. {quote}1> we forget about ant. {quote} I am not going to work on ant build so I don't care much. See and check if the attached patch works. Note it required minor adjustments to jar-checks that have to go in as a whole to work. > Fail complation on warnings > --------------------------- > > Key: LUCENE-9411 > URL: https://issues.apache.org/jira/browse/LUCENE-9411 > Project: Lucene - Core > Issue Type: Improvement > Components: general/build > Reporter: Erick Erickson > Assignee: Erick Erickson > Priority: Major > Labels: build > Attachments: LUCENE-9411.patch, LUCENE-9411.patch, LUCENE-9411.patch, > annotations-warnings.patch > > > Moving this over here from SOLR-11973 since it's part of the build system and > affects Lucene as well as Solr. You might want to see the discussion there. > We have a clean compile for both Solr and Lucene, no rawtypes, unchecked, > try, etc. warnings. There are some peculiar warnings (things like > SuppressFBWarnings, i.e. FindBugs) that I'm not sure about at all, but let's > assume those are not a problem. Now I'd like to start failing the compilation > if people write new code that generates warnings. > From what I can tell, just adding the flag is easy in both the Gradle and Ant > builds. I still have to prove out that adding -Werrors does what I expect, > i.e. succeeds now and fails when I introduce warnings. > But let's assume that works. Are there objections to this idea generally? I > hope to have some data by next Monday. > FWIW, the Lucene code base had far fewer issues than Solr, but > common-build.xml is in Lucene. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org