Tag Archives: junit

Xlib: extension “RANDR” missing on display…

i got in the log of my selenium based integration test against firefox inside a Xvfb server. My first thought was of a missing library but the problem is caused by selenium:

“org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:”

was the line above and i had recently updated firefox on my ubuntu 12.01 server to version 15 by normal updates. The maven dependent selenium plugin version was still the same when i got the error. After updating to the latest version everything works as before:

 

		
			org.seleniumhq.selenium
			selenium-java
			2.24.1
			test
		

Running headless webdriver based selenium junit tests inside jenkins under ubuntu linux

My test setup is for a little wicket 1.5.x based web application with ui tests running during integration-test phase of maven 3.x. The problem here is that my ubuntu 12.01 server has only a console and no gnome or kde running like a desktop linux. Inside eclipse is a test, which starts a browser like firefox to run automated clicks, no problem. I decided to use the webdriver based selenium tests which can use several driver for the different browser. Each driver supports a different browser like chrome, internet explorer or firefox. My tests starts a firefox with explicit locale setting. The wicket application is i18n localized for english an german speaking customer. On the server is a jenkins ci installed with subversion polling to run automated tests during maven build. You can run the scenario with no problems as well under hudson as ci. The solution use xvfb a virtual xwindow system for firefox as desktop. It will automatically started and stopped by jenkins during a job build.

Software Installation on the server

Installation of xvfb

apt-get install xvfb gtk2-engines-pixbuf

Installation of fonts

apt-get install xfonts-base xfonts-75dpi xfonts-100dpi
apt-get install xfonts-scalable xfonts-cyrillic

Installation of tools for testing xvfb

apt-get install x11-apps imagemagick

Testing server installation

1. Console run server

Xvfb -ac :99 -screen 0 1280x1024x16

2. console start firefox

export DISPLAY=:99
firefox http://ralf.schaeftlein.com

3. console make a screenshot

xwd -root -display :99 | convert xwd:- capture.png

And see a result like this when you retrieve the file capture.png via ssh

 

 

 

 

 
 

Jenkins Configuration

Init.d Script for xvfb

Save content as file under /etc/inid.d/xvfb

XVFB=/usr/bin/Xvfb
XVFBARGS="$DISPLAY -ac -screen 0 1280x1024x16"
PIDFILE=/var/hudson/xvfb_${DISPLAY:1}.pid
case "$1" in
  start)
    echo -n "Starting virtual X frame buffer: Xvfb"
    /sbin/start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
    echo "."
    ;;
  stop)
    echo -n "Stopping virtual X frame buffer: Xvfb"
    /sbin/start-stop-daemon --stop --quiet --pidfile $PIDFILE
    echo "."
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
  echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
  exit 1
esac
exit 0

Set rights for jenkins running user on the script

chown jenkins:root /etc/init.d/xvfb
chmod ug+rwx /etc/init.d/xvfb

Add display environment variable to jenkins init.d script

export DISPLAY=:99

Create a new jenkins job

Create a new jenkins job for your web project stored in subversion

 Add to pre and post build step a shell script to start and stop xvfb

 

 

 

 

 

 

 

 

Configure maven pom of the web project

