Jenkinsfile pipeline with DependenceCheck fail with RetireJS checking - jenkins-pipeline

Error as below:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.902 s
[INFO] Finished at: 2021-01-21T09:58:57+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.owasp:dependency-check-maven:6.0.5:check (default-cli) on project core-account-service: One or more exceptions occurred during dependency-check analysis: One or more exceptions occurred during analysis:
[ERROR] InitializationException: Unable to initialize the Retire JS respository
[ERROR] caused by UpdateException: Failed to initialize the RetireJS repo
[ERROR] caused by DownloadFailedException: Download failed, unable to copy 'https://raw.githubusercontent.com/Retirejs/retire.js/master/repository/jsrepository.json' to '/app/repository/org/owasp/dependency-check-utils/6.0.5/../../dependency-check-data/5.0/jsrepository.json'; Error downloading file https://raw.githubusercontent.com/Retirejs/retire.js/master/repository/jsrepository.json; unable to connect.
[ERROR] caused by DownloadFailedException: Error downloading file https://raw.githubusercontent.com/Retirejs/retire.js/master/repository/jsrepository.json; unable to connect.
[ERROR] caused by ConnectException: Connection refused (Connection refused)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
Jenkins Pipeline
stage('dependencyCheck') {
steps {
parallel(
dependencyCheck: {
sh 'mvn org.owasp:dependency-check-maven:check -Ddependency-check-format=XML -DdisableRetireJS -DdisableNodeJS'
step([$class: 'DependencyCheckPublisher', unstableTotalAll: '0'])
}
)
}
}
stage('dependencyCheck') {
steps {
parallel(
dependencyCheck: {
sh 'mvn org.owasp:dependency-check-maven:check -Ddependency-check-format=XML --disableRetireJS --disableNodeJS'
step([$class: 'DependencyCheckPublisher', unstableTotalAll: '0'])
}
)
}
}
When we try to integrate Dependency-check with Jenkins Pipelow as above showing, it's failed.
Any idea about how to add disableRetireJS and disableNodeJS , when use mvn org.owasp:dependency-check-maven:check

Related

create spring boot 2.7 'mvn spring-boot:build-image' failed

Building docker image using spring-boot-maven-plugin failing.
[INFO] Retrying request to {}->docker://localhost:2376
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [2] No such file or directory
[INFO] Retrying request to {}->docker://localhost:2376
[INFO] > Pulling builder image 'docker.io/paketobuildpacks/builder:base' 100%
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.805 s
[INFO] Finished at: 2022-11-19T00:13:53+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.7.5:build-image (default-cli) on project demodocker: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.7.5:build-image failed: Connection to the Docker daemon at 'localhost' failed with error "[2] No such file or directory"; ensure the Docker daemon is running and accessible: com.sun.jna.LastErrorException: [2] No such file or directory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
build a docker image with spring-boot-maven-plugin not working.

creating custom processors apache nifi

I was creating a custom processor in apache NIFI and in order to do it, I needed to run the cmd: mvn clean install but I have an error
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:59 min
[INFO] Finished at: 2020-02-21T11:50:51+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
8.1:testCompile (groovy-tests) on project nifi-pros-test: Execution groovy-tests
of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile failed
: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.1 or one of its depe
ndencies could not be resolved: Could not transfer artifact org.codehaus.groovy:
groovy-eclipse-batch:jar:2.5.4-01 from/to bintray (https://dl.bintray.com/groovy
/maven): Transfer failed for https://dl.bintray.com/groovy/maven/org/codehaus/gr
oovy/groovy-eclipse-batch/2.5.4-01/groovy-eclipse-batch-2.5.4-01.jar: Connect to
d29vzk4ow07wi7.cloudfront.net:443 [d29vzk4ow07wi7.cloudfront.net/13.225.218.65,
d29vzk4ow07wi7.cloudfront.net/13.225.218.163, d29vzk4ow07wi7.cloudfront.net/13.
225.218.41, d29vzk4ow07wi7.cloudfront.net/13.225.218.66] failed: Read timed out
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
any help?? I'm a beginner and I googled it but no solution
Actually all it takes that instead of passing the command: mvn install enter the command: mvn install -DskipTests ! that's all it take !! because those errors are generated by testing ! so skip the test and all worked super greatly

Error while creating Maven Framework through cmd

I am new to Maven and learning it by myself with the help of online tutorials.
I have been getting error while executing archetype:generate command in cmd.
Here is the error I am getting :\
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.884 s
[INFO] Finished at: 2017-05-07T23:00:07+05:30
[INFO] Final Memory: 8M/65M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate failed: Unable to load the mojo 'generate' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-archetype-plugin:3.0.1': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) No implementation for org.apache.maven.archetype.ArchetypeManager was bound.
[ERROR] while locating org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo
[ERROR] at ClassRealm[plugin>org.apache.maven.plugins:maven-archetype-plugin:3.0.1, parent: sun.misc.Launcher$AppClassLoader#70dea4e] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with #com.google.inject.name.Named(value=org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
I have searched a lot for the solution but nowhere did I find appropriate answer. I have uptil now completed the following steps: 1)Downloaded and extracted "apache-maven-3.5.0". 2)Configured the M2_HOME and PATH variables.

neo4j spark connector: mvn clean install assembly:single error

I am working on neo4j-spark connector. After cloning and moving to the directory, I did mvn clean install assembly:single. It throws error :
Tests in error:
runMatrixQueryDFSchema(org.neo4j.spark.Neo4jDataFrameTest): Job aborted due to stage failure: Task 0 in stage 3.0 failed 1 times, most recent failure: Lost task 0.0 in stage 3.0 (TID 12, localhost): java.util.NoSuchElementException: None.get
Tests run: 7, Failures: 0, Errors: 1, Skipped: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.538s
[INFO] Finished at: Wed Aug 24 19:18:07 IST 2016
[INFO] Final Memory: 72M/1016M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project neo4j-spark-connector: There are test failures.
[ERROR]
[ERROR] Please refer to /data/neo4j-spark-connector/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
How do I get rid of it? Do I need to do anything else to build target/neo4j-spark-connector_2.11-full-2.0.0-M1.jar for Scala 2.11. I have installed Spark 2.0.0 installed. I have it saved in the directory same as that for neo4j-spark-connector. Do I need to save it somewhere else? How do I get it to work?
This issue has been resolved now. You can take latest pull from the neo4j-spark-connector repository and get it to work.
Thanks.

Maven build failing with Connection timed out

So I'm setting up a jenkins instance and have a maven project from git configured.
When I try to build I have an option set to do a "clean package" but im getting the following error in Jenkins logs: Is there a Jenkins setting Im missing?
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean- plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:05 min
[INFO] Finished at: 2016-06-20T19:11:04-04:00
[INFO] Final Memory: 15M/294M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.32.215] failed: Connection timed out -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Resources