Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding artifacts to standard maven deploy

I was hoping someone could help me with maven deployments (typically run through the release plugin).

I want to deploy files other than just the packaged jar to the repo upon release, such as specific instruction documents and generated SQL files.

It would be good if i did not have to use deploy:deploy-file for each one. it would be best if I could just add each file to a list within my POM file and it would be picked up automatically for me upon release.

like image 772
steven Avatar asked Jul 18 '10 23:07

steven


1 Answers

Either use the Maven Assembly Plugin to package them into an assembly that will get installed/deployed.

Or use the attach-artifact goal of the build-helper plugin:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>build-helper-maven-plugin</artifactId>
  <version>1.5</version>
  <executions>
    <execution>
      <id>attach-artifacts</id>
      <phase>package</phase>
      <goals>
        <goal>attach-artifact</goal>
      </goals>
      <configuration>
        <artifacts>
          <artifact>
            <file>some file</file>
            <type>extension of your file</type>
            <classifier>optional</classifier>
          </artifact>
          ...
        </artifacts>
      </configuration>
    </execution>
  </executions>
</plugin>
like image 132
Pascal Thivent Avatar answered Nov 23 '22 05:11

Pascal Thivent