serve icon indicating copy to clipboard operation
serve copied to clipboard

Extra logging added to Maven builds makes the build log hard to read

Open Shirleykiruba opened this issue 6 years ago • 4 comments

In our project we have the Maven Integration Plugin - 3.6 and Jenkins - 2.222.3 installed, and I'm seeing org.apache.maven.cli.event.ExecutionEventLogger everywhere in Jenkins Console logs only in the publish stage as below.

[Pipeline] { (Publish) (hide) [Pipeline] newArtifactoryServer [Pipeline] newBuildInfo [Pipeline] newMavenBuild [Pipeline] artifactoryMavenBuild 02:51:23 Jenkins Artifactory Plugin version: 3.6.2 02:51:23 Artifactory integration is enabled 02:51:25 [feature-test] $ java -classpath /usr/share/maven/boot/* -Dmaven.home=/usr/share/maven -Dmaven.conf=/usr/share/maven/conf -DbuildInfoConfig.propertiesFile=/home/jenkins/workspace/_feature-test@tmp/artifactory/buildInfo8774692053128527369.properties -DbuildInfoConfig.artifactoryResolutionEnabled=true -Dm3plugin.lib=/home/jenkins/workspace/_feature-test@tmp/artifactory/cache/artifactory-plugin/3.6.2 -Dclassworlds.conf=/home/jenkins/workspace/_feature-test@tmp/artifactory/classworlds5581946743250217473conf -Dmaven.multiModuleProjectDirectory=/home/jenkins/workspace/_feature-test -Xmx1536m org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml install package -DskipTests 02:51:26 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects... 02:51:26 [main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording 02:51:26 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 02:51:26 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ---------------< samples-java-library >---------------- 02:51:26 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building devops-java-basic 1.1.0-feature-test.1 02:51:26 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --------------------------------[ jar ]--------------------------------- 02:51:26 Downloading from artifactory-release: https://com/artifactory/maven-dev/org/apache/maven/plugins/maven-plugins/23/maven-plugins-23.pom 02:51:26 Downloaded from artifactory-release: https://com/artifactory/maven-dev/org/apache/maven/plugins/maven-plugins/23/maven-plugins-23.pom (0 B at 0 B/s) 02:51:27 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 02:51:27 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-resources-plugin:2.6:resources (default-resources) @ samples-java-library --- 02:51:27 Downloaded from artifactory-release: https://com/artifactory/maven-dev/org/apache/apache/13/apache-13.pom (0 B at 0 B/s) 02:51:27 Downloading from artifactory-release: https://com/artifactory/maven-dev/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar 02:51:27 Downloaded from artifactory-release: https://com/artifactory/maven-dev/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar (0 B at 0 B/s) 02:51:27 Downloading from artifactory-release: https://com/artifactory/maven-dev/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom 02:51:27 Downloading from artifactory-release: https://com/artifactory/maven-dev/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom

Makefile for package and publish are as below and the publish stage og groovy is shared below, package: mvn -B $(MVN_VERBOSE_ARGS) package -DskipTests

publish: @echo "publish"

@override def publish(config) { ArtifactoryUtils artifactoryUtils = new ArtifactoryUtils() def server = artifactoryUtils.getArtifactoryServer(config.artifactoryBaseUrl, config.artifactoryUser, config.artifactoryPassword) def buildInfo = artifactoryUtils.getBuildInfo() artifactoryUtils.publishMavenLib(config.project, server, buildInfo) artifactoryUtils.publishBuildInfo(server, buildInfo) return buildInfo }

Do we have any ideas on suppressing these artifactory logs in publish stage?

Shirleykiruba avatar May 19 '20 14:05 Shirleykiruba

Does using the -q flag help? You could check this PR - https://github.com/pytorch/serve/pull/326

vdantu avatar May 19 '20 15:05 vdantu

The code has -q already in it but still the logs are not silent

Shirleykiruba avatar May 20 '20 14:05 Shirleykiruba

Interesting. -q option works well in our CI/CD setup. Optionally, would you be able to redirect the output of that command to a separate log?

vdantu avatar May 20 '20 17:05 vdantu

Closing as related PR has been merged.

codinnvrends avatar Jun 10 '20 08:06 codinnvrends