twitter / twitter-korean-text

Korean tokenizer
Apache License 2.0
857 stars 172 forks source link

Trying to build using Scala IDE (Scala version: 2.12.3) #116

Open scorpionhiccup opened 6 years ago

scorpionhiccup commented 6 years ago

On trying to build the twitter-korean-text project,

I get the following error(2):

Other than the initial library code, I installed m2scala, and am using scalatest version 2.2.6 (which is for 2.12 scala versions).

What am I doing wrong?

Updated pom.xml:

<!-- Twitter Korean Text - Scala library to process Korean text Copyright 
    2014 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); 
    you may not use this file except in compliance with the License. You may 
    obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 
    Unless required by applicable law or agreed to in writing, software distributed 
    under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 
    OR CONDITIONS OF ANY KIND, either express or implied. See the License for 
    the specific language governing permissions and limitations under the License. -->

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.twitter.penguin</groupId>
    <artifactId>korean-text</artifactId>
    <packaging>jar</packaging>
    <version>4.4.5-SNAPSHOT</version>
    <name>Korean Text Processing Utilities</name>
    <url>https://github.com/twitter/twitter-korean-text</url>
    <description>Scala library to process Korean text</description>
    <inceptionYear>2014</inceptionYear>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/twitter/twitter-korean-text</url>
        <connection>scm:git:https://github.com/twitter/twitter-korean-text.git</connection>
        <developerConnection>scm:git:git@github.com:twitter/twitter-korean-text.git
    </developerConnection>
        <tag>korean-text-4.4.4</tag>
    </scm>
    <prerequisites>
        <maven>3.0.4</maven>
    </prerequisites>
    <developers>
        <developer>
            <id>nlpenguin</id>
            <name>Hohyon Ryu</name>
            <url>https://twitter.com/nlpenguin</url>
        </developer>
    </developers>
    <issueManagement>
        <url>https://www.github.com/twitter/twitter-korean-text/issues</url>
        <system>Github Issues</system>
    </issueManagement>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <scala.version>2.12.3</scala.version>
        <scoverage.plugin.version>1.0.4</scoverage.plugin.version>
        <encoding>UTF-8</encoding>
    </properties>
    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>com.twitter</groupId>
            <artifactId>twitter-text</artifactId>
            <version>1.11.1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
            <version>1.5.8</version>
            <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.scalatest/scalatest -->
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.12.0-M4</artifactId>
            <version>2.2.6</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <reporting>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>3.2.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.7</version>
            </plugin>
            <plugin>
                <groupId>org.scoverage</groupId>
                <artifactId>scoverage-maven-plugin</artifactId>
                <version>${scoverage.plugin.version}</version>
                <configuration>
                    <excludedPackages>com.twitter.penguin.korean.qa</excludedPackages>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-publish-plugin</artifactId>
                    <version>1.0</version>
                    <configuration>
                        <content>${project.reporting.outputDirectory}</content>
                        <checkinComment>Publishing Site Docs for
                            ${project.artifactId}:${project.version}
                        </checkinComment>
                        <skipDeletedFiles>true</skipDeletedFiles>
                        <pubScmUrl>scm:git:git@github.com:twitter/twitter-korean-text.git</pubScmUrl>
                        <scmBranch>gh-pages</scmBranch>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>3.2.0</version>
                    <executions>
                        <execution>
                            <id>scala-compile-first</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>add-source</goal>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>scala-test-compile</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.18.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.1</version>
                </plugin>
                <plugin>
                    <groupId>org.scoverage</groupId>
                    <artifactId>scoverage-maven-plugin</artifactId>
                    <version>${scoverage.plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <scalaVersion>${scala.version}</scalaVersion>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>3.0.1</version>
                    <configuration>
                        <coberturaReports>
                            <param>${project.build.directory}/cobertura.xml</param>
                        </coberturaReports>
                        <sourceDirectories>
                            <param>${basedir}</param>
                        </sourceDirectories>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>release-profile</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
scorpionhiccup commented 6 years ago

I know this library is deprecated, but I have to use this library, due to dependencies. Anybody who has build this library before, pls. do help me with any kind of installation guide/steps that I can follow.

Your help would be very much appreciated.

hohyon-ryu commented 6 years ago

This seems to be a scala version conflict. I can change the scala version openkoreantext is using. Please let me know if it is needed. On Mon, Jul 30, 2018 at 9:42 AM Sharvil Katariya notifications@github.com wrote:

I know this library is deprecated, but I have to use this library, due to dependencies. Anybody who has build this library before, pls. do help me with any kind of installation guide that I can follow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/twitter/twitter-korean-text/issues/116#issuecomment-408930342, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqJ6fTcfsv5alNUkcVh5veKJO-kA19Bks5uLzd8gaJpZM4VmwxL .

-- Will Hohyon Ryu 유호현 Software Engineer at Airbnb

실리콘밸리를 그리다: https://brunch.co.kr/magazine/svillustrated