title: Jenkins and Maven
body: <p><a href="http://i.stack.imgur.com/ugYU3.png" rel="nofollow">see Project Structure </a>I am trying to deploy my SOA project using Jenkins and Maven.</p>
  
  <p>while deployment I am getting below error. Can some one please help me with this.</p>
  
  <p>while using only maven command I am able to deploy this project on SOA server. I am getting error only when I try to deploy project using Jenkins. </p>
  
  <pre><code>Started by user Atul Gupta
  Building in workspace C:\Users\atulgupt\.jenkins\workspace\sca-test
  Checking out a fresh workspace because there's no workspace at C:\Users\---\.jenkins\workspace\sca-test
  Cleaning local Directory .
  Checking out ----/BPEL/Trunk/test-soa-application at revision '2016-09-14T15:34:08.345 +0530'
  </code></pre>
  
  <p>Parsing POMs</p>
  
  <pre><code>**Failed to transfer Could not find artifact com.oracle.soa:sar-common:pom:12.2.1-0-0 in central (http://repo.maven.apache.org/maven2)
  ERROR: Failed to parse POMs
  org.apache.maven.project.ProjectBuildingException**: **Some problems were encountered while processing the POMs:
  [FATAL] Non-resolvable parent POM: Could not find artifact com.oracle.soa:sar-common:pom:12.2.1-0-0 in central (http://repo.maven.apache.org/maven2) and** 'parent.relativePath' points at no local POM @ line 21, column 13
  </code></pre>
  
  <p>Parent POM:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;org.my.test&lt;/groupId&gt;
      &lt;artifactId&gt;test-soa-application&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;modules&gt;
          &lt;!-- Add project modules --&gt;
          &lt;module&gt;test-soa-project&lt;/module&gt;
      &lt;/modules&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Project POM.xml:-</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;org.my.test&lt;/groupId&gt;
      &lt;artifactId&gt;test-soa-project&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;sar&lt;/packaging&gt;
  
      &lt;!--
             This POM was generated from the SOA Maven Archetype.
             Comments in this POM guide you how to use it with your project.
             This POM relates to this SOA Composite, i.e. the one in this same directory.
             There is another POM in the SOA Application directory (up one) which handles 
             the whold SOA Application, which may contain additional projects.
  
             The parent points to the common SOA parent POM.  That is a special POM that is 
             shipped by Oracle as a point of customization (only).  You can add default values
             for properties like serverUrl, etc. to the SOA common parent POM, so that you
             do not have to specify them over and over in every project POM. 
      --&gt;
      &lt;parent&gt;
          &lt;groupId&gt;com.oracle.soa&lt;/groupId&gt;
          &lt;artifactId&gt;sar-common&lt;/artifactId&gt;
          &lt;version&gt;12.2.1-0-0&lt;/version&gt;
          &lt;relativePath&gt;&lt;/relativePath&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;!-- these parameters are used by the compile goal --&gt;
          &lt;scac.input.dir&gt;${project.basedir}/SOA/&lt;/scac.input.dir&gt;
          &lt;scac.output.dir&gt;${project.basedir}/target&lt;/scac.output.dir&gt;
          &lt;scac.input&gt;${scac.input.dir}/composite.xml&lt;/scac.input&gt;
          &lt;scac.output&gt;${scac.output.dir}/out.xml&lt;/scac.output&gt;
          &lt;scac.error&gt;${scac.output.dir}/error.txt&lt;/scac.error&gt;
          &lt;scac.displayLevel&gt;1&lt;/scac.displayLevel&gt;
          &lt;!-- if you are using a config plan, uncomment the following line and update to point 
               to your config plan --&gt;
          &lt;!--&lt;configplan&gt;${scac.input.dir}/configplan.xml&lt;/configplan&gt;--&gt;
  
          &lt;!-- these parameters are used by the deploy and undeploy goals --&gt;
          &lt;composite.name&gt;${project.artifactId}&lt;/composite.name&gt;
          &lt;composite.revision&gt;${project.version}&lt;/composite.revision&gt;
          &lt;composite.partition&gt;default&lt;/composite.partition&gt;
          &lt;serverUrl&gt;http://localhost:7071&lt;/serverUrl&gt;
          &lt;user&gt;atulgupt&lt;/user&gt;
          &lt;password&gt;july@2016&lt;/password&gt;
          &lt;overwrite&gt;true&lt;/overwrite&gt;
          &lt;forceDefault&gt;true&lt;/forceDefault&gt;
          &lt;regenerateRulebase&gt;false&lt;/regenerateRulebase&gt;
          &lt;keepInstancesOnRedeploy&gt;false&lt;/keepInstancesOnRedeploy&gt;
  
          &lt;!-- these parameters are used by the test goal --&gt;
          &lt;!-- if you are using the sca-test (test) goal, you need to uncomment the following
               line and point it to your jndi.properties file. --&gt;
          &lt;!--&lt;jndi.properties.input&gt;${basedir}/jndi.properties&lt;/jndi.properties.input&gt;--&gt;
          &lt;scatest.result&gt;${scac.output.dir}/testResult&lt;/scatest.result&gt;
          &lt;!--  input is the name of the composite to run test suties against --&gt;
          &lt;input&gt;test-soa-project&lt;/input&gt;
          &lt;oracleHome&gt;
              ${env.ORACLE_HOME}
          &lt;/oracleHome&gt;
      &lt;/properties&gt;
  
      &lt;!--
             These refer to the properties defined above.  You should probably not need to make 
             any changes beflow this point - these just point to the properties above.
      --&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.oracle.soa.plugin&lt;/groupId&gt;
                  &lt;artifactId&gt;oracle-soa-plugin&lt;/artifactId&gt;
                  &lt;version&gt;12.2.1-0-0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;compositeName&gt;test-soa-project&lt;/compositeName&gt;
                      &lt;composite&gt;${scac.input}&lt;/composite&gt;
                      &lt;sarLocation&gt;${scac.output.dir}/sca_${project.artifactId}_rev${version}.jar&lt;/sarLocation&gt;
                      &lt;serverUrl&gt;${serverUrl}&lt;/serverUrl&gt;
                      &lt;!-- note: compositeRevision is needed to package, revision is needed to undeploy --&gt;
                      &lt;compositeRevision&gt;${composite.revision}&lt;/compositeRevision&gt;
                      &lt;revision&gt;${composite.revision}&lt;/revision&gt;
                      &lt;scacInputDir&gt;${scac.input.dir}&lt;/scacInputDir&gt;
                      &lt;!-- Uncomment the appHome property if your composite 
                           depends on MDS. --&gt;
                      &lt;!--&lt;appHome&gt;${project.basedir}/..&lt;/appHome&gt;--&gt;
                      &lt;!--  If you have a composite which contains a component that 
                            depends on MDS (eg. Human Task, Business Rule) AND you 
                            want to use a file-based MDS repository, then you 
                            need to do either:
                            1. update the .adf/META-INF/adf-config.xml to point to
                               the correct location of the file based repository, i.e.
                               remove the reference to ${soa.oracle.home} in that file, or
                            2. define oracleHome and soaOracleHome here and leave the adf-config.xml file
                               as is.  Note that the correct value for soaOracleHome is the path to 
                               your SOA Quickstart or JDeveloper install directory, 
                               with "/soa" appended to it.
                      --&gt;
                      &lt;!--&lt;oracleHome&gt;JDEV_HOME&lt;/oracleHome&gt;--&gt;
                      &lt;!--&lt;soaOracleHome&gt;JDEV_HOME/soa&lt;/soaOracleHome&gt;--&gt;
                      &lt;input&gt;${input}&lt;/input&gt;
                  &lt;/configuration&gt;
                  &lt;!-- extensions=true is needed to use the custom sar packaging type --&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.oracle.adf.plugin&lt;/groupId&gt;
                  &lt;artifactId&gt;ojdeploy&lt;/artifactId&gt;
                  &lt;version&gt;12.2.1-0-0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;ojdeploy&gt;
                          ${oracleHome}/jdeveloper/jdev/bin/ojdeploy.exe
                      &lt;/ojdeploy&gt;
                      &lt;workspace&gt;
                          ${basedir}/../test-soa-application.jws
                      &lt;/workspace&gt;
                      &lt;project&gt;
                          test-soa-project
                      &lt;/project&gt;
                      &lt;profile&gt;
                          test-soa-project
                      &lt;/profile&gt;
                      &lt;outputfile&gt;
                          ${project.build.directory}/${project.build.finalName}.jar
                      &lt;/outputfile&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;deploy&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>