tisoft/rsyntaxtextarea-antlr4-extension

View on GitHub
pom.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>de.tisoft.rsyntaxtextarea</groupId>
  <artifactId>rsyntaxtextarea-antlr4-extension</artifactId>
  <version>${revision}${sha1}${changelist}</version>

  <name>RSyntaxTextArea ANTLR 4 Extension</name>
  <description>An ANTLR 4 Extension for RSyntaxTextArea.</description>

  <url>https://github.com/tisoft/rsyntaxtextarea-antlr4-extension</url>
  <inceptionYear>2021</inceptionYear>

  <organization>
    <name>Markus Heberling</name>
    <url>https://markus.heberling.net</url>
  </organization>
  <licenses>
    <license>
      <name>BSD-3-Clause</name>
      <url>https://opensource.org/licenses/BSD-3-Clause</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Markus Heberling</name>
      <url>https://markus.heberling.net</url>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:tisoft/rsyntaxtextarea-antlr4-extension.git</connection>
    <developerConnection>scm:git:git@github.com:tisoft/rsyntaxtextarea-antlr4-extension.git</developerConnection>
    <tag>HEAD</tag>
    <url>scm:git:git@github.com:tisoft/rsyntaxtextarea-antlr4-extension.git</url>
  </scm>

  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <!-- CI friendly versioning-->
    <revision>local</revision>
    <sha1 />
    <changelist>-SNAPSHOT</changelist>

    <!-- build settings -->
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- dependency versions -->
    <antlr4.version>4.9.1</antlr4.version>
    <junit.version>5.7.1</junit.version>

    <!-- plugin versions -->
    <spotless.version>2.8.1</spotless.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.fifesoft</groupId>
      <artifactId>rsyntaxtextarea</artifactId>
      <version>3.1.3</version>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4-runtime</artifactId>
      <version>${antlr4.version}</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M3</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.2.5</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.ekryd.sortpom</groupId>
        <artifactId>sortpom-maven-plugin</artifactId>
        <version>2.11.0</version>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>sort</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <createBackupFile>false</createBackupFile>
          <keepBlankLines>true</keepBlankLines>
          <expandEmptyElements>false</expandEmptyElements>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>2.0.0</version>
        <executions>
          <execution>
            <id>first</id>
            <phase>process-sources</phase>
            <goals>
              <goal>update-file-header</goal>
            </goals>
            <configuration>
              <licenseName>bsd_3</licenseName>
              <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
              <emptyLineAfterHeader>true</emptyLineAfterHeader>
              <extraExtensions>
                <g4>java</g4>
              </extraExtensions>
              <includes>
                <include>**/*.java</include>
                <include>**/*.g4</include>
              </includes>
              <excludes>
                <!-- Third party code is licensed on its own.-->
                <exclude>**/third_party/**</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>${spotless.version}</version>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>apply</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <java>
            <googleJavaFormat />
          </java>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.2.5</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>ossrh</flattenMode>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.2</version>
      </plugin>
      <plugin>
        <groupId>org.antlr</groupId>
        <artifactId>antlr4-maven-plugin</artifactId>
        <version>${antlr4.version}</version>
        <executions>
          <execution>
            <id>antlr-test</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>antlr4</goal>
            </goals>
            <configuration>
              <generateTestSources>true</generateTestSources>
              <sourceDirectory>${basedir}/src/test/antlr4</sourceDirectory>
              <outputDirectory>${project.build.directory}/generated-test-sources/antlr4</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>antlr-test-thirdparty</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>antlr4</goal>
            </goals>
            <configuration>
              <sourceDirectory>${basedir}/third_party/antlr_grammars_v4</sourceDirectory>
              <outputDirectory>${project.build.directory}/generated-test-sources/antlr4/third_party</outputDirectory>
              <arguments>
                <argument>-package</argument>
                <argument>third_party</argument>
                <argument>-Xexact-output-dir</argument>
              </arguments>
              <includes>
                <include>asm/asm6502/asm6502.g4</include>
                <include>c/C.g4</include>
                <include>erlang/Erlang.g4</include>
                <include>golang/Go*.g4</include>
                <include>java/java9/Java9.g4</include>
                <include>json/JSON.g4</include>
                <include>python/python3/Python3.g4</include>
                <include>sql/mysql/Positive-Technologies/MySql*.g4</include>
                <include>xml/XML*.g4</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>copy-go-parser-base</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <concat destfile="${project.build.directory}/generated-test-sources/antlr4/third_party/GoParserBase.java">package third_party;</concat>
                <concat append="true" destfile="${project.build.directory}/generated-test-sources/antlr4/third_party/GoParserBase.java">
                  <fileset dir="${basedir}/third_party/antlr_grammars_v4/golang/Java/" includes="*" />
                </concat>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>add-demo-source</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.basedir}/third_party/RSyntaxTextArea/RSyntaxTextAreaDemo/src/main/java</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add-demo-resource</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>add-test-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>${project.basedir}/third_party/RSyntaxTextArea/RSyntaxTextAreaDemo/src/main/resources</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.6</version>
        <executions>
          <execution>
            <id>agent-for-ut</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-site</id>
            <phase>verify</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <gpgArguments>
                <arg>--batch</arg>
                <arg>--yes</arg>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.8.2</version>
            <configuration>
              <deployAtEnd>true</deployAtEnd>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>