Define special tests in surefire to run as integration tests and jetty as integration application server

			
				org.apache.maven.plugins
				maven-surefire-plugin
				2.4.3
				
					true
				
				
					
						surefire-test
						test
						
							test
						
						
							false
							
								**/itest/**
							
						
					

					
						surefire-itest
						integration-test
						
							test
						
						
							false
							
								**/itest/**
							
						
					
				
			
			
				org.mortbay.jetty
				maven-jetty-plugin
				6.1.26
				
					10
					foo
					9998
					/${project.artifactId}
					true
					${basedir}/src/test/webapp/WEB-INF/web.xml
					
						
							9999
							60000
						
					
				
				
					
						start-jetty
						pre-integration-test
						
							run
						
						
							0
							true
						
					
					
						stop-jetty
						post-integration-test
						
							stop
						
					
				
			

Add dependency to selenium maven artifacts

		
			org.seleniumhq.selenium.client-drivers
			selenium-java-client-driver
			1.0.2
			test
		
		
			org.seleniumhq.selenium
			selenium-java
			2.21.0
			test
		

Record ui steps and write a selenium junit test

Install the selenium ide as firefox plugin

Start firefox and install the xpi file as new plugin. Restart firefox afterwards.

Record ui steps

  1. Open the menu, choose web developer and their selenium ide.
  2. Start inside eclipse the tomcat with your web application
  3. Open in firefox the web application
  4. Click  inside selenium ide on the red record button for start recording
  5. Click through your web application
  6. Click again on the red record button for stop recording
  7. Choose from menu “Export as testcase” and their “Junit4 (Webdriver backed)”
  8. Save file as test.java

Create an new selenium junit test file

  1. Copy the test.java into your eclipse project into the src/test/java folder
  2. Adopt the class definition and setup method like this
public class SeleniumTest {

	private Log log = LogFactory.getLog(getClass());

	protected Selenium selenium;

	@Before
	public void setUp() throws Exception {
		FirefoxProfile profile = new FirefoxProfile();
		// enable german language locale
		profile.setPreference("intl.accept_languages", "de-de,de");
		profile.setEnableNativeEvents(true);
		profile.layoutOnDisk();
		WebDriver driver = new FirefoxDriver(profile);
		String baseUrl = "http://localhost:9999/"; // port jetty surefire integration test
		selenium = new WebDriverBackedSelenium(driver, baseUrl);
	}

– insert java code –

  1. Check into subversion and control jenkins job console.

JUnit Tests for Spring 3 Rest Services

SpringSource has recently released 3.0.1 of their Spring Framework. Spring 3 extended the REST functionalities inside the Web MVC part of the Framework. Rest Service are defined as Controller and can be tested with the new Resttemplate. In this little sample project is Spring 3 combined with JUnit 4, Maven, Hibernate 3.2, Jetty, MySQL, JPA, JAXB and AspectJ. Additional tests was made with Poster as a Firefox Plugin to test REST bases Webservices. Jetty 6.1 is used as embedded container for the web application as backend for the seperated maven integration tests. Jetty can be started with mvn jetty:run for tests with Poster or will be started before the integration tests runs with mvn integration-test. The Project is configured via Maven pom.xml as seen later in this post. Via mvn eclipse:eclipse will the eclipse settings generated to use the project as WTP project. I used Maven 2.2.1 in combination with eclipse 3.5.2.. As backend infrastructure runs inside Ubuntu 9.1 Server a Bugzilla 3, Artifactory 2.2.1, Subversion 1.6 and a Hudson 1.348.

REST as representational state transferr has less protocol overhead as SOAP. It heavily depends on HTTP mechanism like PUT, GET, DELETE or POST method calls or HTTP accept header definition of the mime type like ‘text/xml’, ‘text/plain’ or ‘image/jpeg’ to define delivered and expected content. So you make a HTTP GET request with an accept header ‘image/jpeg’ with a url like http://myserver/restservice/1 in firefox to see their a picture of catalog item with id 1. A HTTP Post send data to the server as new data and a PUT override existing data. HTTP 1.1 defines a list of methods to use in your REST based Service.

The whole project is Java annotation driven and use JDK 1.6 but can easily switched to run with JDK 1.5 as well. Configuration is Spring based as IOC pattern and as annotations inside the Java classes. XML content is converted by JAXB Marshaller to use only domain objects inside your business logic. Persistence is defined as JPA annotations with Hibernate as implementation against a MySQL 5 database. The code was inspired by a blog from Solomon Duskis.

The Java Source files

The controller RestServiceController

package de.schaeftlein.dev.spring.rest.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import de.schaeftlein.dev.spring.rest.dao.PersonDao;
import de.schaeftlein.dev.spring.rest.domain.People;
import de.schaeftlein.dev.spring.rest.domain.Person;

@Controller
@RequestMapping("/people")
public class RestServiceController
{
  @Autowired
  private PersonDao personDao;
  

  @RequestMapping(method = RequestMethod.GET)
  @Transactional(readOnly = true)
  @ResponseBody
  public People getAll() {
    List persons = personDao.getPeople();
    People people = new People(persons);
    return people;
  }
  
  @RequestMapping(value = "/person/{id}", method = RequestMethod.GET)
  @ResponseBody
  @Transactional(readOnly = true)
  public Person getPerson(@PathVariable("id") Long personId) {
    return personDao.getPerson(personId);
  }
  
  @RequestMapping(method = RequestMethod.POST)
  @Transactional(readOnly = false)
  @ResponseBody
  public Person savePerson(@RequestBody Person person) {
    personDao.savePerson(person);
    return person;
  }
}

The Interface for the DAO PersonDAO

package de.schaeftlein.dev.spring.rest.dao;

import java.util.List;

import de.schaeftlein.dev.spring.rest.domain.Person;

public interface PersonDao {

  public Person getPerson(Long personId);

  public void savePerson(Person person);

  public List getPeople();

  public Person getPersonByUsername(String username);

}

The DAO implementation PersonDAOHibernate

package de.schaeftlein.dev.spring.rest.dao.hibernate;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;

import de.schaeftlein.dev.spring.rest.dao.PersonDao;
import de.schaeftlein.dev.spring.rest.domain.Person;

@Repository
@Transactional
@SuppressWarnings("unchecked")
public class PersonDaoHibernate extends HibernateDaoSupport implements
    PersonDao {

  @Autowired
  public void setupSessionFactory(SessionFactory sessionFactory) {
    this.setSessionFactory(sessionFactory);
  }

  public Person getPerson(Long personId) throws DataAccessException {
    return this.getHibernateTemplate().get(Person.class, personId);
  }

  @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
  public void savePerson(Person person) throws DataAccessException {
    this.getHibernateTemplate().saveOrUpdate(person);
  }

  public List getPeople() throws DataAccessException {
    return this.getHibernateTemplate().find("select people from Person people");
  }

  public Person getPersonByUsername(String username) {
    List people = this.getHibernateTemplate().findByNamedParam(
        "select people from Person people "
            + "where people.username = :username", "username", username);
    Person person = getFirst(people);
    if (person != null)
      getHibernateTemplate().evict(person);
    return person;
  }


  private static  T getFirst(List list) {
    return CollectionUtils.isEmpty(list) ? null : list.get(0);
  }
}

The JAXB domain object People

package de.schaeftlein.dev.spring.rest.domain;

import java.io.Serializable;
import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class People implements Serializable {
  private static final long serialVersionUID = 1L;

  private List person;

  public People() {
    // empty constructor required for JAXB
  }

  public People(List person) {
    this.person = person;
  }

  public List getPerson() {
    return person;
  }

  public void setPerson(List person) {
    this.person = person;
  }

}

The JAXB and JPA entity domain object Person

package de.schaeftlein.dev.spring.rest.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Version;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@XmlRootElement
public class Person implements Serializable
{
  private static final long serialVersionUID = 1L;

  @Id
  @GeneratedValue
  private Long id;
  private String firstName;
  private String lastName;
  private String username;
  private String password;
  private int roleLevel;

  @Version
  private Integer version;

  public Person()
  {

  }

  public Person(String firstName, String lastName, String username, String password, int roleLevel)
  {
    this.firstName = firstName;
    this.lastName = lastName;
    this.username = username;
    this.password = password;
    this.roleLevel = roleLevel;
  }

  public Long getId()
  {
    return id;
  }

  public void setId(Long id)
  {
    this.id = id;
  }

  public String getFirstName()
  {
    return firstName;
  }

  public void setFirstName(String firstName)
  {
    this.firstName = firstName;
  }

  public String getLastName()
  {
    return lastName;
  }

  public void setLastName(String lastName)
  {
    this.lastName = lastName;
  }

  public String getUsername()
  {
    return username;
  }

  public void setUsername(String username)
  {
    this.username = username;
  }

  public String getPassword()
  {
    return password;
  }

  public void setPassword(String password)
  {
    this.password = password;
  }

  public int getRoleLevel()
  {
    return roleLevel;
  }

  public void setRoleLevel(int roleLevel)
  {
    this.roleLevel = roleLevel;
  }

  public Integer getVersion()
  {
    return version == null ? 1 : version;
  }

  public void setVersion(Integer version)
  {
    this.version = version;
  }

  public enum RoleLevel {
    ADMIN(1), GUEST(2), PUBLIC(3);
    private final int level;

    RoleLevel(int value)
    {
      this.level = value;
    }

    public static RoleLevel getLevel(String roleName)
    {
      return RoleLevel.valueOf(roleName);
    }

    public int getLevel()
    {
      return this.level;
    }
  }

  @Override
  public boolean equals(Object obj)
  {
    if (obj == null)
    {
      return false;
    }
    else if (!(obj instanceof Person))
    {
      return false;
    }
    else
    {
      Person p = (Person) obj;
      if (p.getId().equals(getId()) && p.getUsername().equals(getUsername()) && 
          p.getVersion().equals(getVersion()) && 
          p.getLastName().equals(getLastName()) && p.getPassword().equals(getPassword())
          && p.getFirstName().equals(getFirstName()) && p.getRoleLevel() == getRoleLevel())
      {
        return true;
      }
    }
    return false;
  }

}

The DAO test PersonDAOTest

package de.schaeftlein.dev.spring.rest.dao;

import java.util.List;

import static junit.framework.Assert.*;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;

import de.schaeftlein.dev.spring.rest.domain.Person;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:spring-context.xml" })
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = false)
public class PersonDaoTest {

  @Autowired
  PersonDao personDao;
  
  private Logger log = LoggerFactory.getLogger(PersonDaoTest.class);

  @Test
  public void testPerson() {
    String username = "jane.doe";
    Person person = new Person("Jane", "Doe", username, "password",
        Person.RoleLevel.ADMIN.getLevel());
    person.setVersion(1);
    personDao.savePerson(person);

    final List people = personDao.getPeople();
    assertEquals(1, people.size());
    assertEquals(person,people.get(0));
    
    Long personId = person.getId();
    Person savedPerson = personDao.getPerson(personId);
    assertEquals(username,savedPerson.getUsername());
  }

  @Test
  public void testVersion() {
    Person solomon = new Person("John", "Doe", "john.doe", "mypass",
        Person.RoleLevel.ADMIN.getLevel());
    // version 0
    personDao.savePerson(solomon);
    
    Integer version = solomon.getVersion();
    log.info("old version:"+solomon.getVersion());

    
    solomon = personDao.getPersonByUsername("john.doe");
    solomon.setPassword("password1");
    // version 1
    personDao.savePerson(solomon);
    
    log.info("new version:"+solomon.getVersion());
    
    assertTrue(!(version.equals(solomon.getVersion())));
  }
}

The Rest test RestClientTest

package de.schaeftlein.dev.spring.rest.itest.controller;

import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;

import java.util.Collections;
import java.util.Map;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.web.client.RestTemplate;

import de.schaeftlein.dev.spring.rest.domain.People;
import de.schaeftlein.dev.spring.rest.domain.Person;

@RunWith(SpringJUnit4ClassRunner.class)  
@ContextConfiguration(locations={"classpath:spring-context.xml"}) 
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = false)
public class RestClientTest
{
  
  private static final String BASE_URL = "http://localhost:9090/spring3-rest-sample/people";
  
  private Logger log = LoggerFactory.getLogger(RestClientTest.class);
  
  @Autowired
  private RestTemplate restTemplate;

  @Test
  public void saveAndGet() throws Exception{
    // save
    Person input = new Person("jane","doe","jane.doe","pw",Person.RoleLevel.ADMIN.getLevel());
    assertNull(input.getId());
    Person output = restTemplate.postForObject(BASE_URL, input, Person.class, new Object[]{});
    assertNotNull("no person",output);
    assertNotNull(output.getId());
    assertEquals(input.getUsername(), output.getUsername());
    log.info("Saved jane.doe with id "+output.getId());
    // get all
    People people = restTemplate.getForObject(BASE_URL, People.class,new Object[]{});
    assertNotNull("no people",people);
    assertNotNull("no persons in people",people.getPerson());
    assertTrue("empty persons in people",!people.getPerson().isEmpty());
    assertEquals("no one person in people",input.getUsername(),people.getPerson().get(0).getUsername());
    log.info("Peple size "+people.getPerson().size());
    // get id
    Map vars = Collections.singletonMap("id", output.getId()+"");
    Person idPerson = restTemplate.getForObject(BASE_URL+"/person/{id}", Person.class,vars);
    assertNotNull("no person",idPerson);
    assertNotNull(idPerson.getId());
    assertEquals(input.getUsername(), idPerson.getUsername());
    log.info("Get person by id <"+output.getId()+"> : "+idPerson.getUsername());
  }
  
}

The configuration files

The Spring annotation.xml




	
	
	 
	
	
	
	

The JDBC settings jdbc.properties

jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/test
jdbc.username=test
jdbc.password=test
jdbc.initialPoolSize=5
jdbc.maxPoolSize=100
jdbc.minPoolSize=5
jdbc.maxStatementsPerConnection=25
jdbc.maxStatements=50
jpa.databasePlatform=org.hibernate.dialect.MySQL5InnoDBDialect
jpa.showSql=true
jdbc.schema=test
jdbc.dataTypeFactory=org.dbunit.ext.mysql.MySqlDataTypeFactory
jdbc.autoCommitOnClose=true
jdbc.autoCommit=true
hibernate.release_mode=after_transaction
hibernate.hbm2ddl=create
hibernate.auto_close_session=true
hibernate.current_session_context_class=thread
hibernate.flush_before_completion=true

The JAXB marshalling.xml




  

  
    
      
        de.schaeftlein.dev.spring.rest.domain.Person
        de.schaeftlein.dev.spring.rest.domain.People
      
    
  




The AOP based transactionAdvices.xml




  
    
    
  

  
    
      
      
    
  




The spring-dispatcher.xml



  
  
  
   
  
    
  
    
      
        
      
    
 

  

The spring-context.xml



	
	
	

   

    
      
    

	
		
			${jdbc.driverClassName}
		
		
			${jdbc.url}
		
		
			${jdbc.username}
		
		
			${jdbc.password}
		
		
			${jdbc.autoCommitOnClose}
		
		
			${jdbc.initialPoolSize}
		
		
			${jdbc.maxPoolSize}
		
		
			${jdbc.minPoolSize}
		
		
			${jdbc.maxStatementsPerConnection}
		
		
			${jdbc.maxStatements}
		
	

	

	
		
			
				${jdbc.url} 
				${jdbc.driverClassName}
				${jdbc.username} 
				${jdbc.password}
				${jdbc.autoCommit}
				${hibernate.release_mode}
				${hibernate.hbm2ddl}
				${hibernate.auto_close_session}
				${hibernate.current_session_context_class}
				false
				false
				javassist
				${hibernate.flush_before_completion}
			
		
	

	
	
	   


The web.xml





  spring3-rest-sample
  Spring 3 Rest sample
  

  
    contextConfigLocation
    classpath:spring-context.xml
  

  
    org.springframework.web.context.ContextLoaderListener
    
  

  
    springDispatcher
    org.springframework.web.servlet.DispatcherServlet
    
      contextConfigLocation
      classpath:spring-dispatcher.xml
    
    2
  

  
  
    springDispatcher
    /*
  


The Maven pom.xml


	4.0.0
	de.schaeftlein.dev.spring.rest
	spring3-rest-sample
	war
	1.0-SNAPSHOT
	spring3-rest-sample Maven Webapp
	A sample project for showing how to write JUnit Test against Spring 3 Rest Services
    
     
       Ralf Schäftlein
       http://ralf.schaeftlein.com
     
    
    2010
    
      bugzilla
      http://ubuntu-vm.localdomain/cgi-bin/bugzilla3/index.cgi
    
    http://ralf.schaeftlein.de/2010/03/05/junit-tests-for-spring-3-rest-spring-3-rest-services

	
		
			
				org.apache.maven.plugins
				maven-surefire-report-plugin
				2.5
			
			
				org.apache.maven.plugins
				maven-checkstyle-plugin
				2.5
			
			
				org.apache.maven.plugins
				maven-javadoc-plugin
				2.6.1
			
			
				org.codehaus.mojo
				cobertura-maven-plugin
				2.3
			
			
				org.apache.maven.plugins
				maven-pmd-plugin
				2.4
				
					utf-8
					1.6
				
			
			
				org.apache.maven.plugins
				maven-jxr-plugin
				2.1
				
					UTF-8
					UTF-8
				
			
			
				org.codehaus.mojo
				taglist-maven-plugin
				2.4
			
			
				org.apache.maven.plugins
				maven-changes-plugin
				2.3
				
					
						
							changes-report
						
					
				
			
		
	
	
		
			internal
			
				dav:http://ubuntu-vm.localdomain:8081/artifactory/internal
			
		
		
			snapshots
			
				dav:http://ubuntu-vm.localdomain:8081/artifactory/snapshots
			
		
	
	
		
           scm:svn:http://ubuntu-vm.localdomain/svn/
       
		
           scm:svn:http://ubuntu-vm.localdomain/svn/
       
		http://ubuntu-vm.localdomain/svn/
	
	
		Hudson
		http://ubuntu-vm.localdomain/hudson/job/spring3-rest-sample
	
	
		spring3-rest-sample
		
			
				org.apache.maven.plugins
				maven-surefire-report-plugin
				2.5
			
			
				org.apache.maven.plugins
				maven-deploy-plugin
				2.5
			
			
				org.apache.maven.plugins
				maven-surefire-plugin
				2.5
				
					true
				
				
					
						surefire-test
						test
						
							test
						
						
							false
							
								**/itest/**
							
						
					

					
						surefire-itest
						integration-test
						
							test
						
						
							false
							
								**/itest/**
							
						
					
				
			
			
				org.apache.maven.plugins
				maven-pmd-plugin
				2.4
				
					utf-8
					1.6
				
				
					
						
							check
							cpd-check
						
					
				
			
			
				org.codehaus.mojo
				cobertura-maven-plugin
				2.3
				
					
						html
						xml
					
				
			
			
				org.apache.maven.plugins
				maven-jxr-plugin
				2.1
			
			
				org.apache.maven.plugins
				maven-checkstyle-plugin
				2.5
			
			
				maven-compiler-plugin
				2.1
				
					1.6
					1.6
				
			
			
				org.mortbay.jetty
				maven-jetty-plugin
				6.1.22
				
					10
					foo
					9999
					/${artifactId}
					
						
							9090
							60000
						
					
				
				
					
						start-jetty
						pre-integration-test
						
							run
						
						
							0
							true
						
					
					
						stop-jetty
						post-integration-test
						
							stop
						
					
				
			

			
				org.apache.maven.plugins
				maven-eclipse-plugin
				2.8
				
					true
					true
					2.0
				
			
			
			
				org.apache.maven.plugins
				maven-jar-plugin
				2.3
				
					
						
							true
						
					
				
			
			
			
				org.apache.maven.plugins
				maven-source-plugin
				2.1.1
				
					
						attach-sources
						verify
						
							jar
						
					
				
			
			
				org.apache.maven.plugins
				maven-scm-plugin
				1.3
				
					${svn_username}
					${svn_password}
				
			
			
				org.apache.maven.plugins
				maven-war-plugin
				2.1-beta-1
				
					src/main/webapp
					src/main/webapp/WEB-INF/web.xml
					
					
						
					
						
							true
							lib/
						
					
				
			
		
		
		
			
				src/main/resources
				
					**/.svn
					**/.svn/**
					**/_svn
					_svn
					**/_svn/**
				
			
		
		
			
				src/test/resources
				
					**/.svn
					**/.svn/**
					**/_svn
					_svn
					**/_svn/**
				
			
		
	



	
		3.0.1.RELEASE
		1.5.2
		UTF-8
	

	
		
		
			org.aspectj
			aspectjweaver
			1.6.2
		
		
			org.aspectj
			aspectjrt
			1.6.2
			
		
		
			org.springframework
			spring-beans
			${spring.framework.version}
		
		
			org.springframework
			spring-context-support
			${spring.framework.version}
			
				
					quartz
					quartz
				
			
		
		
			org.springframework
			spring-core
			${spring.framework.version}
		
		
			org.springframework
			spring-aspects
			${spring.framework.version}
		
		
			org.springframework
			spring-jdbc
			${spring.framework.version}
		
		
			org.springframework
			spring-test
			${spring.framework.version}
			test
		
		
			org.springframework
			spring-orm
			${spring.framework.version}
		
		
			org.springframework
			spring-oxm
			${spring.framework.version}
		
		
			org.springframework
			spring-tx
			${spring.framework.version}
		
		
			org.springframework
			spring-web
			${spring.framework.version}
		
		
			org.springframework
			spring-webmvc
			${spring.framework.version}
		

		
		
			cglib
			cglib-nodep
			2.1_3
		
		
			org.hibernate
			hibernate-annotations
			3.2.0.ga
		
		
			org.hibernate
			hibernate
			3.2.6.ga
		
		
			javax.persistence
			persistence-api
			1.0
		
		
			javassist
			javassist
			3.11.0.GA
		

		
		
			mysql
			mysql-connector-java
			5.1.12
			jar
			compile
		
		
			c3p0
			c3p0
			0.9.1.2
			jar
			compile
		
		
			commons-dbcp
			commons-dbcp
			1.4
		
		
			commons-collections
			commons-collections
			3.2.1
		
		
			javax.transaction
			jta
			1.1
		

		
		
			javax.xml.bind
			jaxb-api
			2.0
		

		
		
			junit
			junit
			4.8.1
			test
		
		
		
			org.slf4j
			slf4j-api
			${org.slf4j.version}
		
		
			org.slf4j
			slf4j-simple
			${org.slf4j.version}
		
		
		
			org.mortbay.jetty
			maven-jetty-plugin
			6.1.15
			test
		

	


Sample Content for Poster

The person.xml



    Jane
    Doe
    jane.doe
    bar
    2