Skip to content

Commit

Permalink
[all] Update maven pom
Browse files Browse the repository at this point in the history
  • Loading branch information
SteVio89 committed Nov 23, 2021
1 parent 7603cf9 commit db14956
Show file tree
Hide file tree
Showing 50 changed files with 4,082 additions and 2,674 deletions.
62 changes: 62 additions & 0 deletions create_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash
#
# LanguageTool, a natural language style checker
# Copyright (C) 2021 Stefan Viol (https://stevio.de)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
# USA
#
if [ $# -ne 2 ]; then
echo "Usage: `basename $0` Version Test"
echo "Examples:"
echo " ./`basename $0` 5.6.1 full"
echo " Create the release version 5.6.1 and runs all tests"
echo " ./`basename $0` 5.6.1 none"
echo " Create the release version 5.6.1 and runs no tests"
echo " ./`basename $0` 5.6.1 fae"
echo " Create the release version 5.6.1 and runs tests with fail-at-end"
echo " ./`basename $0` 5.6.1 fn"
echo " Create the release version 5.6.1 and runs tests with fail-never"
exit 1
fi

#mvn -Drevision=5.6 -P release clean package -fn
echo "Version: $1";
echo "Test: $2"

VERSION=$1
TEST=$2

case "$TEST" in
"fae" | "fn")
COMMAND="mvn -Drevision=$VERSION clean package -$TEST"
echo "$COMMAND"
$COMMAND
;;
"none")
COMMAND="mvn -Drevision=$VERSION clean package -DskipTests"
echo "$COMMAND"
$COMMAND
;;
"full")
COMMAND="mvn -Drevision=$VERSION clean package"
echo "$COMMAND"
$COMMAND
;;
*)
echo "Invalid test argument"
;;
esac
exit 0
57 changes: 57 additions & 0 deletions create_snapshot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash
#
# LanguageTool, a natural language style checker
# Copyright (C) 2021 Stefan Viol (https://stevio.de)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
# USA
#
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` Version Test"
echo "Examples:"
echo " ./`basename $0` full"
echo " Create snapshot and runs all tests"
echo " ./`basename $0` none"
echo " Create snapshot and runs no tests"
echo " ./`basename $0` fae"
echo " Create snapshot and runs tests with fail-at-end"
echo " ./`basename $0` fn"
echo " Create snapshot and runs tests with fail-never"
exit 1
fi

TEST=$1

case "$TEST" in
"fae" | "fn")
COMMAND="mvn clean package -$TEST"
echo "$COMMAND"
$COMMAND
;;
"none")
COMMAND="mvn clean package -DskipTests"
echo "$COMMAND"
$COMMAND
;;
"full")
COMMAND="mvn clean package"
echo "$COMMAND"
$COMMAND
;;
*)
echo "Invalid test argument"
;;
esac
exit 0
97 changes: 53 additions & 44 deletions languagetool-commandline/pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<?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">
<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>

<parent>
<groupId>org.languagetool</groupId>
<artifactId>languagetool-parent</artifactId>
<version>5.6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
<version>${revision}</version>
</parent>

<artifactId>languagetool-commandline</artifactId>
<url>https://www.languagetool.org</url>
<packaging>jar</packaging>
<name>LanguageTool command-line version</name>
<url>https://www.languagetool.org</url>

<licenses>
<license>
Expand All @@ -20,86 +21,59 @@
<distribution>repo</distribution>
</license>
</licenses>

<packaging>jar</packaging>

<developers>
<developer>
<name>Daniel Naber</name>
<roles><role>Maintainer</role></roles>
<roles>
<role>Maintainer</role>
</roles>
</developer>
<developer>
<name>Marcin Miłkowski</name>
<roles><role>Maintainer</role></roles>
<roles>
<role>Maintainer</role>
</roles>
</developer>
</developers>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin}</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathLayoutType>custom</classpathLayoutType>
<!-- this artifact is used in languagetool-standalone, so adapt the path accordingly: -->
<customClasspathLayout>libs/$${artifact.artifactId}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
</manifest>
<manifestEntries>
<!-- as we later unzip the language JARs (see languagetool-standalone's pom.xml), we need to add the top directory to the classpath: -->
<Class-Path>./</Class-Path>
<Main-Class>org.languagetool.commandline.Main</Main-Class>
<ComponentVersion>${project.version}</ComponentVersion>
<Implementation-Date>${maven.build.timestamp}</Implementation-Date>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.languagetool</groupId>
<artifactId>languagetool-core</artifactId>
<version>${languagetool.version}</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>org.languagetool</groupId>
<artifactId>language-all</artifactId>
<version>${languagetool.version}</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
<version>${commons.io.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>${org.slf4j.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<version>${ch.qos.logback.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<!-- see http://stackoverflow.com/questions/174560/sharing-test-code-in-maven#174670 -->
<groupId>org.languagetool</groupId>
<artifactId>languagetool-core</artifactId>
<version>${languagetool.version}</version>
<version>${revision}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Expand All @@ -111,4 +85,39 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathLayoutType>custom</classpathLayoutType>
<!-- this artifact is used in languagetool-standalone, so adapt the path accordingly: -->
<customClasspathLayout>
libs/$${artifact.artifactId}$${dashClassifier?}.$${artifact.extension}
</customClasspathLayout>
</manifest>
<manifestEntries>
<!-- as we later unzip the language JARs (see languagetool-standalone's pom.xml), we need to add the top directory to the classpath: -->
<Class-Path>./</Class-Path>
<Main-Class>org.languagetool.commandline.Main</Main-Class>
<ComponentVersion>${project.version}</ComponentVersion>
<Implementation-Date>${maven.build.timestamp}</Implementation-Date>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>true</skip>
<!-- TODO: decide if this should published to a maven-repo as well. -->
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit db14956

Please sign in to comment.