title: Maven project dependency "could not find artifact"
body: <p>I have 2 maven projects.  Project A and Project B.  Project B is dependent on Project A but not the other way around.</p>
  
  <p>In my project B pom I have this:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;com&lt;/groupId&gt;
          &lt;artifactId&gt;ProjectA&lt;/artifactId&gt;
          &lt;type&gt;pom&lt;/type&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>When i try to package the project it fails with this error:</p>
  
  <pre><code> [ERROR] Failed to execute goal on project ProjectB: Could not resolve    dependencies for project com:ProjectB:war:1.0-SNAPSHOT: Could not find  artifact com:ProjectA:pom:1.0-SNAPSHOT -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project ProjectB: Could not resolve dependencies for project com:ProjectB:war:1.0-SNAPSHOT: Could not find artifact com:ProjectA:pom:1.0-SNAPSHOT
  </code></pre>
  
  <p>So it can't find my ProjectA pom.  Do I need to put it in my project?  Where should it be located in my file structure.</p>
  
  <p>For what it's worth, I am using intelliJ IDE.</p>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT: When i run install on projectA I get this error:</p>
  
  <pre><code>The packaging for this project did not assign a file to the build artifact
  </code></pre>
  
  <p>EDIT2 - Adding ProjectA pom:</p>
  
  <pre><code>&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;groupId&gt;edu&lt;/groupId&gt;
  &lt;artifactId&gt;ProjectA&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;ProjectA&lt;/name&gt;
  
  &lt;build&gt;
      &lt;sourceDirectory&gt;src/main/java&lt;/sourceDirectory&gt;
  
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.5.2&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;install-jar-lib&lt;/id&gt;
                      &lt;phase&gt;validate&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;install-file&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.3&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.8&lt;/source&gt;
                  &lt;target&gt;1.8&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;prepare-package&lt;/id&gt;
                      &lt;phase&gt;prepare-package&lt;/phase&gt;
                      &lt;configuration&gt;
                          &lt;target&gt;
                              &lt;copy file="${basedir}/src/main/webapp/META-INF/context-${app.environment}.xml"
                                    tofile="${basedir}/src/main/webapp/META-INF/context.xml" /&gt;
                              &lt;copy file="${basedir}/src/main/webapp/WEB-INF/web-${app.environment}.xml"
                                    tofile="${basedir}/src/main/webapp/WEB-INF/web.xml" /&gt;
                              &lt;copy file="${basedir}/src/main/resources/log4j-${app.environment}.xml"
                                    tofile="${basedir}/src/main/resources/log4j.xml" /&gt;
                          &lt;/target&gt;
                      &lt;/configuration&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;compile&lt;/phase&gt;
                      &lt;configuration&gt;
                          &lt;target&gt;
                              &lt;copy file="${project.build.directory}/classes/log4j-${app.environment}.xml"
                                    tofile="${project.build.directory}/classes/log4j.xml" /&gt;
                              &lt;delete&gt;
                                  &lt;fileset dir="${project.build.directory}/classes" includes="**/*-local.*"/&gt;
                                  &lt;fileset dir="${project.build.directory}/classes" includes="**/*-test.*"/&gt;
                                  &lt;fileset dir="${project.build.directory}/classes" includes="**/*-prod.*"/&gt;
                              &lt;/delete&gt;
                          &lt;/target&gt;
                      &lt;/configuration&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;package&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;target&gt;
                              &lt;delete file="${basedir}/src/main/webapp/META-INF/context.xml" /&gt;
                              &lt;delete file="${basedir}/src/main/webapp/WEB-INF/web.xml" /&gt;
                              &lt;tstamp&gt;
                                  &lt;format property="last.timestamp" pattern="yyyyMMddHHmmss"/&gt;
                              &lt;/tstamp&gt;
                              &lt;property name="build.time" value="${last.timestamp}" /&gt;
                          &lt;/target&gt;
                          &lt;exportAntProperties&gt;true&lt;/exportAntProperties&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.0.0&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;failOnMissingWebXml&gt;true&lt;/failOnMissingWebXml&gt;
                  &lt;!--&lt;webResources&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/WEB-INF/lib&lt;/directory&gt;
                          &lt;targetPath&gt;WEB-INF/lib&lt;/targetPath&gt;
                          &lt;filtering&gt;false&lt;/filtering&gt;
                          &lt;includes&gt;
                              &lt;include&gt;**/*.jar&lt;/include&gt;
                          &lt;/includes&gt;
                      &lt;/resource&gt;
                  &lt;/webResources&gt;--&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.coderplus.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;copy-rename-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.0.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;rename-file&lt;/id&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;rename&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;sourceFile&gt;${project.build.directory}/${artifactId}-${version}.war&lt;/sourceFile&gt;
                          &lt;destinationFile&gt;${project.build.directory}/ProjectA##${build.time}.war&lt;/destinationFile&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>