Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress upload messages of maven deploy

Tags:

java

maven

bamboo

we are using Bamboo for Continuous Integration and deploy successful tests to our snapshot repository with a simple mvn deploy statement. Unfortunately this produces thousands of lines like this:

20-Apr-2012 10:38:44    28688 KB   
20-Apr-2012 10:38:44    28692 KB   
20-Apr-2012 10:38:44    28696 KB
...
20-Apr-2012 10:38:57    Uploaded: https://xxx (31932 KB at 7496.0 KB/sec)

This appears in Bamboo:

The Build generated 14,979 lines of output. The output is too long and has been
truncated to the last 1,000 lines. Download full Build log.

So it's possible to download the full log, but's full of the upload messages. Is it possible to suppress the lines above in mvn deploy and only output a summary?

like image 268
Thor Avatar asked Apr 20 '12 09:04

Thor


People also ask

What is Maven deploy command?

mvn deploy This command is used to deploy the artifact to the remote repository. The remote repository should be configured properly in the project pom. xml file distributionManagement tag. The server entries in the maven settings. xml file is used to provide authentication details.

How does maven deploy work?

deploy:deploy is used to automatically install the artifact, its pom and the attached artifacts produced by a particular project. Most if not all of the information related to the deployment is stored in the project's pom. deploy:deploy-file is used to install a single artifact along with its pom.

What does Maven dependency plugin do?

The dependency plugin provides the capability to manipulate artifacts. It can copy and/or unpack artifacts from local or remote repositories to a specified location.

What is Maven command?

Maven is a command-line tool for building Java (and other) programs. The Maven project provides a simple ZIP file containing a precompiled version of Maven for your convenience. There is no installer. It's up to you to set up your prerequisites and environment to run Maven on Windows.


1 Answers

The simplest solution to suppress the output of the lines:

20-Apr-2012 10:38:44    28688 KB   
20-Apr-2012 10:38:44    28692 KB   
20-Apr-2012 10:38:44    28696 KB

is to you the -B option on command. This is the --batch-mode option for Maven which suppresses the output of the above.

like image 98
khmarbaise Avatar answered Oct 13 '22 04:10

khmarbaise