Make Eclipse / m2e plugins generate valid projects

- Get rid of .classpath, since it has no further use.
 - See for full discussion https://github.com/checkstyle/checkstyle/pull/1219
This commit is contained in:
Juan Martín Sotuyo Dodero 2015-06-18 15:33:34 -03:00 committed by Roman Ivanov
parent fe96dfe57e
commit db7dc96346
5 changed files with 7 additions and 97 deletions

View File

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="target/generated-sources/antlr">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="com/" including="**/*.java" kind="src" path="src/main/resources">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" path="src/test/resources-noncompilable">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/it/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/it/resources">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>checkstyle</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

10
pom.xml
View File

@ -316,7 +316,7 @@
<pluginExecutionFilter>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<versionRange>[4.0,)</versionRange>
<versionRange>[4.2,)</versionRange>
<goals>
<goal>antlr4</goal>
</goals>
@ -495,8 +495,11 @@
<version>${antlr4.version}</version>
<configuration>
<visitor>true</visitor>
<sourceDirectory>${basedir}/src/main/resources/com/puppycrawl/tools/checkstyle/grammars/javadoc</sourceDirectory>
<outputDirectory>${project.build.directory}/generated-sources/antlr/com/puppycrawl/tools/checkstyle/grammars/javadoc</outputDirectory>
<sourceDirectory>${basedir}/src/main/resources/</sourceDirectory>
<outputDirectory>${project.build.directory}/generated-sources/antlr/</outputDirectory>
<includes>
<include>com/puppycrawl/tools/checkstyle/grammars/javadoc/*.g4</include>
</includes>
</configuration>
<executions>
<execution>
@ -521,7 +524,6 @@
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/antlr/</source>
<source>${project.build.directory}/generated-sources/antlr/javadoc</source>
</sources>
</configuration>
</execution>

View File

@ -1,8 +1,6 @@
lexer grammar JavadocLexer;
@lexer::header {
package com.puppycrawl.tools.checkstyle.grammars.javadoc;
import java.util.*;
}
@ -402,4 +400,4 @@ HTML_COMMENT_END: '-->' -> mode(DEFAULT_MODE);
LeadingAst: LEADING_ASTERISK -> type(LEADING_ASTERISK);
Newline6: NEWLINE -> type(NEWLINE);
WhiteSpace: WS -> type(WS);
CommentChar: . -> type(CHAR);
CommentChar: . -> type(CHAR);

View File

@ -2,10 +2,6 @@ parser grammar JavadocParser;
options { tokenVocab=JavadocLexer; }
@parser::header {
package com.puppycrawl.tools.checkstyle.grammars.javadoc;
}
@parser::members {
boolean isNextJavadocTag() {
int token1 = _input.LA(2);