Skip to content

Commit c5646c9

Browse files
committed
Updates
0 parents  commit c5646c9

13 files changed

Lines changed: 379 additions & 0 deletions

assets/index-DArgwJP0.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-rMm6lkzj.js

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + React</title>
8+
<script type="module" crossorigin src="/assets/index-rMm6lkzj.js"></script>
9+
<link rel="stylesheet" crossorigin href="/assets/index-DArgwJP0.css">
10+
</head>
11+
<body>
12+
<div id="root"></div>
13+
</body>
14+
</html>

vite.svg

Lines changed: 1 addition & 0 deletions
Loading

week1/Fri/cat-dancing-page

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit dc4c127b704b5d2d8044fb004c02f9c85b47b454

week1/Thu/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vagrant/
2+
.DS_Store
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
[INFO] Scanning for projects...
2+
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.2.2.RELEASE/spring-boot-starter-parent-2.2.2.RELEASE.pom
3+
######### 소스 코드 작성시 스프링부트를 사용했기 때문에 스프링부트 라이브러리와 관련 파일을 다운 받습니다. 이외에도 사용한 라이브러리가 있다면 이 단계에서 다운로드 받습니다.
4+
[중략]
5+
[INFO] -------------------< Stark.Industries:echo-ip-java >--------------------
6+
######### pom.xml의 <groupId>:<artifactId> 형식으로 표시됩니다.
7+
[INFO] Building Ultron-PRJ 0.0.1-SNAPSHOT
8+
######### pom.xml 의 <name>.<version> 형식으로 표시됩니다.
9+
[INFO] --------------------------------[ jar ]---------------------------------
10+
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.2.2.RELEASE/spring-boot-maven-plugin-2.2.2.RELEASE.pom
11+
######### 스프링 부트 기반 소스 코드를 빌드하는 과정을 도와주는 플러그인을 사용하기 위한 관련 파일들을 내려 받습니다.
12+
[중략]
13+
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ echo-ip-java ---
14+
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/3.0/maven-plugin-api-3.0.pom
15+
######### 메이븐으로 소스 코드를 빌드하는 과정을 도와주는 플러그인을 다운로드 받습니다.
16+
################## 왜 메이븐과 스프링부트의 플러그인을 별개로 다운 받냐 라고 하시면 mvnw clean package 와 같은 메이븐의 기본 명령은 메이븐 플러그인으로 처리 되는데
17+
################## 각 단계별로 스프링부트의 별도 처리를 해줘야 하는 부분은 메이븐 플러그인이 처리하는 단계에서 스프링부트 플러그인이 묶여서 동작합니다. (.original 을 묶어서 단독 실행이 가능한 jar로 만들어주고 이런 것은 package 과정 중에 spring-boot-maven-plugin이 묶여서 해주는 과정입니다)
18+
[중략]
19+
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ echo-ip-java ---
20+
######### 소스 코드 빌드 과정에서 리소스 (일반 이미지 파일이나 정적인 html 파일, 빌드된 애플리케이션 내부에서 자체적으로 사용하는 파일)를 재구성하는 플러그인을 사용하기 위한 관련 파일을 내려 받습니다.
21+
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-core/3.0/maven-core-3.0.pom
22+
[중략]
23+
[INFO] Using 'UTF-8' encoding to copy filtered resources.
24+
[INFO] Copying 1 resource
25+
######### 여기서 1개 파일이 복사되는 것은 스프링부트 애플리케이션이 구동되는 시점에 초기 설정으로 사용하기 위해 개발자가 작성해둔 설정 파일 1개입니다.. src/main/resources/ 디렉토리 내부에 존재합니다.
26+
[INFO] Copying 0 resource
27+
[INFO]
28+
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ echo-ip-java ---
29+
######### src 디렉터리 아래에 있는 .java 파일들을 컴파일 과정을 거쳐서 target 디렉터리의 classes 디렉터리에 생성하기 위한 플러그인과 관련 파일을 내려 받습니다. classes 디렉터리의 파일들이 나중에 패키지에 포함됩니다.
30+
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-incremental/1.1/maven-shared-incremental-1.1.pom
31+
[중략]
32+
[INFO] Changes detected - recompiling the module!
33+
[INFO] Compiling 2 source files to /root/IaC/Docker/build/Basic/target/classes
34+
######### 컴파일 과정을 거쳐서 classes 디렉터리에 실제로 파일을 생성합니다. src/main/java/com/stark/Industries/ 내부에 존재하는 2개의 .java 소스 파일입니다.
35+
[INFO]
36+
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ echo-ip-java ---
37+
[INFO] Using 'UTF-8' encoding to copy filtered resources.
38+
[INFO] skip non existing resourceDirectory /root/IaC/Docker/build/Basic/src/test/resources
39+
######### 소스 코드를 빌드하기 전 테스트 코드를 작성해서 동작을 확인해야 하는데, 이 부분은 프로젝트 기본 생성시에는 존재하지만 테스트 코드 작성은 개발자의 영역이라 src/test 디렉터리를 삭제해 두어서 스킵됩니다.
40+
[INFO]
41+
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ echo-ip-java ---
42+
[INFO] No sources to compile
43+
######### 테스트 코드를 빌드하는 과정인데 테스트 코드 부분을 삭제해서 이 부분도 컴파일할 소스코드가 없다고 넘어 갑니다.
44+
[INFO]
45+
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ echo-ip-java ---
46+
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.22.2/maven-surefire-common-2.22.2.pom
47+
[중략]
48+
[INFO] No tests to run.
49+
######### surefire는 실제 테스트를 수행하기 위해 사용하는 플러그인데 이 부분도 테스트와 관련된 부분은 모두 삭제해두어서 그냥 넘어가게 됩니다.
50+
[INFO]
51+
[INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) @ echo-ip-java ---
52+
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-management/3.0.0/file-management-3.0.0.pom
53+
######### 소스코드를 .jar 로 생성하기 위해 필요한 maven-jar-plugin 플러그인과 관련된 파일을 내려 받습니다.
54+
[중략]
55+
[INFO] Building jar: /root/IaC/Docker/build/Basic/target/app-in-host.jar
56+
######### 패키지 파일 생성 1단계로 현재 디렉터리에 작성한 코드와 관련된 jjar 패키지 파일을 /root/IaC/Docker/build/Basic/target/app-in-host.jar에 생성합니다. 이 jar만 가지고 실제로 구동을 하기 위해서는
57+
######### pom.xml에서 외부에서 불러와서 사용하도록 설정한 라이브러리를 실행시점에 연결해주어야 합니다. 그래서 이런 과정이 필요 없게 하기 위해 아래 단계가 수행됩니다.
58+
[INFO]
59+
[INFO] --- spring-boot-maven-plugin:2.2.2.RELEASE:repackage (repackage) @ echo-ip-java ---
60+
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-loader-tools/2.2.2.RELEASE/spring-boot-loader-tools-2.2.2.RELEASE.pom
61+
######### 라이브러리를 실행 시점에 연결하고 그러면 번거롭기 때문에 2단계로 라이브러리까지 모두 박아넣은 jar 패키지 파일을 만들기 위해 플러그인과 관련 파일을 다운로드 받습니다.
62+
[중략]
63+
Downloaded from central: https://repo.maven.apache.org/maven2/com/google/guava/guava/19.0/guava-19.0.jar (2.3 MB at 485 kB/s)
64+
[INFO] Replacing main artifact with repackaged archive
65+
######### 기존에 존재하던 .jar 패키지 파일은 .jar.original 로 바뀌고, 모든 라이브러리가 포함되어 단독으로 실행이 가능한 jar 파일이 생성됩니다 (그런 패키지를 fat-jar 라고 합니다)
66+
[INFO] ------------------------------------------------------------------------
67+
[INFO] BUILD SUCCESS
68+
[INFO] ------------------------------------------------------------------------
69+
[INFO] Total time: 03:29 min
70+
[INFO] Finished at: 2020-09-27T09:48:26+09:00
71+
[INFO] ------------------------------------------------------------------------
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/*
2+
* Copyright 2007-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import java.net.*;
18+
import java.io.*;
19+
import java.nio.channels.*;
20+
import java.util.Properties;
21+
22+
public class MavenWrapperDownloader {
23+
24+
private static final String WRAPPER_VERSION = "0.5.6";
25+
/**
26+
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
27+
*/
28+
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
29+
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
30+
31+
/**
32+
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
33+
* use instead of the default one.
34+
*/
35+
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
36+
".mvn/wrapper/maven-wrapper.properties";
37+
38+
/**
39+
* Path where the maven-wrapper.jar will be saved to.
40+
*/
41+
private static final String MAVEN_WRAPPER_JAR_PATH =
42+
".mvn/wrapper/maven-wrapper.jar";
43+
44+
/**
45+
* Name of the property which should be used to override the default download url for the wrapper.
46+
*/
47+
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
48+
49+
public static void main(String args[]) {
50+
System.out.println("- Downloader started");
51+
File baseDirectory = new File(args[0]);
52+
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
53+
54+
// If the maven-wrapper.properties exists, read it and check if it contains a custom
55+
// wrapperUrl parameter.
56+
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
57+
String url = DEFAULT_DOWNLOAD_URL;
58+
if (mavenWrapperPropertyFile.exists()) {
59+
FileInputStream mavenWrapperPropertyFileInputStream = null;
60+
try {
61+
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
62+
Properties mavenWrapperProperties = new Properties();
63+
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
64+
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
65+
} catch (IOException e) {
66+
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
67+
} finally {
68+
try {
69+
if (mavenWrapperPropertyFileInputStream != null) {
70+
mavenWrapperPropertyFileInputStream.close();
71+
}
72+
} catch (IOException e) {
73+
// Ignore ...
74+
}
75+
}
76+
}
77+
System.out.println("- Downloading from: " + url);
78+
79+
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
80+
if (!outputFile.getParentFile().exists()) {
81+
if (!outputFile.getParentFile().mkdirs()) {
82+
System.out.println(
83+
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
84+
}
85+
}
86+
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
87+
try {
88+
downloadFileFromURL(url, outputFile);
89+
System.out.println("Done");
90+
System.exit(0);
91+
} catch (Throwable e) {
92+
System.out.println("- Error downloading");
93+
e.printStackTrace();
94+
System.exit(1);
95+
}
96+
}
97+
98+
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
99+
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
100+
String username = System.getenv("MVNW_USERNAME");
101+
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
102+
Authenticator.setDefault(new Authenticator() {
103+
@Override
104+
protected PasswordAuthentication getPasswordAuthentication() {
105+
return new PasswordAuthentication(username, password);
106+
}
107+
});
108+
}
109+
URL website = new URL(urlString);
110+
ReadableByteChannel rbc;
111+
rbc = Channels.newChannel(website.openStream());
112+
FileOutputStream fos = new FileOutputStream(destination);
113+
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
114+
fos.close();
115+
rbc.close();
116+
}
117+
118+
}
49.5 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

0 commit comments

Comments
 (0)