Make it easier to get started with Eclipse.
This patch makes mvn eclipse:eclipse generate additional eclipse configuration files so that Eclipse: - uses Java 1.6 compliance level, - truncates lines after 140 chars, - uses 4 spaces for indentation, - automatically adds a license header when creating a new class file, - organizes imports the same way as Intellij Idea (which makes sense I guess since most of the code bas has been written with Intellij, this will prevent from having large diffs due to the fact that the order of imports has changed).
This commit is contained in:
parent
7931add154
commit
c16a46e15c
20
pom.xml
20
pom.xml
|
@ -883,6 +883,26 @@
|
|||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<additionalConfig>
|
||||
<file>
|
||||
<name>.settings/org.eclipse.jdt.core.prefs</name>
|
||||
<location>src/eclipse/dot.settings/org.eclipse.jdt.core.prefs</location>
|
||||
</file>
|
||||
<file>
|
||||
<name>.settings/org.eclipse.jdt.ui.prefs</name>
|
||||
<location>src/eclipse/dot.settings/org.eclipse.jdt.ui.prefs</location>
|
||||
</file>
|
||||
<file>
|
||||
<name>.settings/org.eclipse.core.resources.prefs</name>
|
||||
<location>src/eclipse/dot.settings/org.eclipse.core.resources.prefs</location>
|
||||
</file>
|
||||
</additionalConfig>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
Eclipse configuration files
|
||||
|
||||
You can use them by running
|
||||
mvn eclipse:clean eclipse:eclipse
|
||||
and importing the project into Eclipse (File > Import > Existing Project into
|
||||
workspace) or refreshing it (F5) if you already imported it.
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,10 @@
|
|||
eclipse.preferences.version=1
|
||||
# We target Java 1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
# 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
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue