代码中的Maven下载依赖项

2019年8月3日 2点热度 0条评论

首先,我对Java很陌生

我已经下载了学习所需的开源代码。

https://ctakes.apache.org/downloads.cgi

经过一番努力,我设法编译并运行了代码。

我有一个问题,我找不到答案,希望有人可以在这里帮助我。

在Maven方面有依赖关系。

我第一次编译代码时就下载了它们,尽管这些都是项目本身的库,并且由于它们是该项目的一部分而无需下载

这是Maven窗口

这是项目代码

这是POM.XML

    <?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</artifactId>
        <version>4.0.0</version>
        <packaging>pom</packaging>
        <name>Apache cTAKES</name>
        <url>http://ctakes.apache.org</url>
        <inceptionYear>2012</inceptionYear>
        <scm>
            <!-- In child modules, Maven will append ${artifactId} to the following 
                URLs -->
            <connection>scm:svn:https://svn.apache.org/repos/asf/ctakes/tags/ctakes-4.0.0-rc3</connection>
            <developerConnection>scm:svn:https://svn.apache.org/repos/asf/ctakes/tags/ctakes-4.0.0-rc3</developerConnection>
            <url>https://svn.apache.org/repos/asf/ctakes/tags/ctakes-4.0.0-rc3</url>
        </scm>
        <issueManagement>
            <system>jira</system>
            <url>https://issues.apache.org/jira/browse/ctakes</url>
        </issueManagement>
        <ciManagement>
            <system>jenkins</system>
            <url>https://builds.apache.org/job/ctakes-trunk/</url>
        </ciManagement>
            <mailingList>
                <name>Apache cTAKES Users</name>
                <subscribe>user-subscribe@ctakes.apache.org</subscribe>
                <unsubscribe>user-unsubscribe@ctakes.apache.org</unsubscribe>
                <post>user@ctakes.apache.org</post>
                <archive>http://mail-archives.apache.org/mod_mbox/ctakes-user/</archive>
            </mailingList>

            <mailingList>
                <name>Apache cTAKES Developers</name>
                <subscribe>dev-subscribe@ctakes.apache.org</subscribe>
                <unsubscribe>dev-unsubscribe@ctakes.apache.org</unsubscribe>
                <post>dev@ctakes.apache.org</post>
                <archive>http://mail-archives.apache.org/mod_mbox/ctakes-dev/</archive>
            </mailingList>

            <mailingList>
                <name>Apache cTAKES Commits</name>
                <subscribe>commits-subscribe@ctakes.apache.org</subscribe>
                <unsubscribe>commits-unsubscribe@ctakes.apache.org</unsubscribe>
                <archive>http://mail-archives.apache.org/mod_mbox/ctakes-commits/</archive>
            </mailingList>

            <mailingList>
                <name>Apache cTAKES Notifications</name>
                <subscribe>notifications-subscribe@ctakes.apache.org</subscribe>
                <unsubscribe>notifications-unsubscribe@ctakes.apache.org</unsubscribe>
                <archive>http://mail-archives.apache.org/mod_mbox/ctakes-notifications/</archive>
            </mailingList>
        </mailingLists>
        <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>
        </properties>

        <parent>
            <groupId>org.apache</groupId>
            <artifactId>apache</artifactId>
            <version>13</version>
        </parent>

        <modules>
            <module>ctakes-gui</module>
            <module>ctakes-gui-res</module>
            <module>ctakes-utils</module>
            <module>ctakes-core</module>
            <module>ctakes-type-system</module>
            <module>ctakes-pos-tagger</module>
            <module>ctakes-chunker</module>
            <module>ctakes-preprocessor</module>
            <module>ctakes-dictionary-lookup</module>
            <module>ctakes-context-tokenizer</module>
            <module>ctakes-lvg</module>
            <module>ctakes-ne-contexts</module>
            <module>ctakes-constituency-parser</module>
            <module>ctakes-coreference</module>
            <module>ctakes-drug-ner</module>
            <module>ctakes-side-effect</module>
            <module>ctakes-smoking-status</module>
            <module>ctakes-dependency-parser</module>
            <module>ctakes-relation-extractor</module>
            <module>ctakes-assertion</module>
            <module>ctakes-assertion-zoner</module>
            <module>ctakes-temporal</module>
            <module>ctakes-clinical-pipeline</module>
            <module>ctakes-clinical-pipeline-res</module>
            <module>ctakes-distribution</module>
            <module>ctakes-regression-test</module>
            <module>ctakes-assertion-res</module>
            <module>ctakes-chunker-res</module>
            <module>ctakes-constituency-parser-res</module>
            <module>ctakes-core-res</module>
            <module>ctakes-coreference-res</module>
            <module>ctakes-dependency-parser-res</module>
            <module>ctakes-dictionary-lookup-res</module>
            <module>ctakes-lvg-res</module>
            <module>ctakes-pos-tagger-res</module>
            <module>ctakes-relation-extractor-res</module>
            <module>ctakes-side-effect-res</module>
            <module>ctakes-smoking-status-res</module>
            <module>ctakes-temporal-res</module>
            <module>ctakes-assertion-zoner-res</module>
            <module>ctakes-drug-ner-res</module>
            <module>ctakes-ne-contexts-res</module>
            <module>ctakes-template-filler</module>
            <module>ctakes-examples</module>
            <module>ctakes-examples-res</module>
            <module>ctakes-ytex-res</module>
            <module>ctakes-ytex</module>
            <module>ctakes-ytex-uima</module>
            <module>ctakes-ytex-web</module>
            <module>ctakes-dictionary-lookup-fast</module>
            <module>ctakes-dictionary-lookup-fast-res</module>
        </modules>
        <dependencyManagement>
            <dependencies>
                <!-- cTAKES third party dependency versions -->
                <!-- <dependency> <groupId>jama</groupId> <artifactId>jama</artifactId>
                    <version>1.0.2</version> </dependency> -->
                <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <version>4.11</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                    <version>1.2.17</version>
                </dependency>

                <dependency>
                    <groupId>org.apache.uima</groupId>
                    <artifactId>uimaj-core</artifactId>
                    <version>2.9.0</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.uima</groupId>
                    <artifactId>uimaj-tools</artifactId>
                    <version>2.9.0</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.uima</groupId>
                    <artifactId>uimaj-document-annotation</artifactId>
                    <version>2.9.0</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.uima</groupId>
                    <artifactId>uimafit-core</artifactId>
                    <version>2.2.0</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.opennlp</groupId>
                    <artifactId>opennlp-tools</artifactId>
                    <version>1.7.2</version>
                </dependency>
                <!--  dependency is uima 2.3 -->
                <dependency>
                    <groupId>org.apache.opennlp</groupId>
                    <artifactId>opennlp-uima</artifactId>
                    <version>1.7.2</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.opennlp</groupId>
                    <artifactId>opennlp-maxent</artifactId>
                    <version>3.0.3</version>
                </dependency>
                <!--<dependency>-->
                    <!--<groupId>org.apache.uima</groupId>-->
                    <!--<artifactId>uimaj-examples</artifactId>-->
                    <!--<version>2.9.0</version>-->
                <!--</dependency>-->
                <dependency>
                    <groupId>tw.edu.ntu.csie</groupId>
                    <artifactId>libsvm</artifactId>
                    <version>3.1</version>
                </dependency>
                <!-- import a consistent set of versions for all ClearTK modules -->
                <dependency>
                    <groupId>org.cleartk</groupId>
                    <artifactId>cleartk</artifactId>
                    <version>2.0.0</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
                <dependency>
                    <groupId>args4j</groupId>
                    <artifactId>args4j</artifactId>
                    <version>2.0.16</version>
                </dependency>
                <dependency>
                    <groupId>com.googlecode.clearnlp</groupId>
                    <artifactId>clearnlp</artifactId>
                    <version>1.3.1</version>
                </dependency>
                <!-- cTAKES module versions -->
                <dependency>
                    <groupId>org.apache.ctakes</groupId>
                    <artifactId>ctakes-gui</artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.ctakes</groupId>
                    <artifactId>ctakes-gui-res</artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.ctakes</groupId>
                    <artifactId>ctakes-examples</artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.ctakes</groupId>
                    <artifactId>ctakes-examples-res</artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
                <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-dictionary-lookup-fast</artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.ctakes</groupId>
                    <artifactId>ctakes-dictionary-lookup-fast-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-clinical-pipeline-res
                    </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.ctakes</groupId>
                    <artifactId>
                        ctakes-ytex-res
                    </artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.ctakes</groupId>
                    <artifactId>
                        ctakes-ytex
                    </artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.ctakes</groupId>
                    <artifactId>
                        ctakes-ytex-uima
                    </artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.ctakes</groupId>
                    <artifactId>
                        ctakes-ytex-web
                    </artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.ctakes</groupId>
                    <artifactId>
                        ctakes-distribution
                    </artifactId>
                    <version>${ctakes.version}</version>
                </dependency>
            </dependencies>
        </dependencyManagement>
        <build>
            <!-- It's good practice to explicitly declare versions for all plugins -->
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>com.mycila.maven-license-plugin</groupId>
                        <artifactId>maven-license-plugin</artifactId>
                        <version>1.9.0</version>
                        <configuration>
                            <header>ctakes-distribution/src/main/config/license_header.txt</header>
                            <excludes>
                                <!-- We're disabling .txt files for now because some Annotators may 
                                    not be able to handle standard comments in text files. This may break name 
                                    values pairs such as stopWords.txt -->
                                <exclude>**.txt</exclude>
                            </excludes>
                            <useDefaultMapping>false</useDefaultMapping>
                            <quiet>false</quiet>
                            <failIfMissing>false</failIfMissing>
                            <mapping>
                                <java>JAVADOC_STYLE</java>
                                <groovy>JAVADOC_STYLE</groovy>
                                <js>JAVADOC_STYLE</js>
                                <css>JAVADOC_STYLE</css>
                                <xml>XML_STYLE</xml>
                                <dtd>XML_STYLE</dtd>
                                <xsd>XML_STYLE</xsd>
                                <html>XML_STYLE</html>
                                <htm>XML_STYLE</htm>
                                <xsl>XML_STYLE</xsl>
                                <fml>XML_STYLE</fml>
                                <apt>DOUBLETILDE_STYLE</apt>
                                <properties>SCRIPT_STYLE</properties>
                                <sh>SCRIPT_STYLE</sh>
                                <!-- <txt>TEXT</txt> -->
                                <bat>BATCH</bat>
                                <cmd>BATCH</cmd>
                                <sql>DOUBLEDASHES_STYLE</sql>
                                <jsp>DYNASCRIPT_STYLE</jsp>
                                <ftl>FTL</ftl>
                                <xhtml>XML_STYLE</xhtml>
                                <vm>SHARPSTAR_STYLE</vm>
                                <jspx>XML_STYLE</jspx>
                            </mapping>
                            <properties>
                                <owner>Apache Software Foundation</owner>
                                <year>${project.inceptionYear}</year>
                                <email>dev@ctakes.apache.org</email>
                            </properties>
                            <strictCheck>true</strictCheck>
                        </configuration>
                    </plugin>                       
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>2.4</version>
                    </plugin>
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <version>2.4.1</version>
                    </plugin>
                    <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>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.7</version>
                    </plugin>
                    <plugin>
                        <artifactId>maven-eclipse-plugin</artifactId>
                        <version>2.9</version>
                    </plugin>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                    </plugin>
                    <plugin>
                        <artifactId>maven-install-plugin</artifactId>
                        <version>2.3.1</version>
                    </plugin>
                    <plugin>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.4</version>
                        <configuration>
                          <includes>
                          <!-- Resources will be copied by the assembly
                          No need for it to be inside the jar 
                            <include>**/*.class</include>
                            <include>**/types/*.xml</include>                       
                            <include>**/META-INF/**</include>
                            -->
                          </includes>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9</version>
                    </plugin>
                    <plugin>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.3</version>
                           <configuration>
                              <useReleaseProfile>false</useReleaseProfile>
                              <goals>deploy</goals>
                              <arguments>-Papache-release -DskipTests</arguments>
                              <mavenExecutorId>forked-path</mavenExecutorId> 
                            </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>2.5</version>
                    </plugin>
                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>2.8</version>
                    </plugin>               
                    <plugin>
                        <artifactId>maven-site-plugin</artifactId>
                        <version>3.1</version>
                    </plugin>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.1.2</version>
                    </plugin>
                    <!-- Maven expects tests to start or end with "Test", not "Tests", so 
                        explicitly include files ending in "Tests" -->
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.12.1</version>
                        <configuration>
                            <includes>
                                <include>**/Test*.java</include>
                                <include>**/*Test.java</include>
                                <include>**/*Tests.java</include>
                                <include>**/*TestCase.java</include>
                            </includes>
                            <argLine>-Xmx3g</argLine>
                            <forkedProcessTimeoutInSeconds>900</forkedProcessTimeoutInSeconds>
                            <additionalClasspathElements>
                                <additionalClasspathElement>ctakes-assertion-res/src/main/resources</additionalClasspathElement>                            
                                <additionalClasspathElement>ctakes-assertion-zoner-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-chunker-res/src/main/resources</additionalClasspathElement>
                         <additionalClasspathElement>ctakes-clinical-pipeline-res/src/main/resources</additionalClasspathElement>
                         <additionalClasspathElement>ctakes-constituency-parser-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-core-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-coreference-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-dependency-parser-res/src/main/resources</additionalClasspathElement>    
                                    <additionalClasspathElement>ctakes-dictionary-lookup-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-drug-ner-res/src/main/resources</additionalClasspathElement>                                                                                                                                                                                             
                                <additionalClasspathElement>ctakes-lvg-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-ne-contexts-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-pos-tagger-res/src/main/resources</additionalClasspathElement>                           
                                <additionalClasspathElement>ctakes-relation-extractor-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-side-effect-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-smoking-status-res/src/main/resources</additionalClasspathElement>
                                <additionalClasspathElement>ctakes-temporal-res/src/main/resources</additionalClasspathElement>                                                                                                                                                                                                 
                                <additionalClasspathElement>ctakes-ytex-res/src/main/resources</additionalClasspathElement>
                         <additionalClasspathElement>ctakes-dictionary-lookup-fast-res/src/main/resources</additionalClasspathElement>
                            </additionalClasspathElements>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.rat</groupId>
                        <artifactId>apache-rat-plugin</artifactId>
                        <version>0.8</version>      
                        <executions>
                            <execution>
                                <phase>verify</phase> 
                                <goals> 
                                    <goal>check</goal> 
                                </goals>                        
                                <id>default-cli</id>
                            </execution>
                        </executions>
                        <configuration> 
                                <excludes>
                                    <!-- File generated by maven-release-plugin -->
                                    <exclude>release.properties</exclude>
                                    <!-- Eclipse launch files -->
                                    <exclude>**/*.launch</exclude>
                                    <!-- Exclude target and eclipse files
                                    The default RAT ignoreEclipse doesn't work
                                    if there is a submodule that is commented out
                                    So excluding it explictly here -->
                                    <exclude>**/.classpath</exclude>
                                    <exclude>**/.project</exclude>
                                    <exclude>**/.settings/**</exclude>                                                                                                  
                                    <exclude>**/target/**</exclude>
                                    <exclude>**/MANIFEST.MF</exclude>
                                    <!-- Exclude bin/model resources -->
                                    <exclude>**/resources/models/**</exclude>                               
                                    <exclude>**/src/main/resources/**</exclude>
                                    <exclude>**/src/test/resources/**</exclude>
                                    <exclude>**/META-INF/org.uimafit/types.txt</exclude>                                
                                    <!-- Exclude test data files -->
                                    <exclude>**/data/test/**</exclude>
                                    <exclude>**/data/**</exclude>
                                    <exclude>**/output/**</exclude> 
                                    <exclude>**/sample_note.txt</exclude>                                                                                           
                                </excludes>
                            <numUnapprovedLicenses>0</numUnapprovedLicenses>                                
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.eclipse.m2e</groupId>
                        <artifactId>lifecycle-mapping</artifactId>
                        <version>1.0</version>
                        <configuration>
                            <lifecycleMappingMetadata>
                                <pluginExecutions>
                                    <pluginExecution>
                                    <!-- 
                                    This is needed to execute/unpack resources in m2e eclipse ide
                                    Currently used in the ctakes-dictionary-lookup project  
                                    -->
                                        <pluginExecutionFilter>
                                            <groupId>org.apache.maven.plugins</groupId>
                                            <artifactId>maven-dependency-plugin</artifactId>
                                            <versionRange>2.8</versionRange>
                                            <goals>
                                                <goal>unpack-dependencies</goal>
                                            </goals>
                                        </pluginExecutionFilter>
                                        <action>
                                            <execute>
                                                <runOnIncremental>true</runOnIncremental>
                                            </execute>
                                        </action>
                                    </pluginExecution>
                                    <pluginExecution>
                                    <!--
                                    Ignore the Maven remote resources plugin in Eclipse. We don't use it from Eclipse,
                                    and it causes a warning if m2e is not configured to ignore it as below.
                                    -->                             
                                        <pluginExecutionFilter>
                                            <groupId>org.apache.maven.plugins</groupId>
                                            <artifactId>maven-remote-resources-plugin</artifactId>
                                            <versionRange>[1.0.0,)</versionRange>
                                            <goals>
                                                <goal>process</goal>
                                            </goals>
                                        </pluginExecutionFilter>
                                        <action>
                                            <ignore />
                                        </action>
                                    </pluginExecution>                                                              
                                </pluginExecutions>
                            </lifecycleMappingMetadata>
                        </configuration>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
        <profiles>
            <profile>
                <id>disable-java8-doclint</id>
                <activation>
                    <jdk>[1.8,)</jdk>
                </activation>
                <properties>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </properties>
            </profile>
        </profiles>
    </project>

无论如何,我是否可以强制项目使用代码中的库,而不是从Internet下载它们?

解决方案如下:

你说

我第一次编译代码时就下载了它们,尽管这些都是项目本身的库,并且由于它们是该项目的一部分而无需下载

在Maven中,不要将外部jar放入项目目录(或git / svn存储库)中。而是,您引用一个Maven存储库(如MavenCentral),并在您的pom.xml中声明依赖项。

然后将它们下载一次并存储在本地Maven存储库中(用户目录中的标准目录为.m2/repository)。