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 clean" - Compile Maven Project
How to clean up my Maven project output files? I only want to keep my Java source code.
✍: FYIcenter.com
When you drive your project to different phases, Maven will
generate different output files in the "target" sub-directory.
Here is the project file tree of the "hello" project at the "package" phase:
fyicenter\hello> tree /f .
| pom.xml
|
|---src
| |---main
| | |---java
| | |---com
| | |---fyicenter
| | App.java
| |
| |---test
| |---java
| |---com
| |---fyicenter
| AppTest.java
|
|---target
| hello-1.0-SNAPSHOT.jar
|
|---classes
| |---com
| |---fyicenter
| App.class
|
|---generated-sources
| |---annotations
|---generated-test-sources
| |---test-annotations
|---maven-archiver
| pom.properties
|
|---maven-status
| |---maven-compiler-plugin
| |---compile
| | |---default-compile
| | createdFiles.lst
| | inputFiles.lst
| |
| |---testCompile
| |---default-testCompile
| createdFiles.lst
| inputFiles.lst
|
|---surefire-reports
| com.fyicenter.AppTest.txt
| TEST-com.fyicenter.AppTest.xml
|
|---test-classes
|---com
|---fyicenter
AppTest.class
You can run the "mvn clean" command to remove Maven output files:
fyicenter\hello> ..\apache-maven-3.5.4\bin\mvn clean
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------ com.fyicenter:hello >-------------------------
[INFO] Building hello 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ hello ---
[INFO] Deleting C:\fyicenter\hello\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.715 s
[INFO] ------------------------------------------------------------------------
fyicenter\hello> tree /f .
| pom.xml
|
|---src
|---main
| |---java
| |---com
| |---fyicenter
| App.java
|
|---test
|---java
|---com
|---fyicenter
AppTest.java
2020-10-17, ∼1431🔥, 0💬
Popular Posts:
What Is fop.jar? I got it from the fop-2.7-bin.zip. fop.jar in fop-2.7-bin.zip is the JAR file for F...
maven-compat-3.5.4.jar is the JAR file for Apache Maven 3.5.4 Compact module. The JAR file name may ...
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...
JDK 17 jdk.jdeps.jmod is the JMOD file for JDK 17 JDeps tool, which can be invoked by the "jdeps" co...