gpt4 book ai didi

java - 如何隐藏额外的细节?

转载 作者:行者123 更新时间:2023-12-02 08:55:54 25 4
gpt4 key购买 nike

我是java新手。我想知道每当我运行一个类(class)或整个项目时如何隐藏额外的细节。如果可能的话,我只想看到“hello world”而不是其余的细节。

cd /home/hamza/NetBeansProjects/testing; JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 /home/hamza/netbeans/java/maven/bin/mvn "-Dexec.args=-classpath %classpath application.testing.hello" -Dexec.executable=/usr/lib/jvm/java-11-openjdk-amd64/bin/java -Dexec.classpathScope=runtime process-classes org.codehaus.mojo:exec-maven-plugin:1.5.0:exec
Scanning for projects...

------------------------------------------------------------------------
Building testing 1.0-SNAPSHOT
------------------------------------------------------------------------

--- maven-resources-plugin:2.6:resources (default-resources) @ testing ---
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory /home/hamza/NetBeansProjects/testing/src/main/resources

--- maven-compiler-plugin:3.1:compile (default-compile) @ testing ---
Nothing to compile - all classes are up to date

--- exec-maven-plugin:1.5.0:exec (default-cli) @ testing ---
hello world
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 1.342 s
Finished at: 2020-02-29T21:54:11+05:00
Final Memory: 9M/37M
------------------------------------------------------------------------

最佳答案

使用--quiet-q参数运行mvn命令:

mvn --quiet ...

mvn -q ... ...

如果您想在下载或上传时禁止显示传输进度,请使用--no-transfer-progress-ntp:

mvn --no-transfer-progress ....

mvn -ntp ... ....

检查here供引用。

单击下面屏幕截图中显示的Maven 设置按钮:

enter image description here

在下面屏幕截图所示的框中输入-q:

enter image description here

确定按钮,然后运行您的类(class)。

关于java - 如何隐藏额外的细节?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60487843/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com