/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
import java.util.Properties;
public class MavenWrapperDownloader {
/**
* 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/0.4.2/maven-wrapper-0.4.2.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 direcrory '" + 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 {
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();
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
springboot+jsp+xquery实现登录认证
共164个文件
xml:63个
sample:12个
java:6个
需积分: 10 0 下载量 80 浏览量
2022-07-10
18:51:26
上传
评论
收藏 25.74MB ZIP 举报
温馨提示
springboot+jsp+xquery实现登录认证
资源详情
资源评论
资源推荐
收起资源包目录
springboot+jsp+xquery实现登录认证 (164个子文件)
069b43d6f6e88fdeede688db3e8c341d3102cc 55B
08d0aba5f581318c92b2acedf3bad12bf9bcd5 91B
0d451ccd6fc835996c9fe4eebf8a571154f515 97B
0d91ef2e84c5df09e2fbd36a1356b9c47d7fc2 221B
0f89a92c76af9acf12f27647663f0cd9f1f31d 46B
1949452f9c5e025a5149911201cc552f395d21 46B
28a68a5871bca3fcffd58716223a10f3ff9422 184B
2cfa08c64f12fce782aea21229e7121ac0d1fb 278B
30bcdf6a20781d89575dfa70a39130a646ee3c 83B
30d77f370db41d27e9c1cb9e14884107aedfa5 64B
4c1aa929b1db1b5e98a92f9d4fdd97ed8fbe09 772B
54fb3602bcbadeab9ff3f6575a8e9a84518ce7 46B
5fc29511345d8b78c4859060d1808609a7e35d 200B
6501964439be14ca9f6e9d2832aae1cd0e9da6 59B
6b27d92c539a20b58a13295c3b79c27a750468 49B
712667545b3b962e9d520760a02332b6eef559 240B
71705cd019837de621a39297ba445c9c15ca26 135B
7ca8153dea06870f7b1cc4eaa4bef057d53708 231B
84c138d929ce7666d5ebce5937b022d64d6794 912B
89f81914e91ff2bb51930c01c25e45bc9d66cf 99B
90ae68293e905bbaf3b5bdf675bdd0957a31a3 54B
91a56ea77140c9ce37cf021b452dba21b632af 2KB
97bd6ba697cb37611add2d9da4d2b1d725d2f4 364B
9da3b8b6006ed618243365e6d653d391a6b524 3KB
a16324b5f19971009d5a136381188c27a2c0ec 45B
a3040aa86debfd8826d9c2b5c816314c17d9fe 235B
a8f84fa4f2efc683122b1219b29b4a0d921f6c 917B
aa94b7de024f2700f7aa86327216e631759181 50B
b50a030a85a22607c063ee88ae126ebccbd9f3 141B
b7e39776cb35eaeb2dbf5020a3128cc5f8e125 57B
c41e333fb2486af036dcb1a29500f43143ff2a 194B
c5c15658ae36052d7810b575a1d680ada7cbc8 354B
c820d270390e89fe02411352d9efafc3c835ab 217B
UserController.class 4KB
XqueryTest.class 4KB
User.class 901B
SpringbootexampleApplication.class 886B
HelloSpringBoot.class 632B
mvnw.cmd 6KB
config 317B
d1bbbaacf4cd8b324ea2943243e2e792fe556f 200B
d57ec5d28db489edd79d5c6534255cd924d20a 83B
d92c96a46dba15e70c5595b472e49eb1e95453 45B
ded118e0510016e02bd8cb538b5c036052a6f2 111B
description 73B
e074389e9f28aedc753e39948bf3faa7d820a4 374B
e1840bc3c9b28dc4ec7ffb4c93583692e96372 303B
e53fcb0ff5ae9b4cf8ad245aa7d5f906b77efb 46B
e67997377a393fd672c7dcde9dccbedf0cb1e9 41KB
eaa5e3ece532b13002ea9c808a044433a4d394 122B
eb270ac090b2b4c12a6347b44587ec01932b72 59B
eb7b8b7ce592cecda720039f4325e98662988c 121B
exclude 240B
f5a8f7f98851e698aed89b38961d160db50249 2KB
fa7ce3e8b15f03c49969fb28188a787f07a191 74B
.gitignore 364B
HEAD 196B
HEAD 196B
HEAD 32B
HEAD 23B
springbootexample.iml 7KB
index 2KB
springbootexample-0.0.1-SNAPSHOT.jar 34.75MB
maven-wrapper.jar 47KB
MavenWrapperDownloader.java 5KB
UserController.java 3KB
XqueryTest.java 3KB
User.java 581B
SpringbootexampleApplication.java 492B
HelloSpringBoot.java 324B
login.jsp 671B
user.jsp 198B
inputFiles.lst 482B
createdFiles.lst 267B
master 196B
master 41B
MANIFEST.MF 94B
mvnw 9KB
.name 17B
springbootexample-0.0.1-SNAPSHOT.jar.original 8KB
packed-refs 226B
maven-wrapper.properties 117B
application.properties 87B
application.properties 87B
pom.properties 72B
pre-rebase.sample 5KB
update.sample 4KB
fsmonitor-watchman.sample 3KB
pre-commit.sample 2KB
prepare-commit-msg.sample 1KB
pre-push.sample 1KB
commit-msg.sample 896B
pre-receive.sample 544B
applypatch-msg.sample 478B
pre-applypatch.sample 424B
pre-merge-commit.sample 416B
post-update.sample 189B
springbootexample_jar.xml 8KB
workspace.xml 7KB
pom.xml 3KB
共 164 条
- 1
- 2
你是我的禅
- 粉丝: 1
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0