having a problem running a build with jenkins and gatling - jenkins

I'm getting the following error
[ERROR] No plugin found for prefix 'gatling' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\w7116744\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]

If you already have the maven gatling plugin included in the POM, make sure that you run the maven gatling:test command in the directory where your POM is in.
The plugin doesn't check if a pom exist or not. If you are NOT running the mvn gatling:test command in the directory where your pom located, you will always get "No plugin found for prefix 'gatling' in the current project ....."

Looks like gatling-maven-plugin is not configured in your pom.xml.

Related

How to define POM location in Jenkins that is installed on a remote PC

I have jenkins installed on a remote machine. How can I point my POM location in Jenkins. If I give the POM.xml location as C:\Automation\pom.xml I am getting the error no such file exists.
Started by user anonymous
Building in workspace C:\Users\Administrator\.jenkins\workspace\RegressionTestJob
Parsing POMs
ERROR: No such file C:\Automation\pom.xml
Perhaps you need to specify the correct POM file path in the project configuration?
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/testng-results.xml
Did not find any matching files.
Finished: FAILURE
Your pom should be in your workspace, like how you would build your project in an IDE e.g. eclipse and when you build your project Jenkins will find the pom on its own in the workspace and build the project
Incase you still wish to specify the location you can use the -f option
mvn -f PomFile.xml
Hope it helps :)

maven clean install Failed to execute goal org.apache.maven.plugins

From Eclipse mars version, pom.xml - Run As - maven clean and i got the following error message with Build Failure.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project testing-framework:
Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved:
Failed to collect dependencies at org.apache.maven.plugins:maven-clean-plugin:jar:2.5 -> org.apache.maven:maven-plugin-api:jar:2.0.6:
Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6:
Could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]
I had the same problem. I solved it by killing java.exe process in Task Manager and re-excuting maven clean install.
Unknown host repo.maven.apache.org
sounds like a networking issue. Maybe check wether you need to supply proxy information within your settings.xml. Here's the documentation on how to supply one.
Alternativly, Eclipse might expose its own proxy settings to its Maven integration, but I'm not sure about that, I only use Maven from console. Still, its worth the check and maybe the config.

Getting Error in POM.xml on KEPLER Eclipse

I have created maven based web application so after created application i am getting two errors in pom.xml which are
1.Multiple annotations found at this line:
- Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted
until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (http://
repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
2.Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile)
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1
Could you please let me know what needs to be done for resolving the issue
If you are facing the same issue I described in my comment above then it seems I could fix it by running mvn eclipse:eclipse with working directory set to Eclipse project folder i.e.
$ cd /path/to/eclipse/workspace/Project
$ mvn eclipse:eclipse
Does this work for you ? Maybe your environment is different . Providing more details might help others to understand your problem even better so as to offer useful suggestions .
I had similar problem Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile).
To Fix (apart from installing M2E plug-in and all):
Ensure installed maven is > 3.1 (using mvn -v). If not, you need to upgrade.
Ensure eclipse is pointing to correct maven location (Window->Preferences->Maven->Installations)
On Command prompt, go to project home directory and run mvn eclipse:clean and mvn eclipse:eclipse
Disable and enable Maven nature in eclipse (Right click on project, goto Maven -> Disable Maven Nature. To enable, Right click on project goto Configure -> Convert to Maven Project)

PluginVersionResolutionException in maven

In my system previously C:\Users\abc after changed as C:\Users\xyz now the problem while running the maven with "mvn clean install" it rises exception as LocalRepositoryNotAccessibleException,it takes previous path "C:\Users\abc" but its not there in my system bcz i alreay changed to "C:\Users\xyz".And .m2 folder is not there in my C:\Users\xyz path so i explicitly given in settings.xml localrepository location as "C:\Users\xyz.m2\repository" now .m2 localrepository created above problem solved.But now another i faced another problem is i run command "
mvn clean install" it shows "PluginVersionResolutionException" but it recognize the correctly C:\Users\xyz but shows this exception.I check the plugin versions in my files correctly i specified.Please give me the solution and explain why it behaves like this?
Thanks
This means that you have defined a plugin dependency in your pom without specifing the version of the plugin.
As you have not specify the error message, I give you an example, an let you fix you own bug.
This is an example :
1/ I suppose that I execute the maven command > mvn intall -X
2/ in the console I have the folowing error :
[ERROR] Error resolving version for plugin 'org.codehaus.mojo:findbugs-maven-plugin' from the repositories ...
org.apache.maven.plugin.version.PluginVersionResolutionException: Error resolving version for plugin 'org.codehaus.mojo:findbugs-maven-plugin' from the repositories ...
3/ The error seems to be located in "findbugs-maven-plugin" dependency
4/ I go to my pom.xml file, and I search the dependency to the plugin, I will find that I haven't specified the version of the plugin. So I add it and it will be resolved
like this :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version> ==> I add this line to fix the pb
</plugin>

Can the Cloud Foundry Maven Plugin Work With Multi-Module Aggregator Projects?

I have a standard multi-module maven project and I'm able to build it locally using mvn clean packagebut when I try to deploy it using $ mvn cf:update I get the following error:
[ERROR] Failed to execute goal org.cloudfoundry:cf-maven-plugin:1.0.0.M2:update (default-cli) on project <myprojectname>: An exception was caught while executing Mojo. The file or directory does not exist at '<my project directory>/target/<myprojectname>-SNAPSHOT.war'. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.cloudfoundry:cf-maven-plugin:1.0.0.M2:update
The problem is that I can't build a .war file for my parent .pom because it needs to be packaged as a pom file, or else maven will reject it. Therefore, I cannot supply the .war file cloudfoundry is looking for. Is there a setting I'm missing?
I'm currently looking into the Maven assembly plugin, but it seems like there should be a more straightforward way to push a multi-module maven project using the maven cloud foundry plugin.
Seems like your parent root either has a single parent pom file or if its a module, it only has a pom inside the target. You are not creating war file inside the target root of your project (if target even exist there). Your application is most likely having each module create their own war files inside their target folders.
At this time I don't think the cf maven plugin would support what you are looking for. could be a enhancement to add a parameter with the module that contains the war file but that is something that needs to be done!
https://github.com/cloudfoundry/vcap-java-client/blob/master/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Update.java
I would recommend you to look into the assembly plugin (which you are already).
Let us know how it goes!

Resources