Fix artifact extension retrieval
Do not rely on the packaging type to figure out what the extension of the main artifact will be. So far, using `jar` and `war` packaging for `.jar` and `.war` files worked by chance. We know retrieve the actual extension as provided by Maven's `ArtifactHandler`. Fixes gh-2762
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -187,7 +187,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
|
||||
classifier = "-" + classifier;
|
||||
}
|
||||
return new File(this.outputDirectory, this.finalName + classifier + "."
|
||||
+ this.project.getPackaging());
|
||||
+ this.project.getArtifact().getArtifactHandler().getExtension());
|
||||
}
|
||||
|
||||
public static enum LayoutType {
|
||||
|
||||
Reference in New Issue
Block a user