Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download of the rtc.jar fails on certain file systems (FAT, NTFS) #78

Closed
sbondorf opened this issue May 18, 2019 · 1 comment
Closed

Comments

@sbondorf
Copy link
Collaborator

As of version 2.5.2, we have the following in the pom.xml's mpa profile to download the rtc.jar:

<plugin>
	<groupId>com.googlecode.maven-download-plugin</groupId>
	<artifactId>download-maven-plugin</artifactId>
	<version>${maven.download.plugin.version}</version>
	<executions>
		<execution>
			<id>get-mpa-rtc</id>
			<phase>validate</phase>
			<goals>
				<goal>wget</goal>
			</goals>
			<configuration>
				<url>http://www.mpa.ethz.ch/static/download.php?file=RTCToolbox_bin.zip</url>
				<unpack>true</unpack>
				<outputDirectory>${project.basedir}/lib/</outputDirectory>
			</configuration>
		</execution>
	</executions>
</plugin>

For some file systems, in particular Windows ones (FAT and NTFS), the question mark ? is a reserved character. Unfortunately, the above code tries to save the zip file under the name download.php?file=RTCToolbox_bin.zip before unzipping and deleting it. This first step fails on some file systems like NTFS. For example, Maven will fail on Windows saying:

Caused by: java.io.FileNotFoundException: C:\Users\user_s_path\DNC\lib\download.php?file=RTCToolbox_bin.zip (The filename, directory name, or volume label syntax is incorrect)
	at java.base/java.io.FileOutputStream.open0(Native Method)
	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:292)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:185)....

Workaround

  1. Getting the dependency manually:
    For now, Windows users need to manually download the MPA RTC toolbox from http://www.mpa.ethz.ch/static/download.php?file=RTCToolbox_bin.zip and unzip it into the /lib directory.
  2. Prevent Maven from trying to download:
    In the pom.xml, remove the above plugin from the mpa profile.

Thanks to Sidharth Sharma for reporting by email.

@NetCal
Copy link
Owner

NetCal commented Aug 28, 2022

The download URL changed, does not have a question mark in it anymore, so this issue is considered fixed.

@NetCal NetCal closed this as completed Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants