You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2021/03/27 11:08:18 UTC

[lucene] branch main updated: Improvement for LUCENE-9881 (#46): Completely disable Eclipse plugins's eclipseJdt task and replace by owur own just copying the filtered config files. This now works correctly with inputs/outputs.

This is an automated email from the ASF dual-hosted git repository.

uschindler pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new 3538709  Improvement for LUCENE-9881 (#46): Completely disable Eclipse plugins's eclipseJdt task and replace by owur own just copying the filtered config files. This now works correctly with inputs/outputs.
3538709 is described below

commit 3538709269fedfc349f06d8486bee71540329fbb
Author: Uwe Schindler <us...@apache.org>
AuthorDate: Sat Mar 27 12:08:12 2021 +0100

    Improvement for LUCENE-9881 (#46): Completely disable Eclipse plugins's eclipseJdt task and replace by owur own just copying the filtered config files. This now works correctly with inputs/outputs.
---
 gradle/ide/eclipse.gradle | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/gradle/ide/eclipse.gradle b/gradle/ide/eclipse.gradle
index e24bdfb..0a5b608 100644
--- a/gradle/ide/eclipse.gradle
+++ b/gradle/ide/eclipse.gradle
@@ -73,27 +73,31 @@ configure(rootProject) {
     }
   }
 
-  eclipseJdt {
+  task luceneEclipseJdt(type: Sync) {
     def errorMode = project.propertyOrDefault('eclipse.errors','warning');
     def ecjLintFile = rootProject.file('gradle/validation/ecj-lint/ecj.javadocs.prefs');
     
+    description = 'Generates the Eclipse JDT settings file.'
+    
     inputs.file(ecjLintFile)
     inputs.property('errorMode', errorMode)
   
+    from rootProject.file("${resources}/dot.settings")
+    into rootProject.file(".settings")
+    filter(ReplaceTokens, tokens: [
+      'ecj-lint-config': ecjLintFile.getText('UTF-8').replaceAll(/=error\b/, '=' + errorMode)
+    ])
+    filteringCharset = 'UTF-8'
+    
     doLast {
-      def ecjLintConfig = ecjLintFile.getText('UTF-8')
-        .replaceAll(/=error\b/, '=' + errorMode)
-      project.sync {
-        from rootProject.file("${resources}/dot.settings")
-        into rootProject.file(".settings")
-        filter(ReplaceTokens, tokens: [
-          'ecj-lint-config': ecjLintConfig
-        ])
-        filteringCharset = 'UTF-8'
-      }
       logger.lifecycle('Eclipse config written with ECJ errors configured as {}. Change by passing -Peclipse.errors=ignore/warning/error.', errorMode)
     }
   }
+  
+  eclipseJdt {
+    enabled = false    
+    dependsOn 'luceneEclipseJdt'
+  }
 }
 
 public class LibEntry implements ClasspathEntry {