maven


How to Build a war and deploy and then do integration testing in one flow using jetty maven plugin


I am trying to execute the integration test after the projects war is build and deployed on jetty server.
But I am facing many issues, such jetty is not trying to build a war and requires already built war.
Can anyone help me in configuring the below three things step by step in pom.
1) Build a war
2) start jetty server
3) deploy war on jetty server
4) run integration tests.
Is it possible to define all these set of steps in pom.xml.
can anyone help me in redefining my pom.xml. Below is my pom.xml code.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>job</artifactId>
<groupId>com.test.project</groupId>
<version>2-SNAPSHOT</version>
</parent>
<artifactId>manager</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>project1</groupId>
<artifactId>project1-services</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.20</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.0.v20161208</version>
<configuration>
<webApp>
<contextPath>/pathToContextPath</contextPath>
</webApp>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I am trying to fix this issue, but still no luck

Related Links

IntelliJ Stuck “Scanning Maven Projects”
How to mount docker volume into my docker project using compose?
MAVEN - Setting Path in Redhat so the maven commands can be run from anywhere
maven plugin for docker (e.g. to run with needed db)
Is kapt supported in maven?
Howto retrieve the latest Snapshot from Nexus OSS 3.0
Maven versioning in a parallel development process
Compile failure in Jenkins
How to access files from module using maven without searching it in local .m2 repository & central maven repository?
passing version of a dependency during a release build in maven
Get maven properties from external configuration file
How does Maven handle transitive dependencies inherited from parent?
maven build error : No plugin found for prefix 'system' in the current project [duplicate]
cucumber.runtime.CucumberException: Failed to instantiate class
Jenkins fails to parse POM with variables
How can I stop generating md5, sha1 jars being created in maven

Categories

HOME
azure-data-factory
mediawiki
ngrx
path-finding
json.net
alfresco
xmpp
yarn
yum
applepay
slick-slider
dacpac
vault
user-input
reveal.js
modx-revolution
modelica
quickbooks
visual-studio-cordova
dynamics-crm-online
text-rendering
excel-vba-mac
crystal-reports-2008
custom-wordpress-pages
immutable.js
nas
conemu
wkwebview
mmap
microsoft-r
trading
status
entitlements
filezilla
spring-mybatis
fluentvalidation
ping
dbclient
compatibility
objectanimator
file-rename
r-raster
airconsole
scorm2004
http-digest
lto
impersonation
dynamic-reports
flashair
auto-update
smartcontracts
dds
blogengine.net
return-value
yt-project
probability-density
adxstudio-portals
ctest
natvis
separator
spim
ora-00900
t4mvc
coveralls
php-ci
splash
graph-drawing
apache-commons-fileupload
ami
sonarqube5.1.2
pretty-print
truevault
c++03
nsmutabledictionary
fscommand
operator-precedence
camanjs
tablelayout
codeigniter-routing
wordpress-theme-customize
websocket4net
navigationservice
phpthumb
rebol3
jboss-weld
concurrent-collections
algebraic-data-types
oam
coverflow
file-locking
django-nonrel
orchardcms-1.7
first-responder
getmessage
nsdatecomponents
deobfuscation
self-extracting
gdlib
datareader
createwindow
ncqrs
uimenucontroller
avatar
w3wp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App