github-release-plugin icon indicating copy to clipboard operation
github-release-plugin copied to clipboard

Provide ability to not upload the default artifact

Open jodastephen opened this issue 8 years ago • 3 comments

Thanks for the great plugin. The task I wanted to do was upload a zip and tar.gz, but not the main jar file of the project. While this can be achieved (by choosing one of the files as the artifact and putting the other in filesets), this seems like a hack. Unfortunately, you can't set artfiact to an empty string in Maven, as that still applies the default.

This looks like a boolean flag - uploadMainArtifact - set to true by default is needed. That way, it is easy to block the upload of the main artifact.

jodastephen avatar Mar 23 '17 15:03 jodastephen

@jodastephen Can you explain how you managed to work around that ?

lamarios avatar Dec 09 '17 06:12 lamarios

In the end, I just accepted the default to upload the jar. This flag would still be useful however.

jodastephen avatar Dec 09 '17 09:12 jodastephen

This can be done by defining an empty artifact in the plugin's configuration, e.g.

<configuration>
  <artifact></artifact>
  <fileSets>
    <fileSet>
      <directory>${project.build.directory}</directory>
      <includes>
        <include>${project.artifactId}*.tar.gz</include>
        <include>${project.artifactId}*.zip</include>
      </includes>
    </fileSet>
  </fileSets>
</configuration>

tjuerge avatar Sep 29 '19 00:09 tjuerge