title: I can't find the dependency for com.google.api.client.util.Preconditions using Maven
body: <p>I'm new with Google Calendar API. What I'm trying to do here is to post an Event to the Google Calendar with the e-mail given by the user. My problem now is, when I tried to do the configuration, I get this exception:</p>
  
  <pre><code>Caused by: java.lang.ClassNotFoundException: com.google.api.client.util.Preconditions
  </code></pre>
  
  <p>I have tried different versions of the google api but I can't find which jar contains this class. The part on my code that's causing this exception is this :</p>
  
  <pre><code>GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(
                  httpTransport, jsonFactory, clientId, clientSecret,
                  Arrays.asList(CalendarScopes.CALENDAR)).setAccessType("online")
                  .setApprovalPrompt("auto").build();
  </code></pre>
  
  <p>Thanks in advance to anyone who will help.</p>
  
  <p>Here's my pom file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
  
      &lt;licenses&gt;
          &lt;license&gt;
              &lt;name&gt;Apache License, Version 2.0&lt;/name&gt;
              &lt;distribution&gt;repo&lt;/distribution&gt;
              &lt;url&gt;http://www.apache.org/licenses/LICENSE-2.0.html&lt;/url&gt;
          &lt;/license&gt;
      &lt;/licenses&gt;
  
      &lt;properties&gt;
          &lt;!-- Explicitly declaring the source encoding eliminates the following 
              message: --&gt;
          &lt;!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
              resources, i.e. build is platform dependent! --&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  
          &lt;!-- JBoss dependency versions --&gt;
          &lt;version.jboss.maven.plugin&gt;7.4.Final&lt;/version.jboss.maven.plugin&gt;
  
          &lt;!-- Define the version of the JBoss BOMs we want to import to specify 
              tested stacks. --&gt;
          &lt;version.jboss.bom&gt;1.0.7.Final&lt;/version.jboss.bom&gt;
  
  
          &lt;!-- other plugin versions --&gt;
          &lt;version.surefire.plugin&gt;2.10&lt;/version.surefire.plugin&gt;
          &lt;version.war.plugin&gt;2.1.1&lt;/version.war.plugin&gt;
          &lt;version.compiler.plugin&gt;3.1&lt;/version.compiler.plugin&gt;
  
          &lt;!-- maven-compiler-plugin --&gt;
          &lt;maven.compiler.target&gt;1.7&lt;/maven.compiler.target&gt;
          &lt;maven.compiler.source&gt;1.7&lt;/maven.compiler.source&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;jboss-repo&lt;/id&gt;
              &lt;url&gt;http://repository.jboss.org/nexus/content/groups/public-jboss/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;prime-repo&lt;/id&gt;
              &lt;name&gt;PrimeFaces Maven Repository&lt;/name&gt;
              &lt;url&gt;http://repository.primefaces.org&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;mobicents-public-repository-group&lt;/id&gt;
              &lt;name&gt;Mobicens Public Maven Repository Group&lt;/name&gt;
              &lt;url&gt;https://oss.sonatype.org/content/groups/public&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
              &lt;releases&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
                  &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
              &lt;/releases&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
                  &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;!-- JBoss distributes a complete set of Java EE 6 APIs including a Bill 
                  of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection) 
                  of artifacts. We use this here so that we always get the correct versions 
                  of artifacts. Here we use the jboss-javaee-6.0-with-tools stack (you can 
                  read this as the JBoss stack of the Java EE 6 APIs, with some extras tools 
                  for your project, such as Arquillian for testing) and the jboss-javaee-6.0-with-hibernate 
                  stack you can read this as the JBoss stack of the Java EE 6 APIs, with extras 
                  from the Hibernate family of projects) --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.jboss.bom&lt;/groupId&gt;
                  &lt;artifactId&gt;jboss-javaee-6.0-with-tools&lt;/artifactId&gt;
                  &lt;version&gt;${version.jboss.bom}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.jboss.bom&lt;/groupId&gt;
                  &lt;artifactId&gt;jboss-javaee-6.0-with-hibernate&lt;/artifactId&gt;
                  &lt;version&gt;${version.jboss.bom}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.jboss.bom&lt;/groupId&gt;
                  &lt;artifactId&gt;jboss-javaee-6.0-with-security&lt;/artifactId&gt;
                  &lt;version&gt;${version.jboss.bom}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;dependencies&gt;
  
          &lt;!-- First declare the APIs we depend on and need for compilation. All 
              of them are provided by JBoss AS 7 --&gt;
  
          &lt;!-- Import the CDI API, we use provided scope as the API is included in 
              JBoss AS 7 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
              &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the Common Annotations API (JSR-250), we use provided scope 
              as the API is included in JBoss AS 7 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.annotation&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-annotations-api_1.1_spec&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the JAX-RS API, we use provided scope as the API is included 
              in JBoss AS 7 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.ws.rs&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-jaxrs-api_1.1_spec&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the JPA API, we use provided scope as the API is included in 
              JBoss AS 7 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the EJB API, we use provided scope as the API is included in 
              JBoss AS 7 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.ejb&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-ejb-api_3.1_spec&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- JSR-303 (Bean Validation) Implementation --&gt;
          &lt;!-- Provides portable constraints such as @Email --&gt;
          &lt;!-- Hibernate Validator is shipped in JBoss AS 7 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the JSF API, we use provided scope as the API is included in 
              JBoss AS 7 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.faces&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-jsf-api_2.1_spec&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Now we declare any tools needed --&gt;
  
          &lt;!-- Annotation processor to generate the JPA 2.0 metamodel classes for 
              typesafe criteria queries --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-jpamodelgen&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Annotation processor that raising compilation errors whenever constraint 
              annotations are incorrectly used. --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator-annotation-processor&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Needed for running tests (you may also use TestNG) --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Optional, but highly recommended --&gt;
          &lt;!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA) 
              JPA from JUnit/TestNG --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.arquillian.junit&lt;/groupId&gt;
              &lt;artifactId&gt;arquillian-junit-container&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.arquillian.protocol&lt;/groupId&gt;
              &lt;artifactId&gt;arquillian-protocol-servlet&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.el&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-el-api_2.2_spec&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.mail&lt;/groupId&gt;
              &lt;artifactId&gt;mail&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.antlr&lt;/groupId&gt;
              &lt;artifactId&gt;ST4&lt;/artifactId&gt;
              &lt;version&gt;4.0.7&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
              &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
              &lt;version&gt;4.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.primefaces.extensions&lt;/groupId&gt;
              &lt;artifactId&gt;primefaces-extensions&lt;/artifactId&gt;
              &lt;version&gt;1.1.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;joda-time&lt;/groupId&gt;
              &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- For File upload tag --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
              &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-lang&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-codec&lt;/groupId&gt;
              &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-beanutils&lt;/groupId&gt;
              &lt;artifactId&gt;commons-beanutils&lt;/artifactId&gt;
              &lt;version&gt;1.8.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-collections&lt;/groupId&gt;
              &lt;artifactId&gt;commons-collections&lt;/artifactId&gt;
              &lt;version&gt;3.2.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-logging&lt;/groupId&gt;
              &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;version&gt;1.1.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- For MimeType detection of uploaded files --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;jmimemagic&lt;/groupId&gt;
              &lt;artifactId&gt;jmimemagic&lt;/artifactId&gt;
              &lt;version&gt;0.1.2&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- For splitting pdf into individual pages --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.itextpdf&lt;/groupId&gt;
              &lt;artifactId&gt;itextpdf&lt;/artifactId&gt;
              &lt;version&gt;5.3.4&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;1.7.5&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.omnifaces&lt;/groupId&gt;
              &lt;artifactId&gt;omnifaces&lt;/artifactId&gt;
              &lt;version&gt;1.6.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- SIP servlet, cool stuff starts here --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mobicents.servlet.sip&lt;/groupId&gt;
              &lt;artifactId&gt;sip-servlets-spec&lt;/artifactId&gt;
              &lt;version&gt;2.1.0-SNAPSHOT&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mobicents.servlet.sip&lt;/groupId&gt;
              &lt;artifactId&gt;sip-servlets-client&lt;/artifactId&gt;
              &lt;version&gt;2.1.0-SNAPSHOT&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;2.2.4&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.apis&lt;/groupId&gt;
              &lt;artifactId&gt;google-api-services-calendar&lt;/artifactId&gt;
              &lt;version&gt;v3-rev74-1.17.0-rc&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.api-client&lt;/groupId&gt;
              &lt;artifactId&gt;google-api-client&lt;/artifactId&gt;
              &lt;version&gt;1.17.0-rc&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.http-client&lt;/groupId&gt;
              &lt;artifactId&gt;google-http-client-jackson2&lt;/artifactId&gt;
              &lt;version&gt;1.12.0-beta&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi&lt;/artifactId&gt;
              &lt;version&gt;3.10-beta1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.primefaces.themes&lt;/groupId&gt;
              &lt;artifactId&gt;bootstrap&lt;/artifactId&gt;
              &lt;version&gt;1.0.10&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javassist&lt;/groupId&gt;
              &lt;artifactId&gt;javassist&lt;/artifactId&gt;
              &lt;version&gt;3.12.1.GA&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-as-controller-client&lt;/artifactId&gt;
              &lt;version&gt;7.2.0.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.as.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-as-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;7.5.Final&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-servlet-api_3.0_spec&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.seam.security&lt;/groupId&gt;
              &lt;artifactId&gt;seam-security&lt;/artifactId&gt;
              &lt;version&gt;3.2.0.Final&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
              &lt;version&gt;1.8.5&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.seam.faces&lt;/groupId&gt;
              &lt;artifactId&gt;seam-faces&lt;/artifactId&gt;
              &lt;version&gt;3.2.0.Final&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;net.sf.jsr107cache&lt;/groupId&gt;
              &lt;artifactId&gt;jsr107cache&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.jdo&lt;/groupId&gt;
              &lt;artifactId&gt;jdo2-api&lt;/artifactId&gt;
              &lt;version&gt;2.3-eb&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
  
      &lt;build&gt;
          &lt;!-- Maven will append the version to the finalName (which is the name 
              given to the generated war, and hence the context root) --&gt;
          &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;!-- Compiler plugin enforces Java 1.6 compatibility and activates annotation 
                  processors --&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${version.compiler.plugin}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${maven.compiler.source}&lt;/source&gt;
                      &lt;target&gt;${maven.compiler.target}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${version.war.plugin}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! --&gt;
                      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;!-- The JBoss AS plugin deploys your war to a local JBoss AS container --&gt;
              &lt;!-- To use, run: mvn package jboss-as:deploy --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jboss.as.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;jboss-as-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${version.jboss.maven.plugin}&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;!-- The default profile skips all tests, though you can tune it to run 
                  just unit tests based on a custom pattern --&gt;
              &lt;!-- Seperate profiles are provided for running all tests, including Arquillian 
                  tests that execute in the specified container --&gt;
              &lt;id&gt;default&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                          &lt;version&gt;${version.surefire.plugin}&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;skip&gt;true&lt;/skip&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;!-- An optional Arquillian testing profile that executes tests in your 
                  JBoss AS instance --&gt;
              &lt;!-- This profile will start a new JBoss AS instance, and execute the 
                  test, shutting it down when done --&gt;
              &lt;!-- Run with: mvn clean test -Parq-jbossas-managed --&gt;
              &lt;id&gt;arq-jbossas-managed&lt;/id&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
                      &lt;artifactId&gt;jboss-as-arquillian-container-managed&lt;/artifactId&gt;
                      &lt;scope&gt;test&lt;/scope&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;!-- An optional Arquillian testing profile that executes tests in a remote 
                  JBoss AS instance --&gt;
              &lt;!-- Run with: mvn clean test -Parq-jbossas-remote --&gt;
              &lt;id&gt;arq-jbossas-remote&lt;/id&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
                      &lt;artifactId&gt;jboss-as-arquillian-container-remote&lt;/artifactId&gt;
                      &lt;scope&gt;test&lt;/scope&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;!-- When built in OpenShift the 'openshift' profile will be used when 
                  invoking mvn. --&gt;
              &lt;!-- Use this profile for any OpenShift specific customization your app 
                  will need. --&gt;
              &lt;!-- By default that is to put the resulting archive into the 'deployments' 
                  folder. --&gt;
              &lt;!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html --&gt;
              &lt;id&gt;openshift&lt;/id&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                          &lt;version&gt;${version.war.plugin}&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;deployments&lt;/outputDirectory&gt;
                              &lt;warName&gt;ROOT&lt;/warName&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
      &lt;/profiles&gt;
  
  &lt;/project&gt;
  </code></pre>