0

我是 Java 新手

我已经完成了我能找到或想到的每一个可能的场景

这是一个开源代码,我为我的学习而在互联网上获得的

https://github.com/healthnlp/examples/tree/gh-pages

我试图通过 maven install / test 运行代码

从运行菜单,没有任何反应

我试图用谷歌搜索 SOF 的解决方案,但没有找到任何可以帮助我的东西

我阅读了有关 IntelliJ 和 Java 的信息,但对我来说是一种进阶方式,而且我的学习项目的时间已经不多了。

所以我希望我能在这里找到答案。

这是我使用的 IDE

在此处输入图像描述

和pom代码

<?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>org.apache.ctakes</groupId>
    <artifactId>ctakes-temporal-demo</artifactId>
    <version>4.0.0</version>
    <name>ctakes-temporal-demo</name>
    <packaging>war</packaging>
    <description></description>
    <properties>
        <ctakes.version>4.0.0</ctakes.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jettyVersion>9.2.6.v20141205</jettyVersion>
    </properties>
<repositories>
<repository>
    <id>apache.snapshots</id>
    <name>Apache Development Snapshot Repository</name>
    <url>https://repository.apache.org/content/repositories/snapshots/</url>
    <releases>
        <enabled>false</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>
</repositories>
    <dependencies>

        <!-- cTAKES module versions -->
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-type-system</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-utils</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-core</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-core-res</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-dictionary-lookup</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-dictionary-lookup-res</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-preprocessor</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-pos-tagger</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-pos-tagger-res</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-chunker</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-chunker-res</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-lvg</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>ctakes-lvg-res</artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-context-tokenizer
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-clinical-pipeline
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-ne-contexts
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-ne-contexts-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-assertion
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-assertion-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-assertion-zoner
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-assertion-zoner-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-constituency-parser
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-constituency-parser-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-coreference
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-coreference-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-drug-ner
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-drug-ner-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-side-effect
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-side-effect-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-smoking-status
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-smoking-status-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-dependency-parser
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-dependency-parser-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-relation-extractor
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                    ctakes-relation-extractor-res
                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                                        ctakes-temporal
                                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ctakes</groupId>
            <artifactId>
                                        ctakes-temporal-res
                                </artifactId>
            <version>${ctakes.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.uima</groupId>
            <artifactId>uimaj-core</artifactId>
            <version>2.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.uima</groupId>
            <artifactId>uimafit-core</artifactId>
            <version>2.1.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>9.2.10.v20150310</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <finalName>ctakes-web-client</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgument>-Xlint</compilerArgument>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jettyVersion}</version>
        <configuration>
         <systemProperties>
            <systemProperty>
              <name>ctakesversion</name>
              <value>${ctakes.version}</value>
            </systemProperty>
         </systemProperties>
        </configuration>
            </plugin>
        </plugins>
    </build>


</project>

我只想运行演示

在此处输入图像描述

4

2 回答 2

1

您正在查看的项目是设计用于在 Web 容器中运行的 Servlet 1 。因此,很自然,当您尝试在 IDE 中像普通 Java 应用程序一样运行它时,没有什么可运行的。

要运行项目,请按照index.md文件中的说明进行操作。

或者,在本地安装 Jetty 并手动将 Maven 构建生成的 WAR 文件部署到它。


1 - 我最初对您没有链接到项目的“顶部”这一事实感到困惑。

于 2019-12-08T13:48:34.533 回答
1

我看到项目中有一个 Jetty 插件。在这种情况下,您所要做的就是使用它来启动项目:

mvn jetty:run

查看文档Jetty docs

于 2019-12-08T14:56:05.280 回答