I didn't think it moved the file into target. I tried that and ran mvn package and it didn't happen. However, I checked my .m2 local repository after mvn install and it DOES appear in there. I just don't think it works.

       <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>file.docx</file>
                  <type>docx</type>
                  <classifier>notes</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>

Instead, I am doing this, which is now my solution for my second problem:

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <phase>package</phase>
            <configuration>
              <target>
                ${project.build.outputDirectory}
                <copy file="${basedir}/file.docx"
                      overwrite="true"

tofile="target/${project.artifactId}-${project.version}-notes.docx"/>
<attachartifact file="target/${project.artifactId}-${project.version}-notes.docx" classifier="notes" type="docx"/>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

Jason

On  9/28/2011  4:48  PM,  Jörg  Schaible  wrote:
 will  create  an  attached  artifact  with  GACV  
"org.group:project:notes:47.1.1"
 and  the  file  is  named  "project-47.1.1-notes.docx"  in  target  and  
deployed  in
 this  way  to  the  repository.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to