Maven compilation failure error - maven

When i compile my bdd frame work in java getting the following compilation error.I am new to this.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
2:compile (default-compile) on project workflows.automation: Compilation
failure: Compilation failure:
[ERROR] /C:/OFFICIAL/BDDFramework/workflows.automation/src/main/java/bdd
/automation/pages/LoginPage.java:[23,1] package org.jbehave.core
.annotations does not exist
[ERROR] /C:/OFFICIAL/BDDFramework/workflows.automation/src/main/java/bdd
/automation/pages/LoginPage.java:[31,11] cannot find symbol
[ERROR] symbol: class BeforeStory
[ERROR] location: class bdd.automation.pages.LoginPage
[ERROR] -> [Help 1]

The error says that jbehave core is missing at compilation time. Add jbehave-core into your pom.xml as a new maven dependency.
See https://mvnrepository.com/artifact/org.jbehave/jbehave-core

Related

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.

Maven TestNG Class No found exception

I'm running TestNG file from maven and I'm getting this exception.
I checked target folder of maven there are no classes generated
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test
(default-test) on project Tes ts: Execution default-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed:
There was an error in the forked process
[ERROR] org.testng.TestNGException: [ERROR] Cannot find class in
classpath: ai.dharma.web.test.functional.TestBaseSetup [ERROR] at
org.testng.xml.XmlClass.loadClass(XmlClass.java:81) [ERROR] at
org.testng.xml.XmlClass.init(XmlClass.java:73)
Ok i found answer almost after 5 days of deep search..
it was folder structure,it should be "Src > Main > Java" + your regular package structure, maven searches through that structure for generating class..

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.

Spring boot batch project not compile in terminal but works in STS

This is the error I am getting.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project merchentsettlement: Compilation failure: Compilation failure:
[ERROR] Configuration.java:[163,76] cannot find symbol
[ERROR] symbol: method build()
[ERROR] location: class org.springframework.batch.core.step.builder.StepBuilderHelper
[ERROR] Configuration.java:[178,59] cannot find symbol
[ERROR] symbol: method build()
[ERROR] location: class org.springframework.batch.core.step.builder.StepBuilderHelper
[ERROR] -> [Help 1]

what's wrong in my mavenning install netty-socketio-demo?

I download netty-socketio-demo from github.com, I cannot mvn install the server, I got error like
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project demo: Compilation failure: Compilation failure:
[ERROR] C:\Users\sun\git\netty-socketio-demo\server\src\main\java\com\corundumstudio\socketio\demo\NamespaceChatLauncher.java:[20,55] error: cannot find symbol
[ERROR] symbol: method sendJsonObject(ChatObject)
[ERROR] location: class BroadcastOperations
[ERROR] C:\Users\sun\git\netty-socketio-demo\server\src\main\java\com\corundumstudio\socketio\demo\NamespaceChatLauncher.java:[16,22] error: cannot find symbol
[ERROR] symbol: method addJsonObjectListener(Class<ChatObject>,<anonymous DataListener<ChatObject>>)
[ERROR] location: variable chat1namespace which type is SocketIONamespace
[ERROR] C:\Users\sun\git\netty-socketio-demo\server\src\main\java\com\corundumstudio\socketio\demo\NamespaceChatLauncher.java:[29,55] error: cannot find symbol
[ERROR] : METHOD sendJsonObject(ChatObject)
[ERROR] LOCATION: CLASS BroadcastOperations
[ERROR] C:\Users\sun\git\netty-socketio-demo\server\src\main\java\com\corundumstudio\socketio\demo\NamespaceChatLauncher.java:[25,22] error: cannot find symbol
[ERROR] -> [Help 1]
I've found dependencies in my mvn repository. I use command mvn clean install. Thanks for any help.
Change the pom.xml of the server folder:
<dependency>
<groupId>com.corundumstudio.socketio</groupId>
<artifactId>netty-socketio</artifactId>
<version>1.7.1</version>
</dependency>
To:
<dependency>
<groupId>com.corundumstudio.socketio</groupId>
<artifactId>netty-socketio</artifactId>
<version>1.6.5</version>
</dependency>
And re run maven

Resources