Skip to content

Commit a6e1e79

Browse files
authored
Merge pull request #6 from Nasruddin/feature/cloud-gateway
Feature/cloud gateway
2 parents 637ecee + f3a7ba7 commit a6e1e79

62 files changed

Lines changed: 1862 additions & 553 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/compiler.xml

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

.idea/encodings.xml

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

.idea/misc.xml

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

api-gateway-service/.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
HELP.md
2-
/target/
2+
target/
33
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
46

57
### STS ###
68
.apt_generated
@@ -23,7 +25,9 @@ HELP.md
2325
/dist/
2426
/nbdist/
2527
/.nb-gradle/
26-
/build/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
2731

2832
### VS Code ###
2933
.vscode/

api-gateway-service/.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,31 @@
11
/*
2-
Licensed to the Apache Software Foundation (ASF) under one
3-
or more contributor license agreements. See the NOTICE file
4-
distributed with this work for additional information
5-
regarding copyright ownership. The ASF licenses this file
6-
to you under the Apache License, Version 2.0 (the
7-
"License"); you may not use this file except in compliance
8-
with the License. You may obtain a copy of the License at
9-
10-
https://www.apache.org/licenses/LICENSE-2.0
11-
12-
Unless required by applicable law or agreed to in writing,
13-
software distributed under the License is distributed on an
14-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
KIND, either express or implied. See the License for the
16-
specific language governing permissions and limitations
17-
under the License.
18-
*/
19-
20-
import java.io.File;
21-
import java.io.FileInputStream;
22-
import java.io.FileOutputStream;
23-
import java.io.IOException;
24-
import java.net.URL;
25-
import java.nio.channels.Channels;
26-
import java.nio.channels.ReadableByteChannel;
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+
import java.net.*;
17+
import java.io.*;
18+
import java.nio.channels.*;
2719
import java.util.Properties;
2820

2921
public class MavenWrapperDownloader {
3022

23+
private static final String WRAPPER_VERSION = "0.5.6";
3124
/**
3225
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
3326
*/
34-
private static final String DEFAULT_DOWNLOAD_URL =
35-
"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar";
27+
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
28+
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
3629

3730
/**
3831
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
@@ -80,13 +73,13 @@ public static void main(String args[]) {
8073
}
8174
}
8275
}
83-
System.out.println("- Downloading from: : " + url);
76+
System.out.println("- Downloading from: " + url);
8477

8578
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
8679
if(!outputFile.getParentFile().exists()) {
8780
if(!outputFile.getParentFile().mkdirs()) {
8881
System.out.println(
89-
"- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
82+
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
9083
}
9184
}
9285
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
@@ -102,6 +95,16 @@ public static void main(String args[]) {
10295
}
10396

10497
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
98+
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
99+
String username = System.getenv("MVNW_USERNAME");
100+
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
101+
Authenticator.setDefault(new Authenticator() {
102+
@Override
103+
protected PasswordAuthentication getPasswordAuthentication() {
104+
return new PasswordAuthentication(username, password);
105+
}
106+
});
107+
}
105108
URL website = new URL(urlString);
106109
ReadableByteChannel rbc;
107110
rbc = Channels.newChannel(website.openStream());
2.32 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.2/apache-maven-3.8.2-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

api-gateway-service/Dockerfile

Lines changed: 0 additions & 31 deletions
This file was deleted.

api-gateway-service/mvnw

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

api-gateway-service/mvnw.cmd

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

0 commit comments

Comments
 (0)