Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
"mvn dependency:copy-dependencies" - JAR Dependencies
How to download JAR files that my project dependents on?
✍: FYIcenter.com
By default, Maven will download dependent JAR files in whenever
it needs them to support your project.
Those JAR files will not be stored on your local computer.
But if you want to download local copies of those dependent JAR files, you can run the "mvn dependency:copy-dependencies" command:
fyicenter\hello> ..\apache-maven-3.5.4\bin\mvn dependency:copy-dependencies
Downloading from central: https://repo.maven.apache.org/maven2
/commons-lang/commons-lang/2.6/commons-lang-2.6.pom
...
Downloading from central: https://repo.maven.apache.org/maven2
/org/apache/maven/reporting/maven-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.jar
Downloading from central: https://repo.maven.apache.org/maven2
/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar
Downloading from central: https://repo.maven.apache.org/maven2
/commons-io/commons-io/1.4/commons-io-1.4.jar
...
[INFO] Copying junit-3.8.1.jar to C:\fyicenter\hello\target\dependency\junit-3.8.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:01 min
[INFO] ------------------------------------------------------------------------
fyicenter\hello>tree /f .
| pom.xml
|
├---src
|
|---target
| hello-1.0-SNAPSHOT.jar
|
├---classes
|
├---dependency
| junit-3.8.1.jar
The output shows that Maven did a lots of unnecessary downloads and finally copied the only dependent JAR file, junit-3.8.1.jar, to the "dependency" sub-directory.
⇒ \users\*\.m2 - Maven Local Repository
2020-10-10, ∼2210🔥, 0💬
Popular Posts:
JDK 17 java.security.jgss.jmod is the JMOD file for JDK 17 Security JGSS (Java Generic Security Serv...
JDK 11 java.sql.jmod is the JMOD file for JDK 11 SQL (Structured Query Language) module. JDK 11 SQL ...
Java-WebSocket Source Code Files are provided in the source package file, java-websocket-1.5.4-src .z...
JDK 17 jdk.javadoc.jmod is the JMOD file for JDK 17 Java Document tool, which can be invoked by the ...
How to download and install javamail-1_2.zip? The JavaMail API is a set of abstract APIs that model ...