[英]Maven Downloading Dependencies while it is in the code
Firstly, I am very new to Java首先,我对 Java 很陌生
I have downloaded an open source code that I need for my study.我已经下载了我学习所需的开源代码。
https://ctakes.apache.org/downloads.cgi https://ctakes.apache.org/downloads.cgi
after a struggle, I managed to compile and run the code.经过一番挣扎,我设法编译并运行了代码。
I have one question that I could not find the answer to and hope someone can help me here.我有一个问题,我找不到答案,希望有人能在这里帮助我。
In the Maven side there are dependencies.在 Maven 方面有依赖项。
they get downloaded when I first compile the code, although these are libraries in the project itself, and no need to be downloaded as they are part of this project它们在我第一次编译代码时被下载,尽管这些是项目本身中的库,不需要下载,因为它们是这个项目的一部分
this is the Maven window这是 Maven 窗口
and here is the project code这是项目代码
Here is POM.XML这是 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>
Is there anyway I can force the project to use libraries from the code instead of downloading them from the internet?无论如何我可以强制项目使用代码中的库而不是从互联网上下载它们吗?
You said你说
they get downloaded when I first compile the code, although these are libraries in the project itself, and no need to be downloaded as they are part of this project
它们在我第一次编译代码时被下载,尽管这些是项目本身中的库,不需要下载,因为它们是这个项目的一部分
In Maven, you do not put external jars into the project directory (or into the git/svn repository).在 Maven 中,您不要将外部 jar 文件放入项目目录(或 git/svn 存储库)。 Instead, you reference a Maven repository (like MavenCentral) and declare the dependencies in your
pom.xml
.相反,您引用 Maven 存储库(如 MavenCentral)并在
pom.xml
声明依赖项。
They then get downloaded once and stored in your local Maven repository (standard directory is .m2/repository
in your user directory).然后将它们下载一次并存储在您本地的 Maven 存储库中(标准目录是您用户目录中的
.m2/repository
)。
Looking through your POM, I start to understand.看了你的POM,我开始明白了。
You have a multi-module project and the "dependencies" you are talking about are really modules of your project.您有一个多模块项目,您所谈论的“依赖项”实际上是您项目的模块。 Modules are usually present in subdirectories.
模块通常存在于子目录中。 If you start a build on the parent POM level, Maven orders and builds all modules, usually producing one jar/war/ear per module.
如果您在父 POM 级别开始构建,Maven 会订购并构建所有模块,通常为每个模块生成一个 jar/war/ear。 A module can have another as dependency, but these dependencies are not downloaded from a remote repository, but resolved locally.
一个模块可以有另一个作为依赖项,但这些依赖项不是从远程存储库下载的,而是在本地解析的。
Have you did this which will lead the dependencies downloading: open the Maven panel on the right side of the idea, right click on the module project you want to exclude and click "ignore project"您是否这样做了将导致依赖项下载:打开idea右侧的Maven面板,右键单击要排除的模块项目,然后单击“忽略项目”
image showing how to exclude project显示如何排除项目的图像
If you didn't do that, try to run如果您没有这样做,请尝试运行
mvn install
to install the module locally and then check it again.在本地安装模块,然后再次检查。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.