├── shopping ├── index.css ├── cart.html └── index.html ├── README.md ├── spring ├── springbootdemo │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ └── application.properties │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── springbootdemo │ │ │ │ ├── Controllers │ │ │ │ ├── addModel.java │ │ │ │ ├── itemcontroller.java │ │ │ │ ├── meowC.java │ │ │ │ └── EmpController.java │ │ │ │ ├── Response │ │ │ │ └── response.java │ │ │ │ ├── Models │ │ │ │ └── Employee.java │ │ │ │ └── SpringbootdemoApplication.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── springbootdemo │ │ │ └── SpringbootdemoApplicationTests.java │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── .gitignore │ ├── pom.xml │ ├── mvnw.cmd │ └── mvnw └── springdemo │ ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ ├── Beans.xml │ │ │ └── com │ │ │ └── example │ │ │ └── springdemo │ │ │ ├── meow.java │ │ │ └── SpringdemoApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── springdemo │ │ └── SpringdemoApplicationTests.java │ ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── .gitignore │ ├── pom.xml │ ├── mvnw.cmd │ └── mvnw ├── shell scripting ├── first.sh ├── variables.sh ├── arrays.sh └── loops.sh ├── JS ├── first.js ├── spreadop.js ├── job.js ├── func.js ├── loops.js ├── arrays.js ├── stringfunc.js └── conditional.js ├── JDBC └── demoproject │ ├── .travis.yml │ ├── .gitattributes │ ├── .editorconfig │ ├── .gitignore │ ├── src │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── AppTest.java │ └── main │ │ └── java │ │ └── com │ │ └── example │ │ └── App.java │ └── pom.xml ├── interfaceCar.java ├── cmeow.java ├── Frontend ├── about.html ├── meow.js ├── cart.html ├── buy.html ├── cart.js └── meow.html ├── stackmeow.java ├── datetime.java ├── mapsmeow.java ├── arrays.java ├── comp.java ├── reversestr.java ├── streamapi.java ├── loops.java ├── Garage.java ├── meow.java ├── usermeow.java ├── tasks.java ├── CruiseShip.java ├── comcomb.java ├── listmeow.java ├── queumeow.java └── Car.java /shopping/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ATOS-27-4 2 | ATOS Training 3 | -------------------------------------------------------------------------------- /spring/springbootdemo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring/springdemo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /shell scripting/first.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Enter your name" 4 | read mew 5 | echo "Hey $mew" 6 | -------------------------------------------------------------------------------- /JS/first.js: -------------------------------------------------------------------------------- 1 | var a = 12; 2 | console.log('a = ' + a); 3 | console.log('a =', a); 4 | console.log(`a = ${a}`); -------------------------------------------------------------------------------- /JS/spreadop.js: -------------------------------------------------------------------------------- 1 | let m = ['Aaryan', 123, 'Meow']; 2 | 3 | let m2 = ['m2', ...m]; 4 | 5 | console.log(m2); -------------------------------------------------------------------------------- /shell scripting/variables.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ARYAN="1234" 4 | MEOW="meww" 5 | echo $ARYAN $MEOW -------------------------------------------------------------------------------- /JDBC/demoproject/.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: openjdk8 3 | after_success: 4 | - mvn coveralls:report 5 | -------------------------------------------------------------------------------- /interfaceCar.java: -------------------------------------------------------------------------------- 1 | public interface interfaceCar { 2 | public void speed(); 3 | public void meow(); 4 | } 5 | -------------------------------------------------------------------------------- /JDBC/demoproject/.gitattributes: -------------------------------------------------------------------------------- 1 | # When shell scripts end in CRLF, bash gives a cryptic error message 2 | *.sh text eol=lf 3 | -------------------------------------------------------------------------------- /JS/job.js: -------------------------------------------------------------------------------- 1 | let obj = { 2 | name: 'Aaryan', 3 | age: 12345, 4 | hobbies: ['coding', 'cats', 'meow meow'] 5 | } 6 | 7 | console.log(obj); -------------------------------------------------------------------------------- /JS/func.js: -------------------------------------------------------------------------------- 1 | function meowmeow() { 2 | console.log('meow meow'); 3 | } 4 | 5 | let meow1 = () => { 6 | console.log('hey'); 7 | } 8 | 9 | meow1(); -------------------------------------------------------------------------------- /spring/springdemo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aryan1403/ATOS-27-4/HEAD/spring/springdemo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring/springbootdemo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aryan1403/ATOS-27-4/HEAD/spring/springbootdemo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /JS/loops.js: -------------------------------------------------------------------------------- 1 | for (let i = 0; i < 10; i++) { 2 | console.log(i); 3 | } 4 | let counter = 0; 5 | while (counter < 10) { 6 | console.log(counter + 1); 7 | counter++; 8 | } -------------------------------------------------------------------------------- /JS/arrays.js: -------------------------------------------------------------------------------- 1 | let meow = ['Aaryan', 43, true, null]; 2 | 3 | 4 | // meow.forEach(element => console.log(element)); 5 | 6 | for (const element in meow) { 7 | console.log(meow[element]); 8 | } -------------------------------------------------------------------------------- /shell scripting/arrays.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | MEWO[0]="aryan" 4 | MEWO[1]="arush" 5 | MEWO[2]="venkatesh" 6 | MEWO[3]="mounika" 7 | 8 | DIVISION=`expr 23 / 2` 9 | 10 | echo $DIVISION 11 | -------------------------------------------------------------------------------- /JS/stringfunc.js: -------------------------------------------------------------------------------- 1 | /* let s = "12"; 2 | 3 | let sum = parseInt(s) + 3; 4 | 5 | console.log(sum); 6 | 7 | let num = 12; 8 | let s1 = num.toString(); */ 9 | 10 | let s = "Aaryan"; 11 | 12 | console.log(s.indexOf("y")); -------------------------------------------------------------------------------- /JS/conditional.js: -------------------------------------------------------------------------------- 1 | function compare(a, b) { 2 | if(a > b) { 3 | return `${a} is greater`; 4 | } else if(a === b) { 5 | return `Both are equal!`; 6 | } 7 | return `${b} is greater`; 8 | } 9 | 10 | let result = compare(1, 2); 11 | 12 | console.log(result); -------------------------------------------------------------------------------- /spring/springdemo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /shell scripting/loops.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | a=0 4 | while [ "$a" -lt 10 ] # this is loop1 5 | do 6 | b="$a" 7 | while [ "$b" -ge 0 ] # this is loop2 8 | do 9 | echo -n "$b " 10 | b=`expr $b - 1` 11 | done 12 | echo 13 | a=`expr $a + 1` 14 | done 15 | -------------------------------------------------------------------------------- /spring/springbootdemo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /spring/springdemo/src/test/java/com/example/springdemo/SpringdemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.springdemo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringdemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /cmeow.java: -------------------------------------------------------------------------------- 1 | public class cmeow { 2 | public static void main(String[] args) { 3 | int a = 1; 4 | 5 | if(a == 0) { // == return us a boolean value (compare something) 6 | System.out.println("a = " + a); 7 | } else { 8 | System.out.println("a is not equal to 0"); // ommmited (ignored) 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Frontend/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | About 8 | 9 | 10 |

11 | Welcome to about Page 12 |

13 | 14 | -------------------------------------------------------------------------------- /JDBC/demoproject/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | max_line_length = 80 11 | 12 | [*.sh] 13 | end_of_line = lf 14 | 15 | [*.java] 16 | indent_size = 4 17 | max_line_length = 120 18 | -------------------------------------------------------------------------------- /spring/springbootdemo/src/test/java/com/example/springbootdemo/SpringbootdemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example.springbootdemo; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringbootdemoApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring/springbootdemo/src/main/java/com/example/springbootdemo/Controllers/addModel.java: -------------------------------------------------------------------------------- 1 | package com.example.springbootdemo.Controllers; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | import lombok.ToString; 7 | 8 | @Getter 9 | @Setter 10 | @AllArgsConstructor 11 | @ToString 12 | public class addModel { 13 | int a; 14 | int b; 15 | } -------------------------------------------------------------------------------- /spring/springbootdemo/src/main/java/com/example/springbootdemo/Response/response.java: -------------------------------------------------------------------------------- 1 | package com.example.springbootdemo.Response; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | 8 | @AllArgsConstructor 9 | @Getter 10 | @Setter 11 | @Data 12 | public class response { 13 | int code; 14 | String message; 15 | Object data; 16 | } 17 | -------------------------------------------------------------------------------- /stackmeow.java: -------------------------------------------------------------------------------- 1 | import java.util.Stack; 2 | 3 | public class stackmeow { 4 | public static void main(String[] args) { 5 | Stack stack = new Stack<>(); 6 | 7 | stack.push(10); 8 | stack.push(12); 9 | stack.push(-1); 10 | stack.push(45); 11 | 12 | // stack.forEach(e -> System.out.println(e)); 13 | // stack.forEach(System.out::println); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /spring/springbootdemo/src/main/java/com/example/springbootdemo/Models/Employee.java: -------------------------------------------------------------------------------- 1 | package com.example.springbootdemo.Models; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | import lombok.ToString; 7 | 8 | @Getter 9 | @Setter 10 | @AllArgsConstructor 11 | @ToString 12 | public class Employee { 13 | String empid; 14 | String name; 15 | String dob; 16 | String role; 17 | } 18 | -------------------------------------------------------------------------------- /datetime.java: -------------------------------------------------------------------------------- 1 | import java.time.LocalDate; 2 | import java.time.LocalTime; 3 | 4 | public class datetime { 5 | public static void main(String[] args) { 6 | LocalDate date = LocalDate.now(); 7 | LocalTime time = LocalTime.now(); 8 | 9 | System.out.println("Date : " + date); 10 | System.out.println("Time : " + time.getHour() + "hours " + time.getMinute() + "mins " + time.getSecond() + "s."); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /mapsmeow.java: -------------------------------------------------------------------------------- 1 | import java.util.HashMap; 2 | import java.util.Map; 3 | 4 | public class mapsmeow { 5 | public static void main(String[] args) { 6 | Map map = new HashMap<>(); 7 | 8 | // map - interface 9 | // hashmap - class 10 | 11 | map.put("name", "Aaryan"); 12 | map.put("name2", "Naveen"); 13 | 14 | map.forEach((a, b) -> System.out.println(a + " : " + b)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring/springbootdemo/src/main/java/com/example/springbootdemo/SpringbootdemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.springbootdemo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringbootdemoApplication { 8 | public static void main(String[] args) { 9 | SpringApplication.run(SpringbootdemoApplication.class, args); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /spring/springdemo/src/main/java/Beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /arrays.java: -------------------------------------------------------------------------------- 1 | public class arrays { 2 | public static void main(String[] args) { 3 | int[] arr = new int[3]; // 0 - 2 4 | int sum = 0; 5 | 6 | arr[0] = 1; 7 | arr[1] = 10; 8 | arr[2] = -11; 9 | 10 | for (int i = 0; i < arr.length; i++) { // 0 - 2 11 | // System.out.println("arr[" + i + "] : " + arr[i]); 12 | sum = sum + arr[i]; 13 | } 14 | System.out.println(sum); // 1 + 10 - 11 = 0 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /JDBC/demoproject/.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # Standard Maven .gitignore 3 | # 4 | target/ 5 | pom.xml.tag 6 | pom.xml.releaseBackup 7 | pom.xml.versionsBackup 8 | pom.xml.next 9 | release.properties 10 | dependency-reduced-pom.xml 11 | buildNumber.properties 12 | .mvn/timing.properties 13 | 14 | # 15 | # IntelliJ 16 | # 17 | *.iml 18 | .idea/* 19 | !.idea/runConfigurations/ 20 | 21 | # 22 | # Visual Studio Code 23 | # 24 | .settings/ 25 | .classpath 26 | .factorypath 27 | .project 28 | .vscode/ 29 | -------------------------------------------------------------------------------- /comp.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | 3 | public class comp { 4 | public static void main(String[] args) { 5 | List list = new ArrayList(); 6 | list.add(10); 7 | list.add(2); 8 | list.add(0); 9 | 10 | list.sort((a, b) -> { 11 | if(a < b) { 12 | return -1; // swap 13 | } 14 | return 0; //dont' swap 15 | }); 16 | 17 | list.forEach(System.out::println); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /spring/springdemo/src/main/java/com/example/springdemo/meow.java: -------------------------------------------------------------------------------- 1 | package com.example.springdemo; 2 | 3 | public class meow { 4 | private String word; 5 | public void saymeow() { 6 | System.out.println("Meow meow"); 7 | } 8 | 9 | public String getWord() { 10 | return word; 11 | } 12 | 13 | public void setWord(String word) { 14 | this.word = word; 15 | } 16 | 17 | public void speak() { 18 | System.out.println(word); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /JDBC/demoproject/src/test/java/com/example/AppTest.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import static org.junit.jupiter.api.Assertions.assertEquals; 5 | import static org.junit.jupiter.api.Assertions.assertTrue; 6 | 7 | class AppTest { 8 | 9 | @Test 10 | public void add(){ 11 | assertEquals(9, App.add(4, 5)); // Test Passed 12 | assertTrue(App.sub(2, 1) > 0); 13 | assertEquals(10, App.mul(2, 5)); 14 | assertEquals(null, App.divide(1, 0)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring/springbootdemo/src/main/java/com/example/springbootdemo/Controllers/itemcontroller.java: -------------------------------------------------------------------------------- 1 | package com.example.springbootdemo.Controllers; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | @RestController 8 | @RequestMapping("/item") 9 | public class itemcontroller { 10 | @GetMapping("/itemC") 11 | public String itemC() { 12 | return "I am item controller"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /spring/springbootdemo/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /spring/springdemo/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /reversestr.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | public class reversestr { 4 | public static void main(String[] args) { 5 | Scanner sc = new Scanner(System.in); 6 | 7 | String name = sc.nextLine(); 8 | char[] arr = name.toCharArray(); 9 | 10 | for (int i = 0; i < name.length() / 2; i++) { 11 | char temp = arr[i]; 12 | arr[i] = arr[arr.length - i -1]; 13 | arr[arr.length - i - 1] = temp; 14 | } 15 | for (char c : arr) { 16 | System.out.print(c); 17 | } 18 | sc.close(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spring/springdemo/src/main/java/com/example/springdemo/SpringdemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.springdemo; 2 | 3 | import org.springframework.beans.factory.BeanFactory; 4 | import org.springframework.beans.factory.xml.XmlBeanFactory; 5 | import org.springframework.core.io.ClassPathResource; 6 | import org.springframework.core.io.Resource; 7 | 8 | public class SpringdemoApplication { 9 | public static void main(String[] args) { 10 | Resource resource = new ClassPathResource("Beans.xml"); 11 | BeanFactory context = new XmlBeanFactory(resource); 12 | meow m = (meow) context.getBean("meow"); 13 | 14 | m.speak(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /streamapi.java: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.List; 3 | import java.util.stream.Collectors; 4 | 5 | public class streamapi { 6 | public static void main(String[] args) { 7 | List list = new ArrayList<>(); 8 | 9 | list.add(-19); 10 | list.add(2); 11 | list.add(3); 12 | list.add(50); 13 | 14 | /* long count = list.stream().filter(e -> (e%2==0)).count(); 15 | System.out.println("There are " + count + " Even numbers inside the List."); */ 16 | 17 | list.stream().filter(e -> (e%2!=0)).map(e -> (e+1)).collect(Collectors.toList()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /loops.java: -------------------------------------------------------------------------------- 1 | public class loops { 2 | public static void main(String[] args) { 3 | // do a work several times 4 | /* int counter = 0; // 0 5 | while(counter < 5) { // true false 6 | System.out.println(counter); // print 0 1 2 3 4 7 | counter++; // 1 8 | } 9 | System.out.println("Done! meww"); */ 10 | 11 | /* for (int i = 1; i <= 10; i++) { 12 | System.out.println(i); // 1 - 10 13 | } */ 14 | /* boolean start = true; 15 | while(start) { 16 | System.out.println("Aaryan"); 17 | start = false; 18 | } */ 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Garage.java: -------------------------------------------------------------------------------- 1 | public class Garage implements interfaceCar{ 2 | Car car; 3 | 4 | public Garage(Car car) { 5 | this.car = car; 6 | } 7 | 8 | public void showCar() { 9 | System.out.println(car); 10 | } 11 | 12 | public static void main(String[] args) { 13 | new Garage(new Car("BMW", "GT05", 1000000, "Blue", "Diesel", true)).showCar(); 14 | new Garage(new Car("Mercedes", "GT05", 4000000, "White", "Diesel", true)).showCar(); 15 | } 16 | 17 | @Override 18 | public void speed() { 19 | System.out.println("Speed is 76km per hour"); 20 | 21 | } 22 | 23 | @Override 24 | public void meow() { 25 | System.out.println("meow meow"); 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /shopping/cart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 12 | Document 13 | 14 | 15 | This is your Cart 16 | 17 | -------------------------------------------------------------------------------- /meow.java: -------------------------------------------------------------------------------- 1 | public class meow { 2 | public static void main(String[] args) { 3 | /* // Executes 4 | System.out.print("Meow Meow"); // print something ??? whatever you write 5 | System.out.print("Aaryan"); */ 6 | 7 | /* // Data Types 8 | int a = 4; // any negative and positive value but it can't be decimal 9 | int b = 2; 10 | System.out.println(a % b); // remainder is zero */ 11 | 12 | /* String m = "Meow"; 13 | String a = "Aaryan"; 14 | 15 | char ch = 'a'; 16 | 17 | 18 | 19 | System.out.println(ch); */ 20 | 21 | /* double d = 1.09; 22 | 23 | 24 | System.out.println(d * 2.91); */ 25 | 26 | /* boolean bool = true; // true/false conditional statements 27 | 28 | System.out.println(bool); */ 29 | 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /usermeow.java: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; // Scanner class 2 | 3 | public class usermeow { 4 | public static void main(String[] args) { 5 | Scanner sc = new Scanner(System.in); // Syntax 6 | 7 | while (true) { 8 | System.out.println("Enter q to exit"); 9 | System.out.print("Enter your name : "); 10 | String a = sc.nextLine(); // take input 11 | 12 | if (a.equals("q")) { 13 | System.out.println("Happy coding!"); 14 | sc.close(); 15 | System.exit(0); // Terminate the code 16 | } else if (a.length() < 3 || a.length() > 8) { 17 | System.out.println("Invalid Name"); 18 | } else { 19 | System.out.println("Your name is " + a); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Frontend/meow.js: -------------------------------------------------------------------------------- 1 | let cartItems = []; 2 | let counter = 1; 3 | 4 | function addToCart() { 5 | const title = document.getElementById("cardT").innerHTML; 6 | const desc = document.getElementById("cardD").innerHTML; 7 | 8 | const data = { title, desc }; 9 | // let pre = JSON.parse(localStorage.getItem("data")); 10 | 11 | cartItems.push(data); 12 | cartItems = [...JSON.parse(localStorage.getItem("data")), data]; 13 | 14 | if(cartItems[0] === null) { 15 | cartItems = cartItems.reverse(); 16 | cartItems.pop(); 17 | cartItems = cartItems.reverse(); 18 | } 19 | 20 | localStorage.setItem("data", JSON.stringify(cartItems)); 21 | } 22 | 23 | function increment(count) { 24 | document.getElementById(count).innerHTML = "Buy " + ++counter; 25 | } 26 | 27 | function decrement(count) { 28 | document.getElementById(count).innerHTML = "Buy " + --counter; 29 | } 30 | -------------------------------------------------------------------------------- /Frontend/cart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 13 | 18 | 19 | Document 20 | 21 | 22 |
hi
23 | 24 | 25 | -------------------------------------------------------------------------------- /tasks.java: -------------------------------------------------------------------------------- 1 | public class tasks { 2 | public static void task1() { 3 | for (int i = 0; i < 10; i++) { 4 | System.out.println("hey aaryan"); 5 | } 6 | } 7 | public static void task2() { 8 | for (int i = 0; i < 10; i++) { 9 | System.out.println("meow meow"); 10 | } 11 | } 12 | 13 | public static void main(String[] args) throws InterruptedException { 14 | Thread th1 = new Thread(){ 15 | @Override 16 | public void run() { 17 | task1(); 18 | } 19 | }; 20 | Thread th2 = new Thread(){ 21 | @Override 22 | public void run() { 23 | task2(); 24 | } 25 | }; 26 | 27 | // System.out.println("mew"); 28 | Thread.sleep(3000); 29 | 30 | th1.start(); 31 | th2.start(); 32 | 33 | System.out.println("hey"); 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /CruiseShip.java: -------------------------------------------------------------------------------- 1 | public class CruiseShip extends Ship { 2 | private static String[] availablePackageArr = {"Srilanka", "Chennai", "Goa"}; 3 | private static int[] priceArr = {65000, 25000, 30000}; 4 | private boolean adventureActivity; 5 | 6 | public CruiseShip(Passenger passenger, boolean adventureActivity) { 7 | super(passenger); 8 | this.adventureActivity = adventureActivity; 9 | } 10 | 11 | @Override 12 | public void calculateBill(String cuisine) { 13 | boolean value = super.getPassenger().validatePassengerDetails(); 14 | 15 | if(value == false) { 16 | this.setBookingId("NA"); 17 | this.setBillAmount(-1.0); 18 | } else { 19 | for (int i = 0; i < availablePackageArr.length; i++) { 20 | if(availablePackageArr[i] == super.getPassenger().getPackageType()) { 21 | 22 | } 23 | } 24 | } 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /comcomb.java: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.List; 3 | import java.util.stream.Collectors; 4 | 5 | public class comcomb { 6 | public static boolean isPrime(int num) { 7 | boolean prime = true; 8 | for (int i = num - 1; i > 1; i--) { 9 | if (num % i == 0) { 10 | prime = false; 11 | } 12 | } 13 | return prime; 14 | } 15 | 16 | public static boolean isPalindrome(int num) { 17 | String s = num + ""; 18 | String r = ""; 19 | 20 | for (int i = s.length() - 1; i >= 0; i--) { 21 | r += s.charAt(i); 22 | } 23 | if (s.equals(r)) { 24 | return true; 25 | } 26 | return false; 27 | } 28 | 29 | public static void main(String[] args) { 30 | List list = new ArrayList<>(); 31 | 32 | list.add(10); 33 | list.add(11); 34 | list.add(2); 35 | list.add(111); 36 | 37 | list.stream().filter(e -> (isPrime(e) && isPalindrome(e))) 38 | .collect(Collectors.toList()) 39 | .forEach(System.out::println); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /listmeow.java: -------------------------------------------------------------------------------- 1 | import java.util.ArrayList; 2 | import java.util.List; 3 | import java.util.stream.Collectors; 4 | 5 | public class listmeow { 6 | public static void main(String[] args) { 7 | List list = new ArrayList<>(); 8 | 9 | list.add(10); // 0 10 | list.add(23); // 1 11 | list.add(45); // 2 12 | list.add(2); 13 | list.add(12); 14 | 15 | /* if(list.contains(11)) { 16 | System.out.println("Yes the list contains"); 17 | } else { 18 | System.out.println("No, the list don't"); 19 | } */ 20 | 21 | /* 22 | * for (int i = 0; i < list.size(); i++) { // 0 - 2 23 | * System.out.println(list.get(i)); 24 | * } 25 | */ 26 | 27 | /* 28 | * for (int i : list) { 29 | * System.out.println(i); 30 | * } 31 | */ 32 | 33 | // list.forEach(e -> System.out.println(e)); 34 | 35 | // list.forEach(System.out::println); 36 | 37 | /* list.stream().filter(e -> e % 2 == 0) 38 | .collect(Collectors.toList()) 39 | .forEach(System.out::println); */ 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /spring/springbootdemo/src/main/java/com/example/springbootdemo/Controllers/meowC.java: -------------------------------------------------------------------------------- 1 | package com.example.springbootdemo.Controllers; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.PathVariable; 5 | import org.springframework.web.bind.annotation.PostMapping; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | @RestController 12 | @RequestMapping("/meow") 13 | public class meowC { 14 | 15 | // GET 16 | // POST 17 | // PUT 18 | // UPDATE 19 | // DELETE 20 | @GetMapping("/hello") 21 | public String hello() { 22 | return "Hello Meow"; 23 | } 24 | 25 | @PostMapping("/add/{a}/{b}") 26 | public int addit(@PathVariable int a, @PathVariable int b) { 27 | return (a + b); 28 | } 29 | 30 | @PostMapping("/add") 31 | public int add(@RequestBody addModel model) { 32 | return (model.getA() + model.getB()); 33 | } 34 | 35 | @GetMapping("/home") 36 | public String home() { 37 | return "Welcome to Home"; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Frontend/buy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Meow Meow 10 | 11 | 12 | 13 | 24 | 25 | -------------------------------------------------------------------------------- /queumeow.java: -------------------------------------------------------------------------------- 1 | import java.util.ArrayDeque; 2 | import java.util.List; 3 | import java.util.Queue; 4 | import java.util.stream.Collectors; 5 | 6 | public class queumeow { 7 | public static void main(String[] args) { 8 | Queue q = new ArrayDeque<>(); 9 | 10 | q.offer(10); 11 | q.offer(15); 12 | q.offer(5); 13 | q.offer(50); 14 | // 50 15 10 5 15 | 16 | /* int counter = 0; 17 | int element = 0; */ 18 | /* while(counter <= 2) { 19 | element = q.poll(); 20 | counter++; 21 | } */ 22 | System.out.println(q.stream().collect(Collectors.toList()).get(3)); 23 | 24 | // System.out.println(element); 25 | 26 | /* for (int i = 0; i < q.size() ; i++) { 27 | for (int j = 0; j < q.size(); j++) { 28 | List list = q.stream().collect(Collectors.toList()); 29 | if(list.get(i) > list.get(j)) { 30 | int val = list.get(i); 31 | int val2 = list.get(j); 32 | 33 | int index1 = i; 34 | int index2 = j; 35 | list.remove(index1); 36 | list.add(index1, val2); 37 | list.remove(index2); 38 | list.add(index2, val); 39 | 40 | q.clear(); 41 | 42 | q.addAll(list); 43 | } 44 | } 45 | } */ 46 | 47 | // q.forEach(System.out::println); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /spring/springdemo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.6.2 9 | 10 | 11 | com.example 12 | springdemo 13 | 0.0.1-SNAPSHOT 14 | springdemo 15 | Demo project for Spring Boot 16 | 17 | 11 18 | 19 | 20 | 21 | 22 | org.springframework 23 | spring-core 24 | 5.3.15 25 | 26 | 27 | 28 | 29 | org.springframework 30 | spring-beans 31 | 5.3.15 32 | 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-starter-test 37 | test 38 | 39 | 40 | 41 | 42 | 43 | 44 | org.springframework.boot 45 | spring-boot-maven-plugin 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /spring/springbootdemo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.6.3 9 | 10 | 11 | com.example 12 | springbootdemo 13 | 0.0.1-SNAPSHOT 14 | springbootdemo 15 | Demo project for Spring Boot 16 | 17 | 11 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-web 23 | 24 | 25 | 26 | org.projectlombok 27 | lombok 28 | true 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-test 33 | test 34 | 35 | 36 | 37 | 38 | 39 | 40 | org.springframework.boot 41 | spring-boot-maven-plugin 42 | 43 | 44 | 45 | org.projectlombok 46 | lombok 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Frontend/cart.js: -------------------------------------------------------------------------------- 1 | window.onload = function () { 2 | data = [JSON.parse(localStorage.getItem("data"))]; 3 | 4 | data = data[0]; 5 | 6 | data.forEach((value) => { 7 | const title = value.title; 8 | const desc = value.desc; 9 | 10 | var div = document.getElementById("meow"); 11 | 12 | var card = document.createElement("div"); 13 | card.className = "card"; 14 | card.style = "width: 18rem;"; 15 | 16 | var cardImage = document.createElement("img"); 17 | cardImage.className = "card-img-top"; 18 | cardImage.style = 19 | "background-image: url('https://images.unsplash.com/photo-1615807713086-bfc4975801d0?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8Y2F0JTIwZmFjZXxlbnwwfHwwfHw%3D&auto=format&fit=crop&w=500&q=60');"; 20 | 21 | var cardTitle = document.createElement("h5"); 22 | cardTitle.className = "card-title"; 23 | cardTitle.innerHTML = title; 24 | 25 | var cardDesc = document.createElement("p"); 26 | cardDesc.className = "card-text"; 27 | cardDesc.innerHTML = desc; 28 | 29 | var deleteBtn = document.createElement("button"); 30 | deleteBtn.className = "btn btn-danger"; 31 | deleteBtn.innerHTML = "Delete"; 32 | deleteBtn.onclick = () => { 33 | data.splice(data.indexOf(value)); 34 | localStorage.setItem("data", data); 35 | card.parentNode.removeChild(card); 36 | }; 37 | 38 | card.appendChild(cardTitle); 39 | card.appendChild(cardDesc); 40 | card.appendChild(cardImage); 41 | card.appendChild(deleteBtn); 42 | 43 | div.appendChild(card); 44 | }); 45 | }; 46 | 47 | function decrement() { 48 | if (counter > 1) { 49 | counter = counter - 1; 50 | document.getElementById("count").innerHTML = "Buy " + counter; 51 | } 52 | } 53 | 54 | function increment() { 55 | if (counter > 4) { 56 | alert("only 5 in stock!"); 57 | } else { 58 | counter = counter + 1; 59 | document.getElementById("count").innerHTML = "Buy " + counter; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /spring/springbootdemo/src/main/java/com/example/springbootdemo/Controllers/EmpController.java: -------------------------------------------------------------------------------- 1 | package com.example.springbootdemo.Controllers; 2 | 3 | import java.util.*; 4 | import com.example.springbootdemo.Models.Employee; 5 | import com.example.springbootdemo.Response.response; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | @RequestMapping("/emp") 14 | @RestController 15 | public class EmpController { 16 | List list = new ArrayList<>(); 17 | // Add Employee 18 | @PostMapping("/insertEmp") 19 | public response addEmp(@RequestBody Employee emp) { 20 | // If added successfully to the list 21 | if(list.add(emp)) { 22 | return new response(200, "Successfully Inserted in List", emp); 23 | } 24 | // On Error 25 | return new response(500, "Internal Server Error", null); 26 | } 27 | 28 | // Get All Employee 29 | @GetMapping("/GetAllEmp") 30 | public response getAllEmp() { 31 | if(list.size() > 0) { 32 | return new response(200, "Successfully Fetched Employees", list); 33 | } 34 | return new response(200, "No Employee Present in the List", null); 35 | } 36 | 37 | // Fetch by id 38 | @GetMapping("/getemp/{empid}") 39 | public response getEmpByID(@PathVariable String empid) { 40 | Optional employee = list.stream().filter(emp -> emp.getEmpid().equals(empid)).findFirst(); 41 | if(employee.isPresent()) { 42 | return new response(200, "Employee Fetched successfully", employee.get()); 43 | } else { 44 | return new response(404, "Employee Not Found", null); 45 | } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Car.java: -------------------------------------------------------------------------------- 1 | public class Car { 2 | String brandName; 3 | String modelName; 4 | int price; 5 | String color; 6 | String petrolOrFuel; 7 | boolean bs6Engine; 8 | 9 | public Car(String brandName, String modelName, int price, String color, String petrolOrFuel, boolean bs6Engine) { 10 | this.brandName = brandName; 11 | this.modelName = modelName; 12 | this.price = price; 13 | this.color = color; 14 | this.petrolOrFuel = petrolOrFuel; 15 | this.bs6Engine = bs6Engine; 16 | } 17 | 18 | public String getBrandName() { 19 | return brandName; 20 | } 21 | 22 | public void setBrandName(String brandName) { 23 | this.brandName = brandName; 24 | } 25 | 26 | public String getModelName() { 27 | return modelName; 28 | } 29 | 30 | public void setModelName(String modelName) { 31 | this.modelName = modelName; 32 | } 33 | 34 | public int getPrice() { 35 | return price; 36 | } 37 | 38 | public void setPrice(int price) { 39 | this.price = price; 40 | } 41 | 42 | public String getColor() { 43 | return color; 44 | } 45 | 46 | public void setColor(String color) { 47 | this.color = color; 48 | } 49 | 50 | public String getPetrolOrFuel() { 51 | return petrolOrFuel; 52 | } 53 | 54 | public void setPetrolOrFuel(String petrolOrFuel) { 55 | this.petrolOrFuel = petrolOrFuel; 56 | } 57 | 58 | public boolean isBs6Engine() { 59 | return bs6Engine; 60 | } 61 | 62 | public void setBs6Engine(boolean bs6Engine) { 63 | this.bs6Engine = bs6Engine; 64 | } 65 | 66 | 67 | public void meow() { 68 | System.out.println("meow meow"); 69 | } 70 | @Override 71 | public String toString() { 72 | return "Car [brandName=" + brandName + ", bs6Engine=" + bs6Engine + ", color=" + color + ", modelName=" 73 | + modelName + ", petrolOrFuel=" + petrolOrFuel + ", price=" + price + "]"; 74 | } 75 | 76 | 77 | 78 | 79 | } -------------------------------------------------------------------------------- /Frontend/meow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Meow Meow 12 | 13 | 14 | 15 |
16 | 17 |
18 | ... 19 |
20 |
Meow Meow
21 |

Some quick example text to build on the card title and make up the bulk of the card's content.

22 | Buy 1 23 | + Cart 24 | 25 | 26 |
27 |
28 |
29 | ... 30 |
31 |
Meow Meow
32 |

Some quick example text to build on the card title and make up the bulk of the card's content.

33 | Buy 1 34 | + Cart 35 | 36 | 37 |
38 |
39 |
40 | 41 | -------------------------------------------------------------------------------- /JDBC/demoproject/src/main/java/com/example/App.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | // 1 Step import the package 4 | // 2 Step Open the connection 5 | // 3 Step Execute the Query 6 | // 4 Step Process the results 7 | // 5 Step (Data Process) 8 | // 6 Step close the connection 9 | 10 | /* private static String db_url = "jdbc:mysql://localhost/test"; 11 | private static String user = "root"; 12 | private static String pass = "12345"; 13 | 14 | public static void main(String[] args) throws SQLException { 15 | Connection con = DriverManager.getConnection(db_url, user, pass); 16 | /* 17 | * PreparedStatement ps = 18 | * con.prepareStatement("insert into testdb values (?, ?, ?)"); 19 | * ps.setInt(1, 12); 20 | * ps.setString(2, "aryanmeow"); 21 | * ps.setInt(3, 15); 22 | * 23 | * ps.executeUpdate(); 24 | 25 | 26 | ResultSet rs = con.createStatement() 27 | .executeQuery("select * from testdb full join participants on testdb.name=participants.name"); 28 | 29 | while (rs.next()) { 30 | System.out.println(rs.getString("name")); 31 | } 32 | 33 | con.close(); 34 | } */ 35 | // import java.sql.*; 36 | 37 | public class App { 38 | public static int add(int a, int b) { 39 | return (a+b); 40 | } 41 | // Result should be positive 42 | // if negative mul with -1; 1) 43 | public static int sub(int a, int b) { 44 | int result = a - b; 45 | if(result < 0) { 46 | return (result * -1); 47 | } 48 | return result; 49 | } 50 | public static int mul(int a, int b) { 51 | return (a * b); 52 | } 53 | public static Object divide(int a, int b) { 54 | if(b == 0) { 55 | return null; 56 | } else { 57 | return (a / b); 58 | } 59 | } 60 | public static void main(String[] args) { 61 | Test.TestCase1(); 62 | Test.TestCase2(); 63 | Test.TestCase3(); 64 | Test.TestCase4(); 65 | } 66 | } 67 | 68 | class Test { 69 | public static void TestCase1() { 70 | if(App.add(3, 5) == 8) { 71 | System.out.println("TestCase1 Passed!"); 72 | } else { 73 | System.out.println("TestCase1 Failed!\n"); 74 | } 75 | } 76 | public static void TestCase2() { 77 | // If result is positive then test case will pass 78 | if(App.sub(3, 5) > 0) { 79 | System.out.println("TestCase2 Passed!"); 80 | } else { 81 | System.out.println("TestCase2 Failed!\n"); 82 | } 83 | } 84 | public static void TestCase3() { 85 | if(App.mul(3, 5) == 15) { 86 | System.out.println("TestCase3 Passed!"); 87 | } else { 88 | System.out.println("TestCase3 Failed!\n"); 89 | } 90 | } 91 | public static void TestCase4() { 92 | if(App.divide(3, 0) == null) { 93 | System.out.println("TestCase4 Passed!"); 94 | } else { 95 | System.out.println("TestCase4 Failed!"); 96 | } 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /shopping/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 14 | Shopping Site 15 | 16 | 17 | 18 | 65 | 95 |
96 |
97 | ... 99 |
100 |
Mobile
101 |

Some quick example text to build on the card title and make up the bulk of the 102 | card's content.

103 | Buy Now! 104 |
105 |
106 |
107 | ... 109 |
110 |
Mobile
111 |

Some quick example text to build on the card title and make up the bulk of the 112 | card's content.

113 | Buy Now! 114 |
115 |
116 |
117 | ... 119 |
120 |
Mobile
121 |

Some quick example text to build on the card title and make up the bulk of the 122 | card's content.

123 | Buy Now! 124 |
125 |
126 |
127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /spring/springdemo/mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* 50 | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 124 | 125 | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% ^ 162 | %JVM_CONFIG_MAVEN_PROPS% ^ 163 | %MAVEN_OPTS% ^ 164 | %MAVEN_DEBUG_OPTS% ^ 165 | -classpath %WRAPPER_JAR% ^ 166 | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ 167 | %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 168 | if ERRORLEVEL 1 goto error 169 | goto end 170 | 171 | :error 172 | set ERROR_CODE=1 173 | 174 | :end 175 | @endlocal & set ERROR_CODE=%ERROR_CODE% 176 | 177 | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost 178 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 179 | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" 180 | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" 181 | :skipRcPost 182 | 183 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 184 | if "%MAVEN_BATCH_PAUSE%"=="on" pause 185 | 186 | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% 187 | 188 | cmd /C exit /B %ERROR_CODE% 189 | -------------------------------------------------------------------------------- /spring/springbootdemo/mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* 50 | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 124 | 125 | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% ^ 162 | %JVM_CONFIG_MAVEN_PROPS% ^ 163 | %MAVEN_OPTS% ^ 164 | %MAVEN_DEBUG_OPTS% ^ 165 | -classpath %WRAPPER_JAR% ^ 166 | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ 167 | %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 168 | if ERRORLEVEL 1 goto error 169 | goto end 170 | 171 | :error 172 | set ERROR_CODE=1 173 | 174 | :end 175 | @endlocal & set ERROR_CODE=%ERROR_CODE% 176 | 177 | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost 178 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 179 | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" 180 | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" 181 | :skipRcPost 182 | 183 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 184 | if "%MAVEN_BATCH_PAUSE%"=="on" pause 185 | 186 | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% 187 | 188 | cmd /C exit /B %ERROR_CODE% 189 | -------------------------------------------------------------------------------- /JDBC/demoproject/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | com.example 4 | demoproject 5 | 1.0-SNAPSHOT 6 | 7 | 1.8 8 | 1.8 9 | UTF-8 10 | 5.6.0 11 | 3.0.0-M3 12 | 3.1.0 13 | 8.29 14 | 4.0.1 15 | 3.0.0-M4 16 | 0.8.4 17 | 3.0.0 18 | 4.3.0 19 | 20 | 0% 21 | 0% 22 | 20 23 | 5 24 | 25 | 26 | 27 | org.junit.jupiter 28 | junit-jupiter-api 29 | ${junit.version} 30 | test 31 | 32 | 33 | org.junit.jupiter 34 | junit-jupiter-engine 35 | ${junit.version} 36 | test 37 | 38 | 39 | 40 | mysql 41 | mysql-connector-java 42 | 8.0.27 43 | 44 | 45 | 46 | 47 | 48 | org.apache.maven.plugins 49 | maven-enforcer-plugin 50 | ${maven-enforcer-plugin.version} 51 | 52 | 53 | 54 | enforce 55 | 56 | 57 | 58 | 59 | 3.6.3 60 | 61 | 62 | true 63 | 64 | 65 | 66 | 67 | 68 | org.apache.maven.plugins 69 | maven-checkstyle-plugin 70 | ${maven-checkstyle-plugin.version} 71 | 72 | 73 | com.puppycrawl.tools 74 | checkstyle 75 | ${checkstyle.version} 76 | 77 | 78 | com.github.ngeor 79 | checkstyle-rules 80 | ${checkstyle-rules.version} 81 | 82 | 83 | 84 | com/github/ngeor/checkstyle.xml 85 | true 86 | ${skipTests} 87 | 88 | 89 | 90 | checkstyle 91 | validate 92 | 93 | check 94 | 95 | 96 | 97 | 98 | 99 | org.apache.maven.plugins 100 | maven-surefire-plugin 101 | ${maven-surefire-plugin.version} 102 | 103 | 104 | org.jacoco 105 | jacoco-maven-plugin 106 | ${jacoco-maven-plugin.version} 107 | 108 | 109 | pre-unit-test 110 | 111 | prepare-agent 112 | 113 | 114 | 115 | post-unit-test 116 | test 117 | 118 | report 119 | 120 | 121 | 122 | check-unit-test 123 | test 124 | 125 | check 126 | 127 | 128 | ${project.build.directory}/jacoco.exec 129 | 130 | 131 | BUNDLE 132 | 133 | 134 | INSTRUCTION 135 | COVEREDRATIO 136 | ${jacoco.unit-tests.limit.instruction-ratio} 137 | 138 | 139 | BRANCH 140 | COVEREDRATIO 141 | ${jacoco.unit-tests.limit.branch-ratio} 142 | 143 | 144 | 145 | 146 | CLASS 147 | 148 | 149 | COMPLEXITY 150 | TOTALCOUNT 151 | ${jacoco.unit-tests.limit.class-complexity} 152 | 153 | 154 | 155 | 156 | METHOD 157 | 158 | 159 | COMPLEXITY 160 | TOTALCOUNT 161 | ${jacoco.unit-tests.limit.method-complexity} 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | org.apache.maven.plugins 176 | maven-javadoc-plugin 177 | ${maven-javadoc-plugin.version} 178 | 179 | 180 | 181 | 182 | 183 | 184 | travis 185 | 186 | 187 | env.TRAVIS 188 | 189 | 190 | 191 | 192 | 193 | org.eluder.coveralls 194 | coveralls-maven-plugin 195 | ${coveralls-maven-plugin.version} 196 | 197 | 198 | 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /spring/springbootdemo/mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # https://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /usr/local/etc/mavenrc ] ; then 40 | . /usr/local/etc/mavenrc 41 | fi 42 | 43 | if [ -f /etc/mavenrc ] ; then 44 | . /etc/mavenrc 45 | fi 46 | 47 | if [ -f "$HOME/.mavenrc" ] ; then 48 | . "$HOME/.mavenrc" 49 | fi 50 | 51 | fi 52 | 53 | # OS specific support. $var _must_ be set to either true or false. 54 | cygwin=false; 55 | darwin=false; 56 | mingw=false 57 | case "`uname`" in 58 | CYGWIN*) cygwin=true ;; 59 | MINGW*) mingw=true;; 60 | Darwin*) darwin=true 61 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 62 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 63 | if [ -z "$JAVA_HOME" ]; then 64 | if [ -x "/usr/libexec/java_home" ]; then 65 | export JAVA_HOME="`/usr/libexec/java_home`" 66 | else 67 | export JAVA_HOME="/Library/Java/Home" 68 | fi 69 | fi 70 | ;; 71 | esac 72 | 73 | if [ -z "$JAVA_HOME" ] ; then 74 | if [ -r /etc/gentoo-release ] ; then 75 | JAVA_HOME=`java-config --jre-home` 76 | fi 77 | fi 78 | 79 | if [ -z "$M2_HOME" ] ; then 80 | ## resolve links - $0 may be a link to maven's home 81 | PRG="$0" 82 | 83 | # need this for relative symlinks 84 | while [ -h "$PRG" ] ; do 85 | ls=`ls -ld "$PRG"` 86 | link=`expr "$ls" : '.*-> \(.*\)$'` 87 | if expr "$link" : '/.*' > /dev/null; then 88 | PRG="$link" 89 | else 90 | PRG="`dirname "$PRG"`/$link" 91 | fi 92 | done 93 | 94 | saveddir=`pwd` 95 | 96 | M2_HOME=`dirname "$PRG"`/.. 97 | 98 | # make it fully qualified 99 | M2_HOME=`cd "$M2_HOME" && pwd` 100 | 101 | cd "$saveddir" 102 | # echo Using m2 at $M2_HOME 103 | fi 104 | 105 | # For Cygwin, ensure paths are in UNIX format before anything is touched 106 | if $cygwin ; then 107 | [ -n "$M2_HOME" ] && 108 | M2_HOME=`cygpath --unix "$M2_HOME"` 109 | [ -n "$JAVA_HOME" ] && 110 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 111 | [ -n "$CLASSPATH" ] && 112 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 113 | fi 114 | 115 | # For Mingw, ensure paths are in UNIX format before anything is touched 116 | if $mingw ; then 117 | [ -n "$M2_HOME" ] && 118 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 119 | [ -n "$JAVA_HOME" ] && 120 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 121 | fi 122 | 123 | if [ -z "$JAVA_HOME" ]; then 124 | javaExecutable="`which javac`" 125 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 126 | # readlink(1) is not available as standard on Solaris 10. 127 | readLink=`which readlink` 128 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 129 | if $darwin ; then 130 | javaHome="`dirname \"$javaExecutable\"`" 131 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 132 | else 133 | javaExecutable="`readlink -f \"$javaExecutable\"`" 134 | fi 135 | javaHome="`dirname \"$javaExecutable\"`" 136 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 137 | JAVA_HOME="$javaHome" 138 | export JAVA_HOME 139 | fi 140 | fi 141 | fi 142 | 143 | if [ -z "$JAVACMD" ] ; then 144 | if [ -n "$JAVA_HOME" ] ; then 145 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 146 | # IBM's JDK on AIX uses strange locations for the executables 147 | JAVACMD="$JAVA_HOME/jre/sh/java" 148 | else 149 | JAVACMD="$JAVA_HOME/bin/java" 150 | fi 151 | else 152 | JAVACMD="`\\unset -f command; \\command -v java`" 153 | fi 154 | fi 155 | 156 | if [ ! -x "$JAVACMD" ] ; then 157 | echo "Error: JAVA_HOME is not defined correctly." >&2 158 | echo " We cannot execute $JAVACMD" >&2 159 | exit 1 160 | fi 161 | 162 | if [ -z "$JAVA_HOME" ] ; then 163 | echo "Warning: JAVA_HOME environment variable is not set." 164 | fi 165 | 166 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 167 | 168 | # traverses directory structure from process work directory to filesystem root 169 | # first directory with .mvn subdirectory is considered project base directory 170 | find_maven_basedir() { 171 | 172 | if [ -z "$1" ] 173 | then 174 | echo "Path not specified to find_maven_basedir" 175 | return 1 176 | fi 177 | 178 | basedir="$1" 179 | wdir="$1" 180 | while [ "$wdir" != '/' ] ; do 181 | if [ -d "$wdir"/.mvn ] ; then 182 | basedir=$wdir 183 | break 184 | fi 185 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 186 | if [ -d "${wdir}" ]; then 187 | wdir=`cd "$wdir/.."; pwd` 188 | fi 189 | # end of workaround 190 | done 191 | echo "${basedir}" 192 | } 193 | 194 | # concatenates all lines of a file 195 | concat_lines() { 196 | if [ -f "$1" ]; then 197 | echo "$(tr -s '\n' ' ' < "$1")" 198 | fi 199 | } 200 | 201 | BASE_DIR=`find_maven_basedir "$(pwd)"` 202 | if [ -z "$BASE_DIR" ]; then 203 | exit 1; 204 | fi 205 | 206 | ########################################################################################## 207 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 208 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 209 | ########################################################################################## 210 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Found .mvn/wrapper/maven-wrapper.jar" 213 | fi 214 | else 215 | if [ "$MVNW_VERBOSE" = true ]; then 216 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 217 | fi 218 | if [ -n "$MVNW_REPOURL" ]; then 219 | jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 220 | else 221 | jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 222 | fi 223 | while IFS="=" read key value; do 224 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 225 | esac 226 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 227 | if [ "$MVNW_VERBOSE" = true ]; then 228 | echo "Downloading from: $jarUrl" 229 | fi 230 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 231 | if $cygwin; then 232 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 233 | fi 234 | 235 | if command -v wget > /dev/null; then 236 | if [ "$MVNW_VERBOSE" = true ]; then 237 | echo "Found wget ... using wget" 238 | fi 239 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 240 | wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" 241 | else 242 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" 243 | fi 244 | elif command -v curl > /dev/null; then 245 | if [ "$MVNW_VERBOSE" = true ]; then 246 | echo "Found curl ... using curl" 247 | fi 248 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 249 | curl -o "$wrapperJarPath" "$jarUrl" -f 250 | else 251 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 252 | fi 253 | 254 | else 255 | if [ "$MVNW_VERBOSE" = true ]; then 256 | echo "Falling back to using Java to download" 257 | fi 258 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 259 | # For Cygwin, switch paths to Windows format before running javac 260 | if $cygwin; then 261 | javaClass=`cygpath --path --windows "$javaClass"` 262 | fi 263 | if [ -e "$javaClass" ]; then 264 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 265 | if [ "$MVNW_VERBOSE" = true ]; then 266 | echo " - Compiling MavenWrapperDownloader.java ..." 267 | fi 268 | # Compiling the Java class 269 | ("$JAVA_HOME/bin/javac" "$javaClass") 270 | fi 271 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 272 | # Running the downloader 273 | if [ "$MVNW_VERBOSE" = true ]; then 274 | echo " - Running MavenWrapperDownloader.java ..." 275 | fi 276 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 277 | fi 278 | fi 279 | fi 280 | fi 281 | ########################################################################################## 282 | # End of extension 283 | ########################################################################################## 284 | 285 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 286 | if [ "$MVNW_VERBOSE" = true ]; then 287 | echo $MAVEN_PROJECTBASEDIR 288 | fi 289 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 290 | 291 | # For Cygwin, switch paths to Windows format before running java 292 | if $cygwin; then 293 | [ -n "$M2_HOME" ] && 294 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 295 | [ -n "$JAVA_HOME" ] && 296 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 297 | [ -n "$CLASSPATH" ] && 298 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 299 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 300 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 301 | fi 302 | 303 | # Provide a "standardized" way to retrieve the CLI args that will 304 | # work with both Windows and non-Windows executions. 305 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 306 | export MAVEN_CMD_LINE_ARGS 307 | 308 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 309 | 310 | exec "$JAVACMD" \ 311 | $MAVEN_OPTS \ 312 | $MAVEN_DEBUG_OPTS \ 313 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 314 | "-Dmaven.home=${M2_HOME}" \ 315 | "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 316 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 317 | -------------------------------------------------------------------------------- /spring/springdemo/mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # https://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /usr/local/etc/mavenrc ] ; then 40 | . /usr/local/etc/mavenrc 41 | fi 42 | 43 | if [ -f /etc/mavenrc ] ; then 44 | . /etc/mavenrc 45 | fi 46 | 47 | if [ -f "$HOME/.mavenrc" ] ; then 48 | . "$HOME/.mavenrc" 49 | fi 50 | 51 | fi 52 | 53 | # OS specific support. $var _must_ be set to either true or false. 54 | cygwin=false; 55 | darwin=false; 56 | mingw=false 57 | case "`uname`" in 58 | CYGWIN*) cygwin=true ;; 59 | MINGW*) mingw=true;; 60 | Darwin*) darwin=true 61 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 62 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 63 | if [ -z "$JAVA_HOME" ]; then 64 | if [ -x "/usr/libexec/java_home" ]; then 65 | export JAVA_HOME="`/usr/libexec/java_home`" 66 | else 67 | export JAVA_HOME="/Library/Java/Home" 68 | fi 69 | fi 70 | ;; 71 | esac 72 | 73 | if [ -z "$JAVA_HOME" ] ; then 74 | if [ -r /etc/gentoo-release ] ; then 75 | JAVA_HOME=`java-config --jre-home` 76 | fi 77 | fi 78 | 79 | if [ -z "$M2_HOME" ] ; then 80 | ## resolve links - $0 may be a link to maven's home 81 | PRG="$0" 82 | 83 | # need this for relative symlinks 84 | while [ -h "$PRG" ] ; do 85 | ls=`ls -ld "$PRG"` 86 | link=`expr "$ls" : '.*-> \(.*\)$'` 87 | if expr "$link" : '/.*' > /dev/null; then 88 | PRG="$link" 89 | else 90 | PRG="`dirname "$PRG"`/$link" 91 | fi 92 | done 93 | 94 | saveddir=`pwd` 95 | 96 | M2_HOME=`dirname "$PRG"`/.. 97 | 98 | # make it fully qualified 99 | M2_HOME=`cd "$M2_HOME" && pwd` 100 | 101 | cd "$saveddir" 102 | # echo Using m2 at $M2_HOME 103 | fi 104 | 105 | # For Cygwin, ensure paths are in UNIX format before anything is touched 106 | if $cygwin ; then 107 | [ -n "$M2_HOME" ] && 108 | M2_HOME=`cygpath --unix "$M2_HOME"` 109 | [ -n "$JAVA_HOME" ] && 110 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 111 | [ -n "$CLASSPATH" ] && 112 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 113 | fi 114 | 115 | # For Mingw, ensure paths are in UNIX format before anything is touched 116 | if $mingw ; then 117 | [ -n "$M2_HOME" ] && 118 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 119 | [ -n "$JAVA_HOME" ] && 120 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 121 | fi 122 | 123 | if [ -z "$JAVA_HOME" ]; then 124 | javaExecutable="`which javac`" 125 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 126 | # readlink(1) is not available as standard on Solaris 10. 127 | readLink=`which readlink` 128 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 129 | if $darwin ; then 130 | javaHome="`dirname \"$javaExecutable\"`" 131 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 132 | else 133 | javaExecutable="`readlink -f \"$javaExecutable\"`" 134 | fi 135 | javaHome="`dirname \"$javaExecutable\"`" 136 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 137 | JAVA_HOME="$javaHome" 138 | export JAVA_HOME 139 | fi 140 | fi 141 | fi 142 | 143 | if [ -z "$JAVACMD" ] ; then 144 | if [ -n "$JAVA_HOME" ] ; then 145 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 146 | # IBM's JDK on AIX uses strange locations for the executables 147 | JAVACMD="$JAVA_HOME/jre/sh/java" 148 | else 149 | JAVACMD="$JAVA_HOME/bin/java" 150 | fi 151 | else 152 | JAVACMD="`\\unset -f command; \\command -v java`" 153 | fi 154 | fi 155 | 156 | if [ ! -x "$JAVACMD" ] ; then 157 | echo "Error: JAVA_HOME is not defined correctly." >&2 158 | echo " We cannot execute $JAVACMD" >&2 159 | exit 1 160 | fi 161 | 162 | if [ -z "$JAVA_HOME" ] ; then 163 | echo "Warning: JAVA_HOME environment variable is not set." 164 | fi 165 | 166 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 167 | 168 | # traverses directory structure from process work directory to filesystem root 169 | # first directory with .mvn subdirectory is considered project base directory 170 | find_maven_basedir() { 171 | 172 | if [ -z "$1" ] 173 | then 174 | echo "Path not specified to find_maven_basedir" 175 | return 1 176 | fi 177 | 178 | basedir="$1" 179 | wdir="$1" 180 | while [ "$wdir" != '/' ] ; do 181 | if [ -d "$wdir"/.mvn ] ; then 182 | basedir=$wdir 183 | break 184 | fi 185 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 186 | if [ -d "${wdir}" ]; then 187 | wdir=`cd "$wdir/.."; pwd` 188 | fi 189 | # end of workaround 190 | done 191 | echo "${basedir}" 192 | } 193 | 194 | # concatenates all lines of a file 195 | concat_lines() { 196 | if [ -f "$1" ]; then 197 | echo "$(tr -s '\n' ' ' < "$1")" 198 | fi 199 | } 200 | 201 | BASE_DIR=`find_maven_basedir "$(pwd)"` 202 | if [ -z "$BASE_DIR" ]; then 203 | exit 1; 204 | fi 205 | 206 | ########################################################################################## 207 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 208 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 209 | ########################################################################################## 210 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Found .mvn/wrapper/maven-wrapper.jar" 213 | fi 214 | else 215 | if [ "$MVNW_VERBOSE" = true ]; then 216 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 217 | fi 218 | if [ -n "$MVNW_REPOURL" ]; then 219 | jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 220 | else 221 | jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 222 | fi 223 | while IFS="=" read key value; do 224 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 225 | esac 226 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 227 | if [ "$MVNW_VERBOSE" = true ]; then 228 | echo "Downloading from: $jarUrl" 229 | fi 230 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 231 | if $cygwin; then 232 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 233 | fi 234 | 235 | if command -v wget > /dev/null; then 236 | if [ "$MVNW_VERBOSE" = true ]; then 237 | echo "Found wget ... using wget" 238 | fi 239 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 240 | wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" 241 | else 242 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" 243 | fi 244 | elif command -v curl > /dev/null; then 245 | if [ "$MVNW_VERBOSE" = true ]; then 246 | echo "Found curl ... using curl" 247 | fi 248 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 249 | curl -o "$wrapperJarPath" "$jarUrl" -f 250 | else 251 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 252 | fi 253 | 254 | else 255 | if [ "$MVNW_VERBOSE" = true ]; then 256 | echo "Falling back to using Java to download" 257 | fi 258 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 259 | # For Cygwin, switch paths to Windows format before running javac 260 | if $cygwin; then 261 | javaClass=`cygpath --path --windows "$javaClass"` 262 | fi 263 | if [ -e "$javaClass" ]; then 264 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 265 | if [ "$MVNW_VERBOSE" = true ]; then 266 | echo " - Compiling MavenWrapperDownloader.java ..." 267 | fi 268 | # Compiling the Java class 269 | ("$JAVA_HOME/bin/javac" "$javaClass") 270 | fi 271 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 272 | # Running the downloader 273 | if [ "$MVNW_VERBOSE" = true ]; then 274 | echo " - Running MavenWrapperDownloader.java ..." 275 | fi 276 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 277 | fi 278 | fi 279 | fi 280 | fi 281 | ########################################################################################## 282 | # End of extension 283 | ########################################################################################## 284 | 285 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 286 | if [ "$MVNW_VERBOSE" = true ]; then 287 | echo $MAVEN_PROJECTBASEDIR 288 | fi 289 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 290 | 291 | # For Cygwin, switch paths to Windows format before running java 292 | if $cygwin; then 293 | [ -n "$M2_HOME" ] && 294 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 295 | [ -n "$JAVA_HOME" ] && 296 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 297 | [ -n "$CLASSPATH" ] && 298 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 299 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 300 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 301 | fi 302 | 303 | # Provide a "standardized" way to retrieve the CLI args that will 304 | # work with both Windows and non-Windows executions. 305 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 306 | export MAVEN_CMD_LINE_ARGS 307 | 308 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 309 | 310 | exec "$JAVACMD" \ 311 | $MAVEN_OPTS \ 312 | $MAVEN_DEBUG_OPTS \ 313 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 314 | "-Dmaven.home=${M2_HOME}" \ 315 | "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 316 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 317 | --------------------------------------------------------------------------------