Skip to content

Commit

Permalink
Fixed #204
Browse files Browse the repository at this point in the history
Signed-off-by: Markus KARG <markus@headcrashing.eu>
  • Loading branch information
mkarg authored and longtimeago committed Jan 17, 2022
1 parent 7c448eb commit 712f016
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/it/basicGetWithQuery/invoke.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
invoker.goals = clean package
invoker.buildResult = success
33 changes: 33 additions & 0 deletions src/it/basicGetWithQuery/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<!-- Build description -->
<groupId>com.googlecode.maven-download-plugin.it</groupId>
<artifactId>testBasic</artifactId>
<packaging>pom</packaging>
<version>${testing.versionUnderTest}</version>
<name>Test</name>

<!-- Build plugins and extensions -->
<build>
<plugins>
<plugin>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>
<version>@project.version@</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>${test.img.file.url}?field=value</url>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
3 changes: 3 additions & 0 deletions src/it/basicGetWithQuery/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
File f = new File(basedir, "target/687474703a2f2f696d672e71756c6963652e636f6d2f6c6f676f2d6269672e706e67")
assert f.exists() : "File $f.absolutePath does not exist"
assert f.length() > 0 : "File is empty"
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
// PREPARE
if (this.outputFileName == null) {
try {
this.outputFileName = new File(this.uri.toURL().getFile()).getName();
this.outputFileName = new File(this.uri.toURL().getPath()).getName();
} catch (Exception ex) {
throw new MojoExecutionException("Invalid URL", ex);
}
Expand Down

0 comments on commit 712f016

Please sign in to comment.