Maven MojoExecutionException using Checkmarx on JSproject - maven

I am using checkmarx maven plugin to perform a checkmarx scan on my javascript base project (Angular 1.6).
When I run the command mvn checkmarx:scan in output I have the error bellow.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.116 s
[INFO] Finished at: 2018-04-03T17:23:31+02:00
[INFO] Final Memory: 17M/217M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.checkmarx.maven:checkmarx-maven-plugin:8.5.0:scan (default-cli) on project gbis-wms-common-web-client: You must set at least one file.
-> [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/MojoExecutionException
Any idea? thank in advance

The solution were to add a sourceDirectory> tag in the build section of my pom.xlm and it works. see bellow :
<build>
...
<sourceDirectory>./src</sourceDirectory>
...
</build>

Related

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

Can't build maven Vaadin 11 starter pack, missing dependency?

I can't build the maven Vaadin 11 starter pack like mentioned in the tutorial section of the doc. It seems that a package is missing, which provide an #Helper annotation. I tried to add the dependency in the pom.xml but no luck.
Here's the log from Maven :
-------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.653 s
[INFO] Finished at: 2018-09-15T11:30:01+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project my-starter-project: Compilation failure: Compilation failure:
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/Customer.java:[5,44] package com.vaadin.flow.tutorial.annotations does not exist
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/Customer.java:[12,2] cannot find symbol
[ERROR] symbol: class Helper
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/CustomerStatus.java:[3,44] package com.vaadin.flow.tutorial.annotations does not exist
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/CustomerStatus.java:[5,2] cannot find symbol
[ERROR] symbol: class Helper
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/CustomerService.java:[12,44] package com.vaadin.flow.tutorial.annotations does not exist
[ERROR] /Users/olivierbatard/Java/Vaadin/my-starter-project/src/main/java/org/hammicus/vaadin/CustomerService.java:[21,2] cannot find symbol
[ERROR] symbol: class Helper
[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
When I add the dependency in the pom :
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.982 s
[INFO] Finished at: 2018-09-15T11:38:43+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project my-starter-project: Could not resolve dependencies for project org.hammicus.vaadin:my-starter-project:war:1.0-SNAPSHOT: Could not find artifact com.vaadin:flow-documentation-parent:jar:1.1-SNAPSHOT in Vaadin Directory (http://maven.vaadin.com/vaadin-addons) -> [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/DependencyResolutionException
Here is the pom.xml section with the dependency I added :
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-documentation-parent</artifactId>
<version>1.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
Here is the link to the tutorial : https://vaadin.com/docs/v11/flow/introduction/tutorial-get-started.html
Does anyone know how to fix the dependency ?
You can remove all references to the #Helper annotation from the code. It's only used by our own internal tests that verify the tutorial code compiles.
I've created a ticket about fixing the tutorial and/or the code so that this shouldn't be an issue in the future.

I can't create .war with maven

I created a .war with maven clean install, now I need create other .war, but I get this error ->
- maven-clean-plugin:2.6.1:clean (default-clean) # tutorial---
[INFO] Deleting C:\Users\yo\eclipse-workspace\tutorial\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.843 s
[INFO] Finished at: 2018-09-24T15:46:51+02:00
[INFO] Final Memory: 17M/228M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean (default-clean) on project tutorial: Failed to clean project: Failed to delete C:\Users\yo\eclipse-workspace\tutorial\target -> [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/MojoExecutionException
Now My field \target is empty and I can't create .war
Some other application has opened the target folder. Due to this maven-clean-plugin is not able to delete the target folder and fails.

Kafka-Storm integration

We have been trying to integrate kafka-storm by referring the Learning Storm book. We have followed all the steps but on execution of the following command we are getting 'Build Failure'-
mvn clean compile exec:java
-Dmain.class=com.learningstorm.kafka.KafkaTopology
and the error is as follows-
[INFO] BUILD FAILURE
[INFO]------------------------------------------------------------------------
[INFO] Total time: 3.546s
[INFO] Finished at: Sat Jan 31 11:46:58 IST 2015
[INFO] Final Memory: 7M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project storm-example: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java are missing or invalid -> [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/PluginParameterException
What should we do? Thanks in advance!
Add the dependency
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
</dependency>

Maven surefire - test failures on clean install

I have a Spring MVC project that I am currently working on. Everything looks fine and I am not missing any of the jar files. On "mvn clean install" I am getting the error below.
So far I've tried all the other suggestion that I found on similar topics like: "mvn dependency::tree" so I can check if I am missing any repository but no result.
For some guys it looks like "mvn clean install -U" was the solution but not in my case, getting the same error.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:17 min
[INFO] Finished at: 2014-12-09T11:46:34+00:00
[INFO] Final Memory: 23M/226M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
12.4:test (default-test) on project am: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\ADMIN\Documents\Code Base\Removable Disk\am
\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 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/MojoFailureExc
eption
C:\Users\ADMIN\Documents\Code Base\Removable Disk\am>
One or more test(s) are failing. You have two options
Fix those test cases and try.
or
Run mvn clean install -Dmaven.test.skip. This command will skips the test phase.

Resources