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

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.

Related

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.

Maven MojoExecutionException using Checkmarx on JSproject

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>

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.

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