Attach .tar.gz with proper extension #21

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants

stain commented Feb 26, 2014

Solves issue #20

Note that in order for the build to work I had to modify the pom.xml to exclude the non-existing junix-ext

stain added some commits Feb 26, 2014

@stain stain Exclude com.googlecode.junit-ext to fix build
.. as it does not exist in Maven Central and is not needed
for our tests.
e41c22e
@stain stain lock down version of maven-license-plugin
.. to avoid Maven warnings
aa28759
@stain stain ISSUE-20: Handle .tar.gz and .tar.bz2 attachments
Example output:

[INFO] Installing
/home/stain/src/net.sf.taverna.t2.taverna-commandline/target/media/taverna-commandline-core-2.5-SNAPSHOT-unix.tar.gz
to
/home/stain/.m2/repository/net/sf/taverna/t2/taverna-commandline-core/2.5-SNAPSHOT/taverna-commandline-core-2.5-SNAPSHOT-unix.tar.gz

#20
8e57ab0
Contributor

jdillon commented Feb 26, 2014

sanka, will have a look shortly. the junit-ext thingy is removed from latest litmus so we can just upgrade to avoid that turd

stain commented Feb 27, 2014

Btw - I tried with litmus-testsupport 1.7, and still got:

[ERROR] Failed to execute goal on project install4j-maven-plugin: Could not resolve dependencies for project org.sonatype.install4j:install4j-maven-plugin:maven-plugin:1.0.7-SNAPSHOT: Could not find artifact com.googlecode.junit-ext:junit-ext:jar:junit45:1.0-RC3 in central (http://repo.maven.apache.org/maven2) -> [Help 1]

.. so I kept the exclude.

@jdillon jdillon commented on the diff Mar 3, 2014

...in/java/org/sonatype/install4j/maven/CompileMojo.java
@@ -285,6 +285,13 @@ private AttachedFile(final String path, final String classifier) {
private static String getType(final File file) {
String path = file.getAbsolutePath();
+ // special case for .tar.gz extensions
+ // https://github.com/sonatype/install4j-support/issues/20
+ if (path.endsWith(".tar.gz")) {
+ return "tar.gz";
+ } else if (path.endsWith(".tar.bz")) {
+ return "tar.bz2";
@jdillon

jdillon Mar 3, 2014

Contributor

mismatch here?

Contributor

jdillon commented Mar 3, 2014

manually applied patch + cleaned up litmus & license muck

jdillon closed this Mar 3, 2014

jdillon added the maven-plugin label Mar 3, 2014

jdillon added this to the 1.0.7 milestone Mar 3, 2014

Contributor

jdillon commented Mar 6, 2014

please verify this works for you and I'll start a release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment