-
Notifications
You must be signed in to change notification settings - Fork 24.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eclipse fixes #10495
Eclipse fixes #10495
Changes from all commits
1a295f0
c5eaafe
cfa8caf
00780f0
5df705b
31f507f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
eclipse.preferences.version=1 | ||
encoding//src/main/java=UTF-8 | ||
encoding//src/main/resources=UTF-8 | ||
encoding//src/test/java=UTF-8 | ||
encoding//src/test/resources=UTF-8 | ||
encoding/<project>=UTF-8 | ||
encoding/rest-api-spec=UTF-8 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
eclipse.preferences.version=1 | ||
# We target Java 1.7 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.source=1.7 | ||
# Lines should be splitted at 140 chars | ||
org.eclipse.jdt.core.formatter.lineSplit=140 | ||
# Indentation is 4 spaces | ||
org.eclipse.jdt.core.formatter.tabulation.char=space | ||
org.eclipse.jdt.core.formatter.tabulation.size=4 | ||
# Configuration for NPE analysis | ||
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled | ||
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore | ||
org.eclipse.jdt.core.compiler.annotation.nullable=org.elasticsearch.common.Nullable | ||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain what it does? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I didn't notice that this had been added. According to the documentation: "When enabled, the compiler will issue an error or a warning when referring to a type with restricted access, as defined according to the access restriction specifications." The default value is "warning". I guess the version of Eclipse that originally generated these prefs didn't have that option, while mine is later and does have it. |
||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning | ||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning | ||
org.eclipse.jdt.core.compiler.problem.nullReference=warning | ||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning | ||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning | ||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning | ||
org.eclipse.jdt.core.compiler.source=1.7 | ||
org.eclipse.jdt.core.formatter.lineSplit=140 | ||
org.eclipse.jdt.core.formatter.tabulation.char=space | ||
org.eclipse.jdt.core.formatter.tabulation.size=4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something I liked with the previous layout is that I knew what these options did. It is a bit more cryptic now. You commit message mentions Eclipse Luna but I am using Luna too and I don't have the issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In all my projects the settings get listed in alphabetical order like this. I haven't done anything in Eclipse to make it do that.
The names of the settings make the meaning clear enough to me. In any case, don't most people use the UI to change these rather than manually editing the file? |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -424,6 +424,7 @@ | |
</testResource> | ||
</testResources> | ||
|
||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
|
@@ -893,6 +894,100 @@ | |
</resources> | ||
</configuration> | ||
</execution> | ||
|
||
<!-- use packaging.properties when building the .deb package --> | ||
<execution> | ||
<id>copy-resources-deb</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/generated-packaging/deb/</outputDirectory> | ||
<filters> | ||
<filter>${basedir}/src/packaging/common/packaging.properties</filter> | ||
<filter>${basedir}/src/packaging/deb/packaging.properties</filter> | ||
</filters> | ||
<resources> | ||
<resource> | ||
<directory>src/packaging/common/</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<excludes> | ||
<exclude>packaging.properties</exclude> | ||
</excludes> | ||
</resource> | ||
<resource> | ||
<directory>src/packaging/deb/</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<excludes> | ||
<exclude>packaging.properties</exclude> | ||
</excludes> | ||
</resource> | ||
<resource> | ||
<directory>${project.basedir}</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>bin/elasticsearch</include> | ||
<include>bin/elasticsearch.in.sh</include> | ||
<include>bin/plugin</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
|
||
<!-- use packaging.properties when building the .rpm package --> | ||
<execution> | ||
<id>copy-resources-rpm</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/generated-packaging/rpm/</outputDirectory> | ||
<filters> | ||
<filter>${basedir}/src/packaging/common/packaging.properties</filter> | ||
<filter>${basedir}/src/packaging/rpm/packaging.properties</filter> | ||
</filters> | ||
<resources> | ||
<resource> | ||
<directory>src/packaging/common/</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<excludes> | ||
<exclude>packaging.properties</exclude> | ||
</excludes> | ||
</resource> | ||
<resource> | ||
<directory>src/packaging/rpm/</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<excludes> | ||
<exclude>packaging.properties</exclude> | ||
</excludes> | ||
</resource> | ||
<resource> | ||
<directory>${project.basedir}</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>bin/elasticsearch</include> | ||
<include>bin/elasticsearch.in.sh</include> | ||
<include>bin/plugin</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
|
@@ -1101,57 +1196,6 @@ | |
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<!-- use packaging.properties when building the .deb package --> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-resources-deb</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/generated-packaging/deb/</outputDirectory> | ||
<filters> | ||
<filter>src/packaging/common/packaging.properties</filter> | ||
<filter>src/packaging/deb/packaging.properties</filter> | ||
</filters> | ||
<resources> | ||
<resource> | ||
<directory>src/packaging/common/</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<excludes> | ||
<exclude>packaging.properties</exclude> | ||
</excludes> | ||
</resource> | ||
<resource> | ||
<directory>src/packaging/deb/</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<excludes> | ||
<exclude>packaging.properties</exclude> | ||
</excludes> | ||
</resource> | ||
<resource> | ||
<directory>${project.basedir}</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>bin/elasticsearch</include> | ||
<include>bin/elasticsearch.in.sh</include> | ||
<include>bin/plugin</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- Rpm Packaging --> | ||
<plugin> | ||
|
@@ -1364,57 +1408,6 @@ | |
</postremoveScriptlet> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<!-- use packaging.properties when building the .rpm package --> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-resources-rpm</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/generated-packaging/rpm/</outputDirectory> | ||
<filters> | ||
<filter>src/packaging/common/packaging.properties</filter> | ||
<filter>src/packaging/rpm/packaging.properties</filter> | ||
</filters> | ||
<resources> | ||
<resource> | ||
<directory>src/packaging/common/</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<excludes> | ||
<exclude>packaging.properties</exclude> | ||
</excludes> | ||
</resource> | ||
<resource> | ||
<directory>src/packaging/rpm/</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<excludes> | ||
<exclude>packaging.properties</exclude> | ||
</excludes> | ||
</resource> | ||
<resource> | ||
<directory>${project.basedir}</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>bin/elasticsearch</include> | ||
<include>bin/elasticsearch.in.sh</include> | ||
<include>bin/plugin</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>de.thetaphi</groupId> | ||
|
@@ -1541,9 +1534,7 @@ | |
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
<pluginManagement> | ||
<plugins> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the most tricky bit to me. I'd be wary about modifying maven configuration just for eclipse. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't find any other way to make it build in Eclipse. If you're using Eclipse, how do you get rid of the error without changing this config? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess I don't have the error because I am not using the Maven integration plugin. I'll try to ping some other people who are using Eclipse to see how they do. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More specifically, I run mvn eclipse:eclipse and then import the project in Eclipse instead of expecting Eclipse to be able to understand the pom.xml through a plugin. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I'm using the Maven plugin in Eclipse and use that to generate the project. I'll try it the way you suggest and see if that helps. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generating the project with Not sure if that's because my Eclipse has the m2e plugins installed, though. I don't want to remove those since I need them for other projects. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dpursehouse after generating the eclipse files using eclipse:eclipse are you still importing the project using 'existing maven projects' in the Import dialog? You will need to instead use 'Existing Projects into Workspace' under the 'general' folder in that dialog. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @colings86 after completing nuking the project and starting again with Thanks for the help, and sorry for the noise caused by this PR. The other warning about duplicate declarations has since been fixed in e60f61d so I will close this PR. |
||
<!-- make m2e stfu --> | ||
<plugin> | ||
<groupId>org.eclipse.m2e</groupId> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we specify the encoding at the project level, shouldn't all source folders inherit it?