/*
* Copyright 2007-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if (mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if (mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if (!outputFile.getParentFile().exists()) {
if (!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
胎纹监测信息(后台+ 小程序).zip
共939个文件
gif:240个
js:154个
xml:130个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
1 下载量 24 浏览量
2021-04-19
17:55:02
上传
评论
收藏 3.35MB ZIP 举报
温馨提示
胎纹监测信息(后台+ 小程序)胎纹监测信息(后台+ 小程序)胎纹监测信息(后台+ 小程序)胎纹监测信息(后台+ 小程序)胎纹监测信息(后台+ 小程序)胎纹监测信息(后台+ 小程序)胎纹监测信息(后台+ 小程序)胎纹监测信息(后台+ 小程序)
资源推荐
资源详情
资源评论
收起资源包目录
胎纹监测信息(后台+ 小程序).zip (939个子文件)
$PROJECT_FILE$ 364B
CarController.class 4KB
DetectController.class 3KB
RepairController.class 3KB
Detect.class 3KB
DealerController.class 2KB
UserController.class 2KB
Car.class 2KB
Repair.class 2KB
Dealer.class 2KB
User.class 2KB
AdminController.class 2KB
Admin.class 1KB
Images.class 1008B
DealerMapper.class 927B
ImagesMapper.class 843B
DemoApplication.class 809B
UserMapper.class 798B
DetectMapper.class 688B
CarMapper.class 667B
RepairMapper.class 663B
DemoApplicationTests.class 521B
AdminMapper.class 505B
mvnw.cmd 6KB
main.css 100KB
layui.css 82KB
layui.css 68KB
style.default.css 66KB
animate.css 23KB
layer.css 15KB
layer.css 14KB
layui.mobile.css 11KB
style.css 11KB
layui.mobile.css 10KB
player.css 9KB
laydate.css 9KB
laydate.css 7KB
vpplayer.css 7KB
htmleaf-demo.css 6KB
noticejs.css 4KB
chat.css 2KB
code.css 1KB
code.css 1KB
font.css 527B
iconfont.eot 41KB
iconfont.eot 40KB
icomoon.eot 2KB
lxhluguo_thumb.gif 20KB
lxhzhuanfa_thumb.gif 12KB
59.gif 10KB
59.gif 10KB
22.gif 10KB
22.gif 10KB
wq_thumb.gif 10KB
24.gif 8KB
k_thumb.gif 8KB
24.gif 8KB
13.gif 7KB
heia_thumb.gif 7KB
13.gif 7KB
mb_thumb.gif 7KB
16.gif 7KB
16.gif 7KB
39.gif 6KB
gza_thumb.gif 6KB
39.gif 6KB
64.gif 6KB
64.gif 6KB
63.gif 6KB
63.gif 6KB
50.gif 6KB
panda_thumb.gif 6KB
50.gif 6KB
loading-0.gif 6KB
loading-0.gif 6KB
4.gif 6KB
kl_thumb.gif 6KB
4.gif 6KB
1.gif 5KB
1.gif 5KB
tootha_thumb.gif 5KB
42.gif 5KB
crazya_thumb.gif 5KB
42.gif 5KB
71.gif 5KB
71.gif 5KB
21.gif 5KB
cry.gif 5KB
21.gif 5KB
x_thumb.gif 5KB
20.gif 5KB
20.gif 5KB
8.gif 5KB
29.gif 5KB
88_thumb.gif 5KB
29.gif 5KB
bofubianlian_thumb.gif 5KB
70.gif 4KB
70.gif 4KB
5.gif 4KB
共 939 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
最清晰的脚印
- 粉丝: 59
- 资源: 103
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于yolov8的人体动作识别检测项目源码.zip
- 自然语言处理大作业-python的汉语词义自动消歧系统源码+报告.zip
- MT管理器_2.15.3-会员功能解锁.apk
- 基于机器学习的共享单车使用量分析与预测
- 基于Python开发的汉语词义自动消歧系统源码+超详细注释+实验报告(95分以上).zip
- 51单片机汇编语言音乐盒+电子琴,proteus仿真运行正常,开发板实物运行正常 代码都带有注释,方便理解和学习
- Python项目之django疫情数据可视化分析系统(源码 + 说明文档)
- Python项目之django-新生入学管理系统(源码 + 说明文档)
- Flutter积分或金币领取动画
- Python项目之django新生报到服务管理系统(源码 + 说明文档)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功