com.github.veithen.maven:eclipse-settings-maven-plugin

Parent POM for com.github.veithen

License

License

Categories

Categories

Eclipse Development Tools IDE Maven Build Tools CLI User Interface
GroupId

GroupId

com.github.veithen.maven
ArtifactId

ArtifactId

eclipse-settings-maven-plugin
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Parent POM for com.github.veithen
Project URL

Project URL

https://github.com/veithen/eclipse-settings-maven-plugin
Source Code Management

Source Code Management

https://github.com/veithen/eclipse-settings-maven-plugin/tree/master

Download eclipse-settings-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.veithen.maven</groupId>
    <artifactId>eclipse-settings-maven-plugin</artifactId>
    <version>0.2.0</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.0
org.apache.maven : maven-core jar 3.0
org.sonatype.plexus : plexus-build-api jar 0.0.7

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5.1

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter jar 5.6.2
com.google.truth : truth jar 1.0.1

Project Modules

There are no modules declared in this project.

eclipse-settings-maven-plugin

Applies per-project Eclipse settings to Maven projects. The most common use cases is to configure the Java code formatter to conform to the code style in use in the project.

There are two key differences with other similarly named Maven plugins:

  • The plugin sets individual properties instead of replacing entire preference files. This is important for the org.eclipse.jdt.core bundle because its preferences contain compiler settings as well as the code formatter configuration. The compiler settings are generated by M2E based on the maven-compiler-plugin configuration. They must not be overwritten when applying code formatter settings.

  • The settings are configured directly in the POM (typically in a parent POM) instead of a separate settings JAR.

Usage

<plugin>
    <groupId>com.github.veithen.maven</groupId>
    <artifactId>eclipse-settings-maven-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>apply</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <bundles>
            <bundle>
                <symbolicName>org.eclipse.jdt.core</symbolicName>
                <properties>
                    <property>
                        <name>org.eclipse.jdt.core.formatter.comment.line_length</name>
                        <value>100</value>
                    </property>
                    <property>
                        <name>org.eclipse.jdt.core.formatter.lineSplit</name>
                        <value>100</value>
                    </property>
                    <property>
                        <name>org.eclipse.jdt.core.formatter.tabulation.char</name>
                        <value>space</value>
                    </property>
                    <property>
                        <name>org.eclipse.jdt.core.formatter.indentation.size</name>
                        <value>4</value>
                    </property>
                </properties>
            </bundle>
        </bundles>
    </configuration>
</plugin>

Versions

Version
0.2.0
0.1