Maven project Jenkins build not success.
I'm trying to build my Maven TestNG selenium project via Jenkins through git repository. When i'm click on build option there is error written in log as
"A Maven installation needs to be available for this project to be built.Either your server has no Maven installations defined, or the requested Maven version does not exist."
How to fix this issue ?
You need to install Maven on your server and to setup maven in Jenkins.
Manage Jenkins->Configure System
Scroll to the Maven section and click the button
More details in this tutorial.
See also questions close to this topic
Is there a reverse or opposite of submodules?
I am currently working on a large project with multiple teams. We have a a nodejs server running express to handle requests and have built out all of the routes.
Right now, all of the routes point to stubs. What I would like to do is be able to break out each stub as a submodule that each team can work on independently. Normally we would create separate projects for each section and build them independently, only bringing them together for the final product but this usually takes a lot of work to test each project separately with the server and then again with them all together.
Is there any way that we can do the reverse of submodules? For example, We have project A (the core Express server), which project B and project C can checkout under separately, resulting in something like:
Projects: A, A+B, A+C
The use case would be, we have one team working on the server (http handling). Another team (B) can pull from Project A's master branch to work on their stub - User handling. Yet another team (C) can pull from Project A's master branch to work on their stub - Order handling.
Can we have a shared root project that we can pull updates from while allowing us to work on only our piece of the server? Or are projects inside projects the only way?
On my machine I don't have visual studio, is it possible to use GIT for PL-SQL files?
One of my team members are not using visual studio they are all Pl-SQL developer and another team members are .Net developers. I am interested to use GIT VCS. Is it possible to use GIT for PL-SQL files / general file types (.docx, .txt, .pdf, .pptx)? Tell me HOW? Thanks in advance..
git checkout without fetch from origin
I use jira at work, I will always have to create a branch in jira the in my terminal I do 2 steps
- git fetch origin feature/myticket-id
- git checkout origin feature/myticket-id
How can I use only single command, checkout the new branch without fetch?
Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default) on project giraph-gora: Too many unapproved licenses: 56
I am new to Giraph and hadoop.I am trying to compile giraph using maven i tried using command mvn -Phadoop_2 -fae -DskipTests clean install on command prompt but i am getting error.Image i attached is from eclipse(i am geting similar error in cmd as well. GIRAPH version- 1.2.0 RC1 HADOOP version- 2.2.0 MAVEN version- 3.5.3 JAVA version 1.8.0_121 Any help in solving this problem will help me a lot. THANK YOU
REMOTE engine not found, Maven project, jar file
I use Orientdb 2.2.33 in a maven project and it works fine in IDE. Also it works fine if I build jar file. But when I move my code inside another project I get an error:
error Exception in thread "main" com.orientechnologies.orient.core.exception.ODatabaseException: Error on opening database 'remote:localhost/myDB
In my search I found some issue like THIS.
I've added this to my POM:
But nothing happened until I copy "com.orientechnologies.orient.core.engine.OEngine" from my old jar file to META-INF/services folder of new jar file. I compare the old "com.orientechnologies.orient.core.engine.OEngine" and new one:
# # Copyright 2015 OrientDB LTD (info(at)orientdb.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # For more information: http://www.orientdb.com # # # /* # * Copyright 2016 OrientDB LTD (info(at)orientdb.com) # * # * Licensed under the Apache License, Version 2.0 (the "License"); # * you may not use this file except in compliance with the License. # * You may obtain a copy of the License at # * # * http://www.apache.org/licenses/LICENSE-2.0 # * # * Unless required by applicable law or agreed to in writing, software # * distributed under the License is distributed on an "AS IS" BASIS, # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # * See the License for the specific language governing permissions and # * limitations under the License. # * # * For more information: http://www.orientechnologies.com # */ # com.orientechnologies.orient.client.remote.OEngineRemote
# # /* # * Copyright 2016 OrientDB LTD (info(at)orientdb.com) # * # * Licensed under the Apache License, Version 2.0 (the "License"); # * you may not use this file except in compliance with the License. # * You may obtain a copy of the License at # * # * http://www.apache.org/licenses/LICENSE-2.0 # * # * Unless required by applicable law or agreed to in writing, software # * distributed under the License is distributed on an "AS IS" BASIS, # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # * See the License for the specific language governing permissions and # * limitations under the License. # * # * For more information: http://www.orientechnologies.com # */ # com.orientechnologies.orient.core.engine.local.OEngineLocalPaginated com.orientechnologies.orient.core.engine.memory.OEngineMemory
Is there a way that it is replaced automatically into the jar file?
Jar depends on Spring Framework, but which version to include?
I have a library that I built which uses the Spring Framework. It uses @RestController and uses
spring-boot-starter-testpackage for testing.
The library is meant to run inside of Spring MVC (likely Spring Boot).
The easiest thing for me to do is to specify Spring Boot starter parent in my POM:
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.2.RELEASE</version> </parent>
However, I don't know if the project using my library will use Spring Boot 2.x or Spring Boot 1.x.
So, what do I do? Even if I remove the
parenttag and start trying to fish for ALL the dependencies that I need to get my library to compile again, won't I have the same issue again, i.e., Spring Framework 4.x vs Spring Framework 5.x?
What can I do in my POM.xml to make sure that when I package my library as a jar, that the jar will be able to be used in a project that can use either Spring Framework 4 or 5 (and likewise Spring Boot 1.x or Spring Boot 2.x)?
How can Use My own created Java jars in jmeter webdriver sampler?
I have some selenium code which repeats in every JMX I have, how can I create a jar of that and use it in JMeter web driver sampler? I am using Beanshell language in web driver sampler.
For example, if I need to use login and logout in every Jmx of web driver sampler, and now I am repeating it in every JMX. How do I keep those login and logout script somewhere and use that. Keeping as jars would be fine, but how can I do it in jMeter?
error while importing webdriver from selenium in python
the first thing I wanted to do is, installing Selenium in Windows and import webdriver from selenium.
So installed Selenium with pip install selenium and tried to import webdriver with
from selenium import webdriver
but I got the error
File "C:\Users\VIJAY\Desktop\selenium.py", line 2, in from selenium import webdriver ImportError: cannot import name 'webdriver'
Where am i going wrong?
Wait Until Clickable, Then Keep Clicking Until Unclickable
I'm super new to Selenium, so bear with me.
What I'm trying to do is fairly simple. I need to:
- Wait until button is clickable
- Then continue clicking button until it's no longer clickable
- Then start scraping
I know that I'll need something like the following.
button = WebDriverWait(self.driver, 10).until( EC.element_to_be_clickable((By.XPATH, '//div[@class="text-center"]/a')) ) while True: try: button.click() except TimeoutException: break # can now scrape content...
Would the code above do the job? If not, what am I doing wrong here?!
NUnit Console command line regex case insensitive?
I'm running NUnit tests on Jenkins/Mono and this is what my command looks like:
mono /opt/NUnit-3.8.0/nunit3-console.exe $WORKSPACE/ProjectName/bin/$CONFIG/ProjectName.dll --where="test~=$TEST_NAME" --config=$CONFIG
The idea is to be able to select tests using regular expression. Now, I want to select tests with Regex but ignoring case. I tried something like this:
TEST_NAME = ^.*(?i)something(?-i).*$
And also tried:
TEST_NAME = ^.*something.*$/i
But I got the "unexpected token '('" and "unexpected token '/'" errors. Is there any way to use case insensitive modifier?
How to exclude folders in subversion based SCM in Jenkins
The repository link which I have provided is http://svn:8443/svn/Project/application/trunk.
And I have to exclude the folders tests/Exclude and tests/Internal under the trunk. The tests folder is on of the folders in trunk.
I have tried /test/Exclude/.* but it aint working.
Could someone guide me with where I am going wrong.
Error while installing jenkins on windows 7 (trying to install Jenkins on windows but got below error while installing. - Java 1.8 is installed )
Trying to install Jenkins on windows but got below error:
G:\software part 1\Programming soft\Jenkins\By_cmd_prompt>java -jar jenkins.war Running from: G:\software part 1\Programming soft\Jenkins\By_cmd_prompt\jenkins.war webroot: $user.home/.jenkins Jun 24, 2018 6:08:27 PM org.eclipse.jetty.util.log.Log initialized INFO: Logging initialized @820ms to org.eclipse.jetty.util.log.JavaUtilLog Jun 24, 2018 6:08:27 PM winstone.Logger logInternal INFO: Beginning extraction from war file ←[33mJun 24, 2018 6:09:07 PM org.eclipse.jetty.server.handler.ContextHandler setContextPath WARNING: Empty contextPath ←[0mJun 24, 2018 6:09:07 PM org.eclipse.jetty.server.Server doStart INFO: jetty-9.4.z-SNAPSHOT, build timestamp: 2017-11-22T02:57:37+05:30, git hash: 82b8fb23f757335bb3329d540ce37a2a2615f0a8 Jun 24, 2018 6:09:09 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet INFO: NO JSP Support for /, did not find INFO: Stopped scavenging Jun 24, 2018 6:09:09 PM hudson.WebAppMain contextDestroyed INFO: Shutting down a Jenkins instance that was still starting up java.lang.Throwable: reason at winstone.Launcher.<init>(Launcher.java:156) Caused by: java.net.BindException: Address already in use: bind
Installation aborted here.
I have the following issue after my autoit exe executes in firefox and logs in and throws exception Failed to find value field
I am Trying to login to in.rediffmoney.com and create a portfolio, Firefox throws a security warning Window which I have handled using Autoit after which am not able to go further with my code to create the portfolio it throws Failed to find value field Exception.
driver.get("https://money.rediff.com/index.html"); driver.findElement(By.xpath("//*[@id='signin_info']/a")).click(); driver.findElement(By.id("useremail")).sendKeys("firstname.lastname@example.org"); driver.findElement(By.id("emailsubmit")).click(); WebDriverWait wait = new WebDriverWait(driver,10); wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.id("userpass")))); driver.findElement(By.id("userpass")).sendKeys("pass"); driver.findElement(By.id("userpass")).sendKeys(Keys.ENTER); //------here firefox security warning window comes so Autoit-------- Runtime.getRuntime().exec("C:\\Users\\ashok\\Desktop\\user_autoit.exe"); //--------Autoit exe is succesful logs me in--------- //--------------CODE is throwing Failed to find value field after this---------- clickAndWait("//*[@id='createPortfolio']/img","//*@id='createPortfolioButton']",10); driver.findElement(By.id("create")).clear(); driver.findElement(By.id("create")).sendKeys("Rom"); driver.findElement(By.id("createPortfolioButton")).click();