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

Hot deploy on Glassfish at Netbeans
Maven compilation failure but dependencies exist
Deploy Artifact to Nexus from Eclipse
Problems adding xom to Maven project
Maven 3 antrun issue
Is there a way to tell maven to always use the latest _stable_ version of a dependency?
jslint-maven-plugin 1.0.2-SNAPSHOT repository
how to wildcard attach multiple files to an artifact in maven?
SCM-Activity-Plugin and Taglist in SONAR
Maven - Is it possible to specify mirror in pom.xml?
Maven: Show comment/alert in console when a dependency is used (compile/package/…)
Remove filter in web.xml in jetty
How to execute code before TestNG for ie. building up the test suite
Reading a maven settings.xml when building with gradle?
Maven Nested Multi-module project
mvn clean package, I want to copy the created jar to the current directory

Categories

HOME
variables
openmp
ngrx
drivers
pycharm
tesseract
bookshelf.js
at-command
rsync
dxl
ebean
fingerprint
ezpublish
convolution
podio
bs4
paradox
basic
slurm
dacpac
metatrader4
vault
imacros
export-to-csv
google-apps-marketplace
zend-framework3
iolanguage
vaadin7
apache-metamodel
code-review
google-pagespeed
visual-composer
mps
buildbot
tdd
pingfederate
traffic
webkitspeechrecognition
vision
gsoap
frame
stormpath
bcd
environment-modules
http-digest
swift3.0.2
angularjs-factory
gulp-sourcemaps
mime
reactive-cocoa-5
avconv
statsd
mplayer
brightcove
kbuild
crypt
dwscript
root-framework
httplistener
autorest
apachebench
nessus
revolution-r
system.management
photobucket
security-testing
rgeo
emailrelay
appfabric-cache
graph-drawing
inmobi
jsonpickle
codeigniter-routing
issuu
code-access-security
jquery-layout
valuechangelistener
rtmfp
bundles
balanced-payments
meteor-velocity
oam
ivyde
google-cloud-save
buster.js
seed
android-screen-support
ocunit
chuck
isnullorempty
labwindows
ticoredatasync
nsmanagedobject
transactionscope
netdna-api
genshi
f#-powerpack
invite
telerik-scheduler
mozilla-prism
getresponsestream
nhibernate.search
zend-tool

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