@@ -201,20 +201,20 @@ elif set_java_home; then
201201 verbose " Falling back to use Java to download"
202202 javaSource=" $TMP_DOWNLOAD_DIR /Downloader.java"
203203 targetZip=" $TMP_DOWNLOAD_DIR /$distributionUrlName "
204- cat > " $javaSource " << - END
205- public class Downloader extends java.net.Authenticator
206- {
207- protected java.net.PasswordAuthentication getPasswordAuthentication()
208- {
209- return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
210- }
211- public static void main( String[] args ) throws Exception
212- {
213- setDefault( new Downloader() );
214- java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
215- }
216- }
217- END
204+ cat > " $javaSource " << END
205+ public class Downloader extends java.net.Authenticator
206+ {
207+ protected java.net.PasswordAuthentication getPasswordAuthentication()
208+ {
209+ return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
210+ }
211+ public static void main( String[] args ) throws Exception
212+ {
213+ setDefault( new Downloader() );
214+ java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
215+ }
216+ }
217+ END
218218 # For Cygwin/MinGW, switch paths to Windows format before running javac and java
219219 verbose " - Compiling Downloader.java ..."
220220 " $( native_path " $JAVACCMD " ) " " $( native_path " $javaSource " ) " || die " Failed to compile Downloader.java"
0 commit comments