Jason Winnebeck wrote:

> I have an existing Maven project which deploys currently source, javadocs,
> and a jar. I realize now that the sources jar is not a real source of the
> project. I would like to deploy:
> 
>  1. A zip archive of the svn export of the tag created in
>  maven-release-plugin:prepare during release:perform
>  2. A single file as
>  an artifact, but renamed (for example ./file.docx to
>  target/artifactId-version-notes.docx), during any mvn package operation.
> 
> For the first task maven-assembly-plugin and maven-resources-plugin didn't
> seem appropriate. For the second task I know I can use
> maven-build-helper-plugin attachArtifact but it won't copy the file into
> target as far as I know or rename it.

It does. It's exactly for this purpose.

============ %< ===========
<project>
  <groupId>org.group</groupId>
  <artifactId>project</artifactId>
  <version>47.1.1</version>
  <build>
    <plugins>
      <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>
============ %< ===========

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.

[snip]

- Jörg


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

Reply via email to