title: TeamCity, Maven Build not found child module
body: <p>I've Maven project with one subproject, when I run my install task on parent project from IDEA (IntelliJ IDEA) all works fine and <strong>maven</strong> resolve child module. </p>
  
  <p>My projects are versioned on <strong>subversion</strong>, and this is the filesystem structure:</p>
  
  <pre><code>project
  |--pom.xml
  |--subproject
     |
     |-- branches
     |-- tags
     |-- trunk (here there is my subproject source, also pom.xml file)
  </code></pre>
  
  <p>I've create project with its subproject, from svn URL, on <strong>teamcity</strong> server.</p>
  
  <p>When I run Build on parent project it fail and return me the following error:</p>
  
  <pre><code>[Step 1/1] Error reading Maven project: Some problems were encountered while processing the POMs:
  [ERROR] Child module /opt/buildAgent/work/ee114e0c77ee2c44/subproject of /opt/buildAgent/work/ee114e0c77ee2c44/pom.xml does not exist @ 
  </code></pre>
  
  <p>How can I say to parent-project-build where it find the child module?</p>
  
  <p>Is there something else wrong?</p>
  
  <p>Parent POM:</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/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;it.company.project&lt;/groupId&gt;
    &lt;artifactId&gt;MyProject&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;pom&lt;/packaging&gt;
  
    &lt;name&gt;MyProject&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;modules&gt;
      &lt;module&gt;Foo&lt;/module&gt;
    &lt;/modules&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Child POM:</p>
  
  <pre><code>&lt;?xml version="1.0"?&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/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;it.company.project&lt;/groupId&gt;
          &lt;artifactId&gt;MyProject&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;it.company.subproject&lt;/groupId&gt;
      &lt;artifactId&gt;subproject&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;subproject&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/java&lt;/directory&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/*.java&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT:</strong>
  I added new parameter (pathSubproject) to my parent pom.xml, so when I run the parent build it skipped the previous error, but now it crash when trying to resolve parent dependency on the subproject. So I added a new parameter also at subproject (parentPath) and I passed it to relativePath inside parent tag. </p>
  
  <pre><code>Non-resolvable parent POM: Could not find artifact it.company.project:MyProject:pom:1.0-SNAPSHOT and 'parent.relativePath'
  </code></pre>
  
  <p>I think that my subproject POM not resolve the properties that I put inside <code>&lt;relativePath</code> tag.</p>
  
  <p>Is possible pass a properties to <code>relativePath</code> tag?</p>
  
  <hr>
  
  <p>Thanks</p>