jutzig / github-release-plugin

uses the github release api to upload files
69 stars 24 forks source link

Provide ability to not upload the default artifact #27

Open jodastephen opened 7 years ago

jodastephen commented 7 years ago

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.

lamarios commented 6 years ago

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

jodastephen commented 6 years ago

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

tjuerge commented 5 years ago

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>