├── couponapp
├── data
│ ├── build.gradle
│ ├── .DS_Store
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── bharath
│ │ │ └── gradle
│ │ │ └── App.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── bharath
│ │ └── gradle
│ │ └── AppTest.java
├── services
│ ├── build.gradle
│ ├── .DS_Store
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── bharath
│ │ │ └── gradle
│ │ │ └── App.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── bharath
│ │ └── gradle
│ │ └── AppTest.java
├── .DS_Store
├── web
│ ├── .DS_Store
│ ├── src
│ │ ├── .DS_Store
│ │ ├── main
│ │ │ ├── .DS_Store
│ │ │ ├── java
│ │ │ │ ├── .DS_Store
│ │ │ │ └── com
│ │ │ │ │ ├── .DS_Store
│ │ │ │ │ └── bharath
│ │ │ │ │ ├── .DS_Store
│ │ │ │ │ └── gradle
│ │ │ │ │ ├── .DS_Store
│ │ │ │ │ └── CouponServlet.java
│ │ │ └── webapp
│ │ │ │ ├── response.jsp
│ │ │ │ └── index.html
│ │ └── test
│ │ │ ├── .DS_Store
│ │ │ └── java
│ │ │ ├── .DS_Store
│ │ │ └── com
│ │ │ ├── .DS_Store
│ │ │ └── bharath
│ │ │ ├── .DS_Store
│ │ │ └── gradle
│ │ │ └── .DS_Store
│ └── build.gradle
├── .gitignore
├── integration
│ ├── .DS_Store
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── bharath
│ │ │ └── gradle
│ │ │ └── App.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── bharath
│ │ └── gradle
│ │ └── AppTest.java
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitattributes
├── build.gradle
├── settings.gradle
├── gradlew.bat
└── gradlew
├── springbootdemo
├── bin
│ ├── main
│ │ ├── application.properties
│ │ └── com
│ │ │ └── bharath
│ │ │ └── gradle
│ │ │ ├── HelloGradle.class
│ │ │ └── SpringbootdemoApplication.class
│ └── test
│ │ └── com
│ │ └── bharath
│ │ └── gradle
│ │ └── SpringbootdemoApplicationTests.class
├── src
│ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── bharath
│ │ │ └── gradle
│ │ │ ├── HelloGradle.java
│ │ │ └── SpringbootdemoApplication.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── bharath
│ │ └── gradle
│ │ └── SpringbootdemoApplicationTests.java
├── settings.gradle
├── .DS_Store
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── gradlew.bat
└── gradlew
├── .DS_Store
├── firstPlugin
├── .DS_Store
├── src
│ ├── .DS_Store
│ ├── main
│ │ ├── .DS_Store
│ │ └── groovy
│ │ │ ├── .DS_Store
│ │ │ └── com
│ │ │ ├── .DS_Store
│ │ │ └── bharath
│ │ │ ├── .DS_Store
│ │ │ └── gradle
│ │ │ └── FirstPluginPlugin.groovy
│ ├── functionalTest
│ │ ├── .DS_Store
│ │ └── groovy
│ │ │ ├── .DS_Store
│ │ │ └── com
│ │ │ ├── .DS_Store
│ │ │ └── bharath
│ │ │ ├── .DS_Store
│ │ │ └── gradle
│ │ │ └── FirstPluginPluginFunctionalTest.groovy
│ └── test
│ │ └── groovy
│ │ └── com
│ │ └── bharath
│ │ └── gradle
│ │ └── FirstPluginPluginTest.groovy
├── .gitignore
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitattributes
├── settings.gradle
├── build.gradle
├── gradlew.bat
└── gradlew
├── firstWebApp
├── .DS_Store
├── buildSrc
│ ├── .DS_Store
│ └── src
│ │ ├── .DS_Store
│ │ └── main
│ │ ├── .DS_Store
│ │ └── groovy
│ │ ├── .DS_Store
│ │ └── com
│ │ ├── .DS_Store
│ │ └── bharath
│ │ ├── .DS_Store
│ │ └── gradle
│ │ └── MyAWSPlugin.groovy
├── .gitignore
├── firstWebApp
│ ├── .DS_Store
│ ├── src
│ │ ├── .DS_Store
│ │ ├── main
│ │ │ ├── .DS_Store
│ │ │ ├── java
│ │ │ │ ├── .DS_Store
│ │ │ │ └── com
│ │ │ │ │ ├── .DS_Store
│ │ │ │ │ └── bharath
│ │ │ │ │ ├── .DS_Store
│ │ │ │ │ └── gradle
│ │ │ │ │ ├── .DS_Store
│ │ │ │ │ └── CouponServlet.java
│ │ │ └── webapp
│ │ │ │ ├── response.jsp
│ │ │ │ └── index.html
│ │ └── test
│ │ │ ├── .DS_Store
│ │ │ └── java
│ │ │ ├── .DS_Store
│ │ │ └── com
│ │ │ ├── .DS_Store
│ │ │ └── bharath
│ │ │ ├── .DS_Store
│ │ │ └── gradle
│ │ │ └── .DS_Store
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitattributes
├── settings.gradle
├── gradlew.bat
└── gradlew
├── firstproject
├── .DS_Store
├── gradle
│ ├── .DS_Store
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── .gitattributes
├── settings.gradle
├── build.gradle
├── gradlew.bat
└── gradlew
├── couponservice
├── .DS_Store
├── src
│ ├── .DS_Store
│ ├── main
│ │ ├── .DS_Store
│ │ ├── java
│ │ │ ├── .DS_Store
│ │ │ └── com
│ │ │ │ ├── .DS_Store
│ │ │ │ └── bharath
│ │ │ │ ├── .DS_Store
│ │ │ │ └── springcloud
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── repos
│ │ │ │ └── CouponRepo.java
│ │ │ │ ├── CouponserviceApplication.java
│ │ │ │ ├── model
│ │ │ │ └── Coupon.java
│ │ │ │ └── controllers
│ │ │ │ └── CouponRestController.java
│ │ └── resources
│ │ │ └── application.properties
│ └── test
│ │ ├── .DS_Store
│ │ └── java
│ │ └── com
│ │ └── bharath
│ │ └── springcloud
│ │ └── CouponserviceApplicationTests.java
├── settings.gradle
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ ├── maven-wrapper.properties
│ │ └── MavenWrapperDownloader.java
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── bin
│ ├── main
│ │ ├── application.properties
│ │ └── com
│ │ │ └── bharath
│ │ │ └── springcloud
│ │ │ ├── model
│ │ │ └── Coupon.class
│ │ │ ├── repos
│ │ │ └── CouponRepo.class
│ │ │ ├── CouponserviceApplication.class
│ │ │ └── controllers
│ │ │ └── CouponRestController.class
│ └── test
│ │ └── com
│ │ └── bharath
│ │ └── springcloud
│ │ └── CouponserviceApplicationTests.class
├── tables.sql
├── .gitignore
├── build.gradle
├── pom.xml
├── gradlew.bat
└── gradlew
├── productservice
├── .DS_Store
├── src
│ ├── .DS_Store
│ ├── main
│ │ ├── .DS_Store
│ │ ├── java
│ │ │ ├── .DS_Store
│ │ │ └── com
│ │ │ │ ├── .DS_Store
│ │ │ │ └── bharath
│ │ │ │ ├── .DS_Store
│ │ │ │ └── springcloud
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── repos
│ │ │ │ └── ProductRepo.java
│ │ │ │ ├── ProductserviceApplication.java
│ │ │ │ ├── dto
│ │ │ │ └── Coupon.java
│ │ │ │ ├── controllers
│ │ │ │ └── ProductRestController.java
│ │ │ │ └── model
│ │ │ │ └── Product.java
│ │ └── resources
│ │ │ └── application.properties
│ └── test
│ │ └── java
│ │ └── com
│ │ └── bharath
│ │ └── springcloud
│ │ └── ProductserviceApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ ├── maven-wrapper.properties
│ │ └── MavenWrapperDownloader.java
├── .gitignore
└── pom.xml
├── .gitignore
├── firstJavaProject
├── .DS_Store
├── app
│ ├── .DS_Store
│ ├── src
│ │ ├── .DS_Store
│ │ ├── main
│ │ │ ├── .DS_Store
│ │ │ └── java
│ │ │ │ ├── .DS_Store
│ │ │ │ └── com
│ │ │ │ ├── .DS_Store
│ │ │ │ └── bharath
│ │ │ │ ├── .DS_Store
│ │ │ │ └── gradle
│ │ │ │ └── App.java
│ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── bharath
│ │ │ └── gradle
│ │ │ └── AppTest.java
│ └── build.gradle
├── .gitignore
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitattributes
├── settings.gradle
├── gradlew.bat
└── gradlew
└── .gitattributes
/couponapp/data/build.gradle:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/couponapp/services/build.gradle:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/springbootdemo/bin/main/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/springbootdemo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/springbootdemo/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'springbootdemo'
2 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/.DS_Store
--------------------------------------------------------------------------------
/couponapp/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/.DS_Store
--------------------------------------------------------------------------------
/firstPlugin/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/.DS_Store
--------------------------------------------------------------------------------
/firstproject/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstproject/.DS_Store
--------------------------------------------------------------------------------
/couponapp/data/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/data/.DS_Store
--------------------------------------------------------------------------------
/couponapp/web/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/.DS_Store
--------------------------------------------------------------------------------
/couponservice/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/.DS_Store
--------------------------------------------------------------------------------
/firstPlugin/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/src/.DS_Store
--------------------------------------------------------------------------------
/productservice/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/productservice/.DS_Store
--------------------------------------------------------------------------------
/springbootdemo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/springbootdemo/.DS_Store
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore Gradle project-specific cache directory
2 | .gradle
3 |
4 | # Ignore Gradle build output directory
5 | build
6 |
--------------------------------------------------------------------------------
/couponapp/web/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/.DS_Store
--------------------------------------------------------------------------------
/couponservice/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/src/.DS_Store
--------------------------------------------------------------------------------
/firstJavaProject/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstJavaProject/.DS_Store
--------------------------------------------------------------------------------
/couponapp/services/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/services/.DS_Store
--------------------------------------------------------------------------------
/firstJavaProject/app/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstJavaProject/app/.DS_Store
--------------------------------------------------------------------------------
/firstPlugin/src/main/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/src/main/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/buildSrc/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/buildSrc/.DS_Store
--------------------------------------------------------------------------------
/firstproject/gradle/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstproject/gradle/.DS_Store
--------------------------------------------------------------------------------
/productservice/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/productservice/src/.DS_Store
--------------------------------------------------------------------------------
/couponapp/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore Gradle project-specific cache directory
2 | .gradle
3 |
4 | # Ignore Gradle build output directory
5 | build
6 |
--------------------------------------------------------------------------------
/couponapp/integration/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/integration/.DS_Store
--------------------------------------------------------------------------------
/couponapp/web/src/main/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/main/.DS_Store
--------------------------------------------------------------------------------
/couponapp/web/src/test/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/test/.DS_Store
--------------------------------------------------------------------------------
/couponservice/src/main/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/src/main/.DS_Store
--------------------------------------------------------------------------------
/couponservice/src/test/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/src/test/.DS_Store
--------------------------------------------------------------------------------
/couponservice/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | */
4 |
5 | rootProject.name = 'couponservice'
6 |
--------------------------------------------------------------------------------
/firstJavaProject/app/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstJavaProject/app/src/.DS_Store
--------------------------------------------------------------------------------
/firstPlugin/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore Gradle project-specific cache directory
2 | .gradle
3 |
4 | # Ignore Gradle build output directory
5 | build
6 |
--------------------------------------------------------------------------------
/firstWebApp/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore Gradle project-specific cache directory
2 | .gradle
3 |
4 | # Ignore Gradle build output directory
5 | build
6 |
--------------------------------------------------------------------------------
/firstWebApp/buildSrc/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/buildSrc/src/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/.DS_Store
--------------------------------------------------------------------------------
/firstproject/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore Gradle project-specific cache directory
2 | .gradle
3 |
4 | # Ignore Gradle build output directory
5 | build
6 |
--------------------------------------------------------------------------------
/productservice/src/main/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/productservice/src/main/.DS_Store
--------------------------------------------------------------------------------
/couponapp/web/src/main/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/main/java/.DS_Store
--------------------------------------------------------------------------------
/couponapp/web/src/test/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/test/java/.DS_Store
--------------------------------------------------------------------------------
/couponservice/src/main/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/src/main/java/.DS_Store
--------------------------------------------------------------------------------
/firstJavaProject/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore Gradle project-specific cache directory
2 | .gradle
3 |
4 | # Ignore Gradle build output directory
5 | build
6 |
--------------------------------------------------------------------------------
/firstPlugin/src/main/groovy/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/src/main/groovy/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/.DS_Store
--------------------------------------------------------------------------------
/firstJavaProject/app/src/main/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstJavaProject/app/src/main/.DS_Store
--------------------------------------------------------------------------------
/firstPlugin/src/functionalTest/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/src/functionalTest/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/buildSrc/src/main/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/buildSrc/src/main/.DS_Store
--------------------------------------------------------------------------------
/productservice/src/main/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/productservice/src/main/java/.DS_Store
--------------------------------------------------------------------------------
/couponapp/web/src/main/java/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/main/java/com/.DS_Store
--------------------------------------------------------------------------------
/couponapp/web/src/test/java/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/test/java/com/.DS_Store
--------------------------------------------------------------------------------
/couponservice/src/main/java/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/src/main/java/com/.DS_Store
--------------------------------------------------------------------------------
/firstPlugin/src/main/groovy/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/src/main/groovy/com/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/main/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/main/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/test/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/test/.DS_Store
--------------------------------------------------------------------------------
/productservice/src/main/java/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/productservice/src/main/java/com/.DS_Store
--------------------------------------------------------------------------------
/couponapp/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/couponservice/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/firstJavaProject/app/src/main/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstJavaProject/app/src/main/java/.DS_Store
--------------------------------------------------------------------------------
/firstPlugin/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/firstWebApp/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/productservice/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/productservice/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/couponservice/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
2 |
--------------------------------------------------------------------------------
/couponservice/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/firstPlugin/src/functionalTest/groovy/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/src/functionalTest/groovy/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/buildSrc/src/main/groovy/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/buildSrc/src/main/groovy/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/main/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/main/java/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/test/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/test/java/.DS_Store
--------------------------------------------------------------------------------
/firstproject/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstproject/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/productservice/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
2 |
--------------------------------------------------------------------------------
/couponapp/web/src/main/java/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/main/java/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/couponapp/web/src/test/java/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/test/java/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/couponservice/src/main/java/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/src/main/java/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/firstJavaProject/app/src/main/java/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstJavaProject/app/src/main/java/com/.DS_Store
--------------------------------------------------------------------------------
/firstJavaProject/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstJavaProject/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/firstPlugin/src/main/groovy/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/src/main/groovy/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/buildSrc/src/main/groovy/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/buildSrc/src/main/groovy/com/.DS_Store
--------------------------------------------------------------------------------
/productservice/src/main/java/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/productservice/src/main/java/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/springbootdemo/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/springbootdemo/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/firstPlugin/src/functionalTest/groovy/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/src/functionalTest/groovy/com/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/main/java/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/main/java/com/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/test/java/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/test/java/com/.DS_Store
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | #
2 | # https://help.github.com/articles/dealing-with-line-endings/
3 | #
4 | # These are explicitly windows files and should use crlf
5 | *.bat text eol=crlf
6 |
7 |
--------------------------------------------------------------------------------
/couponapp/web/src/main/java/com/bharath/gradle/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/main/java/com/bharath/gradle/.DS_Store
--------------------------------------------------------------------------------
/couponapp/web/src/test/java/com/bharath/gradle/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponapp/web/src/test/java/com/bharath/gradle/.DS_Store
--------------------------------------------------------------------------------
/firstJavaProject/app/src/main/java/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstJavaProject/app/src/main/java/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/firstPlugin/src/functionalTest/groovy/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstPlugin/src/functionalTest/groovy/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/buildSrc/src/main/groovy/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/buildSrc/src/main/groovy/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/main/java/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/main/java/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/test/java/com/bharath/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/test/java/com/bharath/.DS_Store
--------------------------------------------------------------------------------
/springbootdemo/bin/main/com/bharath/gradle/HelloGradle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/springbootdemo/bin/main/com/bharath/gradle/HelloGradle.class
--------------------------------------------------------------------------------
/couponapp/.gitattributes:
--------------------------------------------------------------------------------
1 | #
2 | # https://help.github.com/articles/dealing-with-line-endings/
3 | #
4 | # These are explicitly windows files and should use crlf
5 | *.bat text eol=crlf
6 |
7 |
--------------------------------------------------------------------------------
/couponservice/bin/main/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://localhost:3306/mydb
2 | spring.datasource.username=root
3 | spring.datasource.password=test1234
4 |
5 | server.port=9091
--------------------------------------------------------------------------------
/couponservice/src/main/java/com/bharath/springcloud/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/src/main/java/com/bharath/springcloud/.DS_Store
--------------------------------------------------------------------------------
/productservice/src/main/java/com/bharath/springcloud/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/productservice/src/main/java/com/bharath/springcloud/.DS_Store
--------------------------------------------------------------------------------
/couponservice/bin/main/com/bharath/springcloud/model/Coupon.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/bin/main/com/bharath/springcloud/model/Coupon.class
--------------------------------------------------------------------------------
/firstPlugin/.gitattributes:
--------------------------------------------------------------------------------
1 | #
2 | # https://help.github.com/articles/dealing-with-line-endings/
3 | #
4 | # These are explicitly windows files and should use crlf
5 | *.bat text eol=crlf
6 |
7 |
--------------------------------------------------------------------------------
/firstWebApp/.gitattributes:
--------------------------------------------------------------------------------
1 | #
2 | # https://help.github.com/articles/dealing-with-line-endings/
3 | #
4 | # These are explicitly windows files and should use crlf
5 | *.bat text eol=crlf
6 |
7 |
--------------------------------------------------------------------------------
/firstproject/.gitattributes:
--------------------------------------------------------------------------------
1 | #
2 | # https://help.github.com/articles/dealing-with-line-endings/
3 | #
4 | # These are explicitly windows files and should use crlf
5 | *.bat text eol=crlf
6 |
7 |
--------------------------------------------------------------------------------
/couponapp/build.gradle:
--------------------------------------------------------------------------------
1 | subprojects{
2 | apply plugin: 'application'
3 |
4 | repositories {
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | testImplementation 'junit:junit:4.13'
10 | }
11 | }
--------------------------------------------------------------------------------
/couponservice/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://localhost:3306/mydb
2 | spring.datasource.username=root
3 | spring.datasource.password=test1234
4 |
5 | server.port=9091
--------------------------------------------------------------------------------
/firstJavaProject/.gitattributes:
--------------------------------------------------------------------------------
1 | #
2 | # https://help.github.com/articles/dealing-with-line-endings/
3 | #
4 | # These are explicitly windows files and should use crlf
5 | *.bat text eol=crlf
6 |
7 |
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/main/java/com/bharath/gradle/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/main/java/com/bharath/gradle/.DS_Store
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/test/java/com/bharath/gradle/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/firstWebApp/firstWebApp/src/test/java/com/bharath/gradle/.DS_Store
--------------------------------------------------------------------------------
/couponservice/bin/main/com/bharath/springcloud/repos/CouponRepo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/bin/main/com/bharath/springcloud/repos/CouponRepo.class
--------------------------------------------------------------------------------
/couponapp/integration/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'application'
3 | }
4 |
5 | repositories {
6 | mavenCentral()
7 | }
8 |
9 | dependencies {
10 | testImplementation 'junit:junit:4.13'
11 | }
12 |
--------------------------------------------------------------------------------
/springbootdemo/bin/main/com/bharath/gradle/SpringbootdemoApplication.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/springbootdemo/bin/main/com/bharath/gradle/SpringbootdemoApplication.class
--------------------------------------------------------------------------------
/couponservice/bin/main/com/bharath/springcloud/CouponserviceApplication.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/bin/main/com/bharath/springcloud/CouponserviceApplication.class
--------------------------------------------------------------------------------
/springbootdemo/bin/test/com/bharath/gradle/SpringbootdemoApplicationTests.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/springbootdemo/bin/test/com/bharath/gradle/SpringbootdemoApplicationTests.class
--------------------------------------------------------------------------------
/couponservice/bin/test/com/bharath/springcloud/CouponserviceApplicationTests.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/bin/test/com/bharath/springcloud/CouponserviceApplicationTests.class
--------------------------------------------------------------------------------
/couponservice/bin/main/com/bharath/springcloud/controllers/CouponRestController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bharaththippireddy/gradleforjavadevelopers/HEAD/couponservice/bin/main/com/bharath/springcloud/controllers/CouponRestController.class
--------------------------------------------------------------------------------
/couponapp/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/couponapp/web/src/main/webapp/response.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java"%>
2 |
3 |
4 |
5 | Discount Page
6 |
7 |
8 | ${discount}
9 |
10 |
11 |
--------------------------------------------------------------------------------
/couponservice/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/firstPlugin/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/firstWebApp/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/firstproject/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/springbootdemo/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/firstJavaProject/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/main/webapp/response.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java"%>
2 |
3 |
4 |
5 | Discount Page
6 |
7 |
8 | ${discount}
9 |
10 |
11 |
--------------------------------------------------------------------------------
/productservice/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://localhost:3306/mydb
2 | spring.datasource.username=root
3 | spring.datasource.password=test1234
4 |
5 | server.port=9090
6 |
7 | couponService.url=http://localhost:9091/couponapi/coupons/
--------------------------------------------------------------------------------
/productservice/src/main/java/com/bharath/springcloud/repos/ProductRepo.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud.repos;
2 |
3 | import org.springframework.data.jpa.repository.JpaRepository;
4 |
5 | import com.bharath.springcloud.model.Product;
6 |
7 | public interface ProductRepo extends JpaRepository {
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/couponapp/web/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home
5 |
6 |
7 | Get Coupon
8 |
12 |
13 |
--------------------------------------------------------------------------------
/couponservice/tables.sql:
--------------------------------------------------------------------------------
1 | use mydb;
2 |
3 | create table product(
4 | id int AUTO_INCREMENT PRIMARY KEY,
5 | name varchar(20),
6 | description varchar(100),
7 | price decimal(8,3)
8 | );
9 |
10 | create table coupon(
11 | id int AUTO_INCREMENT PRIMARY KEY,
12 | code varchar(20) UNIQUE,
13 | discount decimal(8,3),
14 | exp_date varchar(100)
15 | );
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home
5 |
6 |
7 | Get Coupon
8 |
12 |
13 |
--------------------------------------------------------------------------------
/springbootdemo/src/test/java/com/bharath/gradle/SpringbootdemoApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.bharath.gradle;
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 |
--------------------------------------------------------------------------------
/couponservice/src/main/java/com/bharath/springcloud/repos/CouponRepo.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud.repos;
2 |
3 | import org.springframework.data.jpa.repository.JpaRepository;
4 |
5 | import com.bharath.springcloud.model.Coupon;
6 |
7 | public interface CouponRepo extends JpaRepository {
8 |
9 | Coupon findByCode(String code);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/couponapp/data/src/main/java/com/bharath/gradle/App.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Java source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle;
5 |
6 | public class App {
7 | public String getGreeting() {
8 | return "Hello World!";
9 | }
10 |
11 | public static void main(String[] args) {
12 | System.out.println(new App().getGreeting());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/couponapp/integration/src/main/java/com/bharath/gradle/App.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Java source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle;
5 |
6 | public class App {
7 | public String getGreeting() {
8 | return "Hello World!";
9 | }
10 |
11 | public static void main(String[] args) {
12 | System.out.println(new App().getGreeting());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/couponapp/services/src/main/java/com/bharath/gradle/App.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Java source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle;
5 |
6 | public class App {
7 | public String getGreeting() {
8 | return "Hello World!";
9 | }
10 |
11 | public static void main(String[] args) {
12 | System.out.println(new App().getGreeting());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/firstJavaProject/app/src/main/java/com/bharath/gradle/App.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Java source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle;
5 |
6 | public class App {
7 | public String getGreeting() {
8 | return "Hello World!";
9 | }
10 |
11 | public static void main(String[] args) {
12 | System.out.println(new App().getGreeting());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/firstPlugin/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * The settings file is used to specify which projects to include in your build.
5 | *
6 | * Detailed information about configuring a multi-project build in Gradle can be found
7 | * in the user manual at https://docs.gradle.org/6.5.1/userguide/multi_project_builds.html
8 | */
9 |
10 | rootProject.name = 'firstPlugin'
11 |
--------------------------------------------------------------------------------
/springbootdemo/src/main/java/com/bharath/gradle/HelloGradle.java:
--------------------------------------------------------------------------------
1 | package com.bharath.gradle;
2 |
3 | import org.springframework.web.bind.annotation.GetMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloGradle {
8 |
9 | @GetMapping("/hello")
10 | public String hello() {
11 | return "Spring Boot With Gradle is Super Easy";
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/firstproject/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * The settings file is used to specify which projects to include in your build.
5 | *
6 | * Detailed information about configuring a multi-project build in Gradle can be found
7 | * in the user manual at https://docs.gradle.org/6.5.1/userguide/multi_project_builds.html
8 | */
9 |
10 | rootProject.name = 'firstproject'
11 |
--------------------------------------------------------------------------------
/firstJavaProject/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * The settings file is used to specify which projects to include in your build.
5 | *
6 | * Detailed information about configuring a multi-project build in Gradle can be found
7 | * in the user manual at https://docs.gradle.org/7.3.1/userguide/multi_project_builds.html
8 | */
9 |
10 | rootProject.name = 'firstJavaProject'
11 | include('app')
12 |
--------------------------------------------------------------------------------
/firstWebApp/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * The settings file is used to specify which projects to include in your build.
5 | *
6 | * Detailed information about configuring a multi-project build in Gradle can be found
7 | * in the user manual at https://docs.gradle.org/7.3.1/userguide/multi_project_builds.html
8 | */
9 |
10 | rootProject.name = 'firstWebApp'
11 | include('firstWebApp')
12 |
--------------------------------------------------------------------------------
/springbootdemo/src/main/java/com/bharath/gradle/SpringbootdemoApplication.java:
--------------------------------------------------------------------------------
1 | package com.bharath.gradle;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class SpringbootdemoApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(SpringbootdemoApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/couponservice/src/main/java/com/bharath/springcloud/CouponserviceApplication.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class CouponserviceApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(CouponserviceApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/couponapp/data/src/test/java/com/bharath/gradle/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Java source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle;
5 |
6 | import org.junit.Test;
7 | import static org.junit.Assert.*;
8 |
9 | public class AppTest {
10 | @Test public void testAppHasAGreeting() {
11 | App classUnderTest = new App();
12 | assertNotNull("app should have a greeting", classUnderTest.getGreeting());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/firstJavaProject/app/src/test/java/com/bharath/gradle/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Java source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle;
5 |
6 | import org.junit.Test;
7 | import static org.junit.Assert.*;
8 |
9 | public class AppTest {
10 | @Test public void appHasAGreeting() {
11 | App classUnderTest = new App();
12 | assertNotNull("app should have a greeting", classUnderTest.getGreeting());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/couponapp/integration/src/test/java/com/bharath/gradle/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Java source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle;
5 |
6 | import org.junit.Test;
7 | import static org.junit.Assert.*;
8 |
9 | public class AppTest {
10 | @Test public void testAppHasAGreeting() {
11 | App classUnderTest = new App();
12 | assertNotNull("app should have a greeting", classUnderTest.getGreeting());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/couponapp/services/src/test/java/com/bharath/gradle/AppTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Java source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle;
5 |
6 | import org.junit.Test;
7 | import static org.junit.Assert.*;
8 |
9 | public class AppTest {
10 | @Test public void testAppHasAGreeting() {
11 | App classUnderTest = new App();
12 | assertNotNull("app should have a greeting", classUnderTest.getGreeting());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/couponservice/src/test/java/com/bharath/springcloud/CouponserviceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class CouponserviceApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/productservice/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**
5 | !**/src/test/**
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 |
30 | ### VS Code ###
31 | .vscode/
32 |
--------------------------------------------------------------------------------
/productservice/src/test/java/com/bharath/springcloud/ProductserviceApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ProductserviceApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/couponapp/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * The settings file is used to specify which projects to include in your build.
5 | *
6 | * Detailed information about configuring a multi-project build in Gradle can be found
7 | * in the user manual at https://docs.gradle.org/6.8.3/userguide/multi_project_builds.html
8 | */
9 |
10 | rootProject.name = 'couponapp'
11 | include('web')
12 | include('services')
13 | include('data')
14 | include('integration')
15 |
--------------------------------------------------------------------------------
/couponservice/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | target/
3 | !.mvn/wrapper/maven-wrapper.jar
4 | !**/src/main/**
5 | !**/src/test/**
6 |
7 | #Gradle
8 | .gradle
9 | /build/
10 |
11 | ### STS ###
12 | .apt_generated
13 | .classpath
14 | .factorypath
15 | .project
16 | .settings
17 | .springBeans
18 | .sts4-cache
19 |
20 | ### IntelliJ IDEA ###
21 | .idea
22 | *.iws
23 | *.iml
24 | *.ipr
25 |
26 | ### NetBeans ###
27 | /nbproject/private/
28 | /nbbuild/
29 | /dist/
30 | /nbdist/
31 | /.nb-gradle/
32 | build/
33 |
34 | ### VS Code ###
35 | .vscode/
36 |
--------------------------------------------------------------------------------
/firstWebApp/buildSrc/src/main/groovy/com/bharath/gradle/MyAWSPlugin.groovy:
--------------------------------------------------------------------------------
1 | package com.bharath.gradle
2 |
3 | import org.gradle.api.Plugin
4 | import org.gradle.api.Project
5 |
6 | public class MyAWSPlugin implements Plugin{
7 | public void apply(Project project){
8 | project.task("copyToS3"){
9 | doLast{
10 | println "Copied to S3"
11 | }
12 | }
13 |
14 | project.task("deployToEC2"){
15 | doLast{
16 | println "Application is up and running on AWS EC2"
17 | }
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/springbootdemo/.gitignore:
--------------------------------------------------------------------------------
1 | HELP.md
2 | .gradle
3 | build/
4 | !gradle/wrapper/gradle-wrapper.jar
5 | !**/src/main/**/build/
6 | !**/src/test/**/build/
7 |
8 | ### STS ###
9 | .apt_generated
10 | .classpath
11 | .factorypath
12 | .project
13 | .settings
14 | .springBeans
15 | .sts4-cache
16 |
17 | ### IntelliJ IDEA ###
18 | .idea
19 | *.iws
20 | *.iml
21 | *.ipr
22 | out/
23 | !**/src/main/**/out/
24 | !**/src/test/**/out/
25 |
26 | ### NetBeans ###
27 | /nbproject/private/
28 | /nbbuild/
29 | /dist/
30 | /nbdist/
31 | /.nb-gradle/
32 |
33 | ### VS Code ###
34 | .vscode/
35 |
--------------------------------------------------------------------------------
/springbootdemo/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'org.springframework.boot' version '2.3.3.RELEASE'
3 | id 'io.spring.dependency-management' version '1.0.10.RELEASE'
4 | id 'java'
5 | }
6 |
7 | group = 'com.bharath.gradle'
8 | version = '0.0.1-SNAPSHOT'
9 | sourceCompatibility = '11'
10 |
11 | repositories {
12 | mavenCentral()
13 | }
14 |
15 | dependencies {
16 | implementation 'org.springframework.boot:spring-boot-starter-web'
17 | testImplementation('org.springframework.boot:spring-boot-starter-test') {
18 | exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
19 | }
20 | }
21 |
22 | test {
23 | useJUnitPlatform()
24 | }
25 |
--------------------------------------------------------------------------------
/firstPlugin/src/main/groovy/com/bharath/gradle/FirstPluginPlugin.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * This Groovy source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle
5 |
6 | import org.gradle.api.Project
7 | import org.gradle.api.Plugin
8 |
9 | /**
10 | * A simple 'hello world' plugin.
11 | */
12 | public class FirstPluginPlugin implements Plugin {
13 | public void apply(Project project) {
14 | // Register a task
15 | project.tasks.register("greeting") {
16 | doLast {
17 | println("Hello from plugin 'com.bharath.gradle.greeting'")
18 | }
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/productservice/src/main/java/com/bharath/springcloud/ProductserviceApplication.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.web.client.RestTemplate;
7 |
8 | @SpringBootApplication
9 | public class ProductserviceApplication {
10 |
11 | @Bean
12 | public RestTemplate restTemplate() {
13 | return new RestTemplate();
14 | }
15 |
16 | public static void main(String[] args) {
17 | SpringApplication.run(ProductserviceApplication.class, args);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/firstproject/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * This is a general purpose Gradle build.
5 | * Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds
6 | */
7 | task (firstTask){
8 | def abc=123
9 | println abc
10 | println 'Gradle Rocks!!'
11 | }
12 |
13 | task deployToStage{
14 | doLast(){
15 | println "Deployed to stage"
16 | }
17 | }
18 |
19 | task deployToProd{
20 | doLast(){
21 | println "Deployed to prod"
22 | }
23 | }
24 |
25 | task cleanupFiles{
26 | doLast(){
27 | println 'Cleaned Up Files'
28 | }
29 | }
30 |
31 | deployToProd.dependsOn deployToStage
32 | deployToProd.finalizedBy cleanupFiles
33 | defaultTasks "deployToStage"
34 |
--------------------------------------------------------------------------------
/firstPlugin/src/test/groovy/com/bharath/gradle/FirstPluginPluginTest.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * This Groovy source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle
5 |
6 | import org.gradle.testfixtures.ProjectBuilder
7 | import org.gradle.api.Project
8 | import spock.lang.Specification
9 |
10 | /**
11 | * A simple unit test for the 'com.bharath.gradle.greeting' plugin.
12 | */
13 | public class FirstPluginPluginTest extends Specification {
14 | def "plugin registers task"() {
15 | given:
16 | def project = ProjectBuilder.builder().build()
17 |
18 | when:
19 | project.plugins.apply("com.bharath.gradle.greeting")
20 |
21 | then:
22 | project.tasks.findByName("greeting") != null
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/productservice/src/main/java/com/bharath/springcloud/dto/Coupon.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud.dto;
2 |
3 | import java.math.BigDecimal;
4 |
5 | public class Coupon {
6 | private Long id;
7 | private String code;
8 | private BigDecimal discount;
9 | private String expDate;
10 |
11 | public String getCode() {
12 | return code;
13 | }
14 |
15 | public void setCode(String code) {
16 | this.code = code;
17 | }
18 |
19 | public BigDecimal getDiscount() {
20 | return discount;
21 | }
22 |
23 | public void setDiscount(BigDecimal discount) {
24 | this.discount = discount;
25 | }
26 |
27 | public String getExpDate() {
28 | return expDate;
29 | }
30 |
31 | public void setExpDate(String expDate) {
32 | this.expDate = expDate;
33 | }
34 |
35 | public Long getId() {
36 | return id;
37 | }
38 |
39 | public void setId(Long id) {
40 | this.id = id;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/couponapp/web/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * This generated file contains a sample Java project to get you started.
5 | * For more details take a look at the Java Quickstart chapter in the Gradle
6 | * User Manual available at https://docs.gradle.org/6.5.1/userguide/tutorial_java_projects.html
7 | */
8 |
9 | plugins {
10 | // Apply the java plugin to add support for Java
11 | id 'war'
12 | id 'org.gretty' version '4.0.0'
13 | }
14 |
15 | repositories {
16 | // Use jcenter for resolving dependencies.
17 | // You can declare any Maven/Ivy/file repository here.
18 | jcenter()
19 | }
20 |
21 | dependencies {
22 | providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
23 | implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.11.2'
24 | testImplementation group: 'junit', name: 'junit', version: '4.4'
25 |
26 | }
27 |
28 | gretty.httpPort=8090
--------------------------------------------------------------------------------
/couponapp/web/src/main/java/com/bharath/gradle/CouponServlet.java:
--------------------------------------------------------------------------------
1 | package com.bharath.gradle;
2 |
3 | import java.io.IOException;
4 | import javax.servlet.ServletException;
5 | import javax.servlet.annotation.WebServlet;
6 | import javax.servlet.http.HttpServlet;
7 | import javax.servlet.http.HttpServletRequest;
8 | import javax.servlet.http.HttpServletResponse;
9 |
10 | @WebServlet("/coupon")
11 | public class CouponServlet extends HttpServlet {
12 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
13 | throws ServletException, IOException {
14 | response.getWriter().print("SUPERSALE");
15 | }
16 |
17 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
18 | throws ServletException, IOException {
19 | String coupon = request.getParameter("coupon");
20 | request.setAttribute("discount","Discount for coupon "+coupon+" is 50%" );
21 | request.getRequestDispatcher("response.jsp").forward(request,response);
22 | }
23 | }
--------------------------------------------------------------------------------
/couponservice/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | */
4 |
5 | plugins {
6 | id 'java'
7 | id 'maven-publish'
8 | id 'org.springframework.boot' version '2.3.3.RELEASE'
9 | id 'io.spring.dependency-management' version '1.0.10.RELEASE'
10 | }
11 |
12 | repositories {
13 | mavenCentral()
14 | }
15 |
16 | dependencies {
17 | implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
18 | implementation 'org.springframework.boot:spring-boot-starter-web'
19 | runtimeOnly 'mysql:mysql-connector-java:8.0.19'
20 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
21 | }
22 |
23 | group = 'com.bharath.springcloud'
24 | version = '0.0.1-SNAPSHOT'
25 | description = 'couponservice'
26 | sourceCompatibility = '1.8'
27 |
28 | publishing {
29 | publications {
30 | maven(MavenPublication) {
31 | from(components.java)
32 | }
33 | }
34 | }
35 |
36 | tasks.withType(JavaCompile) {
37 | options.encoding = 'UTF-8'
38 | }
39 |
--------------------------------------------------------------------------------
/firstJavaProject/app/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * This generated file contains a sample Java project to get you started.
5 | * For more details take a look at the Java Quickstart chapter in the Gradle
6 | * User Manual available at https://docs.gradle.org/6.5.1/userguide/tutorial_java_projects.html
7 | */
8 |
9 | plugins {
10 | // Apply the java plugin to add support for Java
11 | id 'java'
12 |
13 | // Apply the application plugin to add support for building a CLI application.
14 | id 'application'
15 | }
16 |
17 |
18 | repositories {
19 |
20 | // Use jcenter for resolving dependencies.
21 | // You can declare any Maven/Ivy/file repository here.
22 | mavenCentral()
23 | }
24 |
25 | dependencies {
26 | // This dependency is used by the application.
27 | implementation 'com.google.guava:guava:29.0-jre'
28 |
29 | // Use JUnit test framework
30 | testImplementation 'junit:junit:4.13'
31 |
32 | }
33 |
34 | application {
35 | // Define the main class for the application.
36 | mainClassName = 'com.bharath.gradle.App'
37 | }
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/src/main/java/com/bharath/gradle/CouponServlet.java:
--------------------------------------------------------------------------------
1 | package com.bharath.gradle;
2 |
3 | import java.io.IOException;
4 | import jakarta.servlet.ServletConfig;
5 | import jakarta.servlet.ServletContext;
6 | import jakarta.servlet.ServletException;
7 | import jakarta.servlet.annotation.WebServlet;
8 | import jakarta.servlet.http.HttpServlet;
9 | import jakarta.servlet.http.HttpServletRequest;
10 | import jakarta.servlet.http.HttpServletResponse;
11 |
12 | @WebServlet("/coupon")
13 | public class CouponServlet extends HttpServlet {
14 | protected void doGet(HttpServletRequest request, HttpServletResponse response)
15 | throws ServletException, IOException {
16 | response.getWriter().print("SUPERSALE");
17 | }
18 |
19 | protected void doPost(HttpServletRequest request, HttpServletResponse response)
20 | throws ServletException, IOException {
21 | String coupon = request.getParameter("coupon");
22 | request.setAttribute("discount","Discount for coupon "+coupon+" is 50%" );
23 | request.getRequestDispatcher("response.jsp").forward(request,response);
24 | }
25 | }
--------------------------------------------------------------------------------
/couponservice/src/main/java/com/bharath/springcloud/model/Coupon.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud.model;
2 |
3 | import java.math.BigDecimal;
4 |
5 | import javax.persistence.Entity;
6 | import javax.persistence.GeneratedValue;
7 | import javax.persistence.GenerationType;
8 | import javax.persistence.Id;
9 |
10 | @Entity
11 | public class Coupon {
12 |
13 | @Id
14 | @GeneratedValue(strategy = GenerationType.IDENTITY)
15 | private Long id;
16 | private String code;
17 | private BigDecimal discount;
18 | private String expDate;
19 |
20 | public String getCode() {
21 | return code;
22 | }
23 |
24 | public void setCode(String code) {
25 | this.code = code;
26 | }
27 |
28 | public BigDecimal getDiscount() {
29 | return discount;
30 | }
31 |
32 | public void setDiscount(BigDecimal discount) {
33 | this.discount = discount;
34 | }
35 |
36 | public String getExpDate() {
37 | return expDate;
38 | }
39 |
40 | public void setExpDate(String expDate) {
41 | this.expDate = expDate;
42 | }
43 |
44 | public Long getId() {
45 | return id;
46 | }
47 |
48 | public void setId(Long id) {
49 | this.id = id;
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/couponservice/src/main/java/com/bharath/springcloud/controllers/CouponRestController.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud.controllers;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.web.bind.annotation.PathVariable;
5 | import org.springframework.web.bind.annotation.RequestBody;
6 | import org.springframework.web.bind.annotation.RequestMapping;
7 | import org.springframework.web.bind.annotation.RequestMethod;
8 | import org.springframework.web.bind.annotation.RestController;
9 | import org.springframework.web.client.RestTemplate;
10 |
11 | import com.bharath.springcloud.model.Coupon;
12 | import com.bharath.springcloud.repos.CouponRepo;
13 |
14 | @RestController
15 | @RequestMapping("/couponapi")
16 | public class CouponRestController {
17 |
18 | @Autowired
19 | CouponRepo repo;
20 |
21 | @RequestMapping(value = "/coupons", method = RequestMethod.POST)
22 | public Coupon create(@RequestBody Coupon coupon) {
23 |
24 | return repo.save(coupon);
25 |
26 | }
27 |
28 | @RequestMapping(value = "/coupons/{code}", method = RequestMethod.GET)
29 | public Coupon getCoupon(@PathVariable("code") String code) {
30 | return repo.findByCode(code);
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/firstWebApp/firstWebApp/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * This generated file contains a sample Java project to get you started.
5 | * For more details take a look at the Java Quickstart chapter in the Gradle
6 | * User Manual available at https://docs.gradle.org/6.5.1/userguide/tutorial_java_projects.html
7 | */
8 |
9 | import com.bharath.gradle.MyAWSPlugin
10 |
11 | plugins {
12 | // Apply the java plugin to add support for Java
13 | id 'war'
14 | id 'org.gretty' version '4.0.0'
15 | id 'jacoco'
16 | id 'org.sonarqube' version '3.0'
17 | }
18 |
19 | repositories {
20 | // Use jcenter for resolving dependencies.
21 | // You can declare any Maven/Ivy/file repository here.
22 | mavenCentral()
23 | }
24 |
25 | dependencies {
26 | compileOnly 'javax.servlet:javax.servlet-api:3.1.0'
27 | implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.11.2'
28 | testImplementation group: 'junit', name: 'junit', version: '4.4'
29 |
30 | }
31 |
32 | gretty.httpPort=8090
33 |
34 | apply plugin: MyAWSPlugin
35 |
36 |
37 | test.finalizedBy jacocoTestReport
38 | jacocoTestReport.dependsOn test
39 |
40 | deployToEC2.dependsOn copyToS3
--------------------------------------------------------------------------------
/firstPlugin/src/functionalTest/groovy/com/bharath/gradle/FirstPluginPluginFunctionalTest.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * This Groovy source file was generated by the Gradle 'init' task.
3 | */
4 | package com.bharath.gradle
5 |
6 | import spock.lang.Specification
7 | import org.gradle.testkit.runner.GradleRunner
8 |
9 | /**
10 | * A simple functional test for the 'com.bharath.gradle.greeting' plugin.
11 | */
12 | public class FirstPluginPluginFunctionalTest extends Specification {
13 | def "can run task"() {
14 | given:
15 | def projectDir = new File("build/functionalTest")
16 | projectDir.mkdirs()
17 | new File(projectDir, "settings.gradle") << ""
18 | new File(projectDir, "build.gradle") << """
19 | plugins {
20 | id('com.bharath.gradle.greeting')
21 | }
22 | """
23 |
24 | when:
25 | def runner = GradleRunner.create()
26 | runner.forwardOutput()
27 | runner.withPluginClasspath()
28 | runner.withArguments("greeting")
29 | runner.withProjectDir(projectDir)
30 | def result = runner.build()
31 |
32 | then:
33 | result.output.contains("Hello from plugin 'com.bharath.gradle.greeting'")
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/productservice/src/main/java/com/bharath/springcloud/controllers/ProductRestController.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud.controllers;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.beans.factory.annotation.Value;
5 | import org.springframework.web.bind.annotation.RequestBody;
6 | import org.springframework.web.bind.annotation.RequestMapping;
7 | import org.springframework.web.bind.annotation.RequestMethod;
8 | import org.springframework.web.bind.annotation.RestController;
9 | import org.springframework.web.client.RestTemplate;
10 |
11 | import com.bharath.springcloud.dto.Coupon;
12 | import com.bharath.springcloud.model.Product;
13 | import com.bharath.springcloud.repos.ProductRepo;
14 |
15 | @RestController
16 | @RequestMapping("/productapi")
17 | public class ProductRestController {
18 |
19 | @Autowired
20 | private ProductRepo repo;
21 |
22 | @Autowired
23 | private RestTemplate restTemplate;
24 |
25 | @Value("${couponService.url}")
26 | private String couponServiceURL;
27 |
28 | @RequestMapping(value = "/products", method = RequestMethod.POST)
29 | public Product create(@RequestBody Product product) {
30 | Coupon coupon = restTemplate.getForObject(couponServiceURL + product.getCouponCode(), Coupon.class);
31 | product.setPrice(product.getPrice().subtract(coupon.getDiscount()));
32 | return repo.save(product);
33 |
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/productservice/src/main/java/com/bharath/springcloud/model/Product.java:
--------------------------------------------------------------------------------
1 | package com.bharath.springcloud.model;
2 |
3 | import java.math.BigDecimal;
4 |
5 | import javax.persistence.Entity;
6 | import javax.persistence.GeneratedValue;
7 | import javax.persistence.GenerationType;
8 | import javax.persistence.Id;
9 | import javax.persistence.Transient;
10 |
11 | @Entity
12 | public class Product {
13 |
14 | @Id
15 | @GeneratedValue(strategy = GenerationType.IDENTITY)
16 | private Long id;
17 | private String name;
18 | private String description;
19 | private BigDecimal price;
20 | @Transient
21 | private String couponCode;
22 |
23 | public Long getId() {
24 | return id;
25 | }
26 |
27 | public void setId(Long id) {
28 | this.id = id;
29 | }
30 |
31 | public String getName() {
32 | return name;
33 | }
34 |
35 | public void setName(String name) {
36 | this.name = name;
37 | }
38 |
39 | public String getDescription() {
40 | return description;
41 | }
42 |
43 | public void setDescription(String description) {
44 | this.description = description;
45 | }
46 |
47 | public BigDecimal getPrice() {
48 | return price;
49 | }
50 |
51 | public void setPrice(BigDecimal price) {
52 | this.price = price;
53 | }
54 |
55 | public String getCouponCode() {
56 | return couponCode;
57 | }
58 |
59 | public void setCouponCode(String couponCode) {
60 | this.couponCode = couponCode;
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/couponservice/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | org.springframework.boot
8 | spring-boot-starter-parent
9 | 2.2.6.RELEASE
10 |
11 |
12 | com.bharath.springcloud
13 | couponservice
14 | 0.0.1-SNAPSHOT
15 | couponservice
16 | Coupon Service
17 |
18 |
19 | 1.8
20 | Greenwich.SR3
21 |
22 |
23 |
24 |
25 | org.springframework.boot
26 | spring-boot-starter-data-jpa
27 |
28 |
29 | org.springframework.boot
30 | spring-boot-starter-web
31 |
32 |
33 |
34 | mysql
35 | mysql-connector-java
36 | runtime
37 |
38 |
39 | org.springframework.boot
40 | spring-boot-starter-test
41 | test
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | org.springframework.boot
50 | spring-boot-maven-plugin
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/firstPlugin/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * This file was generated by the Gradle 'init' task.
3 | *
4 | * This generated file contains a sample Gradle plugin project to get you started.
5 | * For more details take a look at the Writing Custom Plugins chapter in the Gradle
6 | * User Manual available at https://docs.gradle.org/6.5.1/userguide/custom_plugins.html
7 | */
8 |
9 | plugins {
10 | // Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins
11 | id 'java-gradle-plugin'
12 |
13 | // Apply the Groovy plugin to add support for Groovy
14 | id 'groovy'
15 | }
16 |
17 | repositories {
18 | // Use jcenter for resolving dependencies.
19 | // You can declare any Maven/Ivy/file repository here.
20 | jcenter()
21 | }
22 |
23 | dependencies {
24 | // Use the awesome Spock testing and specification framework
25 | testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
26 | }
27 |
28 | gradlePlugin {
29 | // Define the plugin
30 | plugins {
31 | greeting {
32 | id = 'com.bharath.gradle.greeting'
33 | implementationClass = 'com.bharath.gradle.FirstPluginPlugin'
34 | }
35 | }
36 | }
37 |
38 | // Add a source set for the functional test suite
39 | sourceSets {
40 | functionalTest {
41 | }
42 | }
43 |
44 | gradlePlugin.testSourceSets(sourceSets.functionalTest)
45 | configurations.functionalTestImplementation.extendsFrom(configurations.testImplementation)
46 |
47 | // Add a task to run the functional tests
48 | tasks.register('functionalTest', Test) {
49 | testClassesDirs = sourceSets.functionalTest.output.classesDirs
50 | classpath = sourceSets.functionalTest.runtimeClasspath
51 | }
52 |
53 | check {
54 | // Run the functional tests as part of `check`
55 | dependsOn(tasks.functionalTest)
56 | }
57 |
--------------------------------------------------------------------------------
/productservice/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | org.springframework.boot
8 | spring-boot-starter-parent
9 | 2.2.6.RELEASE
10 |
11 |
12 | com.bharath.springcloud
13 | productservice
14 | 0.0.1-SNAPSHOT
15 | productservice
16 | Product Service
17 |
18 |
19 | 1.8
20 | Greenwich.SR3
21 |
22 |
23 |
24 |
25 | org.springframework.boot
26 | spring-boot-starter-data-jpa
27 |
28 |
29 | org.springframework.boot
30 | spring-boot-starter-web
31 |
32 |
33 | org.springframework.boot
34 | spring-boot-starter-actuator
35 |
36 |
37 |
38 | mysql
39 | mysql-connector-java
40 | runtime
41 |
42 |
43 | org.springframework.boot
44 | spring-boot-starter-test
45 | test
46 |
47 |
48 | org.springframework.boot
49 | spring-boot-starter
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | org.springframework.boot
58 | spring-boot-maven-plugin
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/couponapp/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/firstWebApp/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/firstJavaProject/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/firstPlugin/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto init
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto init
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :init
68 | @rem Get command-line arguments, handling Windows variants
69 |
70 | if not "%OS%" == "Windows_NT" goto win9xME_args
71 |
72 | :win9xME_args
73 | @rem Slurp the command line arguments.
74 | set CMD_LINE_ARGS=
75 | set _SKIP=2
76 |
77 | :win9xME_args_slurp
78 | if "x%~1" == "x" goto execute
79 |
80 | set CMD_LINE_ARGS=%*
81 |
82 | :execute
83 | @rem Setup the command line
84 |
85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
86 |
87 |
88 | @rem Execute Gradle
89 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
90 |
91 | :end
92 | @rem End local scope for the variables with windows NT shell
93 | if "%ERRORLEVEL%"=="0" goto mainEnd
94 |
95 | :fail
96 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
97 | rem the _cmd.exe /c_ return code!
98 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
99 | exit /b 1
100 |
101 | :mainEnd
102 | if "%OS%"=="Windows_NT" endlocal
103 |
104 | :omega
105 |
--------------------------------------------------------------------------------
/firstproject/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto init
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto init
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :init
68 | @rem Get command-line arguments, handling Windows variants
69 |
70 | if not "%OS%" == "Windows_NT" goto win9xME_args
71 |
72 | :win9xME_args
73 | @rem Slurp the command line arguments.
74 | set CMD_LINE_ARGS=
75 | set _SKIP=2
76 |
77 | :win9xME_args_slurp
78 | if "x%~1" == "x" goto execute
79 |
80 | set CMD_LINE_ARGS=%*
81 |
82 | :execute
83 | @rem Setup the command line
84 |
85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
86 |
87 |
88 | @rem Execute Gradle
89 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
90 |
91 | :end
92 | @rem End local scope for the variables with windows NT shell
93 | if "%ERRORLEVEL%"=="0" goto mainEnd
94 |
95 | :fail
96 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
97 | rem the _cmd.exe /c_ return code!
98 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
99 | exit /b 1
100 |
101 | :mainEnd
102 | if "%OS%"=="Windows_NT" endlocal
103 |
104 | :omega
105 |
--------------------------------------------------------------------------------
/couponservice/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto init
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto init
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :init
68 | @rem Get command-line arguments, handling Windows variants
69 |
70 | if not "%OS%" == "Windows_NT" goto win9xME_args
71 |
72 | :win9xME_args
73 | @rem Slurp the command line arguments.
74 | set CMD_LINE_ARGS=
75 | set _SKIP=2
76 |
77 | :win9xME_args_slurp
78 | if "x%~1" == "x" goto execute
79 |
80 | set CMD_LINE_ARGS=%*
81 |
82 | :execute
83 | @rem Setup the command line
84 |
85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
86 |
87 |
88 | @rem Execute Gradle
89 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
90 |
91 | :end
92 | @rem End local scope for the variables with windows NT shell
93 | if "%ERRORLEVEL%"=="0" goto mainEnd
94 |
95 | :fail
96 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
97 | rem the _cmd.exe /c_ return code!
98 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
99 | exit /b 1
100 |
101 | :mainEnd
102 | if "%OS%"=="Windows_NT" endlocal
103 |
104 | :omega
105 |
--------------------------------------------------------------------------------
/springbootdemo/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto init
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto init
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :init
68 | @rem Get command-line arguments, handling Windows variants
69 |
70 | if not "%OS%" == "Windows_NT" goto win9xME_args
71 |
72 | :win9xME_args
73 | @rem Slurp the command line arguments.
74 | set CMD_LINE_ARGS=
75 | set _SKIP=2
76 |
77 | :win9xME_args_slurp
78 | if "x%~1" == "x" goto execute
79 |
80 | set CMD_LINE_ARGS=%*
81 |
82 | :execute
83 | @rem Setup the command line
84 |
85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
86 |
87 |
88 | @rem Execute Gradle
89 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
90 |
91 | :end
92 | @rem End local scope for the variables with windows NT shell
93 | if "%ERRORLEVEL%"=="0" goto mainEnd
94 |
95 | :fail
96 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
97 | rem the _cmd.exe /c_ return code!
98 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
99 | exit /b 1
100 |
101 | :mainEnd
102 | if "%OS%"=="Windows_NT" endlocal
103 |
104 | :omega
105 |
--------------------------------------------------------------------------------
/couponservice/.mvn/wrapper/MavenWrapperDownloader.java:
--------------------------------------------------------------------------------
1 | /*
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;
27 | import java.util.Properties;
28 |
29 | public class MavenWrapperDownloader {
30 |
31 | /**
32 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
33 | */
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";
36 |
37 | /**
38 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
39 | * use instead of the default one.
40 | */
41 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
42 | ".mvn/wrapper/maven-wrapper.properties";
43 |
44 | /**
45 | * Path where the maven-wrapper.jar will be saved to.
46 | */
47 | private static final String MAVEN_WRAPPER_JAR_PATH =
48 | ".mvn/wrapper/maven-wrapper.jar";
49 |
50 | /**
51 | * Name of the property which should be used to override the default download url for the wrapper.
52 | */
53 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
54 |
55 | public static void main(String args[]) {
56 | System.out.println("- Downloader started");
57 | File baseDirectory = new File(args[0]);
58 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
59 |
60 | // If the maven-wrapper.properties exists, read it and check if it contains a custom
61 | // wrapperUrl parameter.
62 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
63 | String url = DEFAULT_DOWNLOAD_URL;
64 | if(mavenWrapperPropertyFile.exists()) {
65 | FileInputStream mavenWrapperPropertyFileInputStream = null;
66 | try {
67 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
68 | Properties mavenWrapperProperties = new Properties();
69 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
70 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
71 | } catch (IOException e) {
72 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
73 | } finally {
74 | try {
75 | if(mavenWrapperPropertyFileInputStream != null) {
76 | mavenWrapperPropertyFileInputStream.close();
77 | }
78 | } catch (IOException e) {
79 | // Ignore ...
80 | }
81 | }
82 | }
83 | System.out.println("- Downloading from: : " + url);
84 |
85 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
86 | if(!outputFile.getParentFile().exists()) {
87 | if(!outputFile.getParentFile().mkdirs()) {
88 | System.out.println(
89 | "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
90 | }
91 | }
92 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
93 | try {
94 | downloadFileFromURL(url, outputFile);
95 | System.out.println("Done");
96 | System.exit(0);
97 | } catch (Throwable e) {
98 | System.out.println("- Error downloading");
99 | e.printStackTrace();
100 | System.exit(1);
101 | }
102 | }
103 |
104 | private static void downloadFileFromURL(String urlString, File destination) throws Exception {
105 | URL website = new URL(urlString);
106 | ReadableByteChannel rbc;
107 | rbc = Channels.newChannel(website.openStream());
108 | FileOutputStream fos = new FileOutputStream(destination);
109 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
110 | fos.close();
111 | rbc.close();
112 | }
113 |
114 | }
115 |
--------------------------------------------------------------------------------
/productservice/.mvn/wrapper/MavenWrapperDownloader.java:
--------------------------------------------------------------------------------
1 | /*
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;
27 | import java.util.Properties;
28 |
29 | public class MavenWrapperDownloader {
30 |
31 | /**
32 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
33 | */
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";
36 |
37 | /**
38 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
39 | * use instead of the default one.
40 | */
41 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
42 | ".mvn/wrapper/maven-wrapper.properties";
43 |
44 | /**
45 | * Path where the maven-wrapper.jar will be saved to.
46 | */
47 | private static final String MAVEN_WRAPPER_JAR_PATH =
48 | ".mvn/wrapper/maven-wrapper.jar";
49 |
50 | /**
51 | * Name of the property which should be used to override the default download url for the wrapper.
52 | */
53 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
54 |
55 | public static void main(String args[]) {
56 | System.out.println("- Downloader started");
57 | File baseDirectory = new File(args[0]);
58 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
59 |
60 | // If the maven-wrapper.properties exists, read it and check if it contains a custom
61 | // wrapperUrl parameter.
62 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
63 | String url = DEFAULT_DOWNLOAD_URL;
64 | if(mavenWrapperPropertyFile.exists()) {
65 | FileInputStream mavenWrapperPropertyFileInputStream = null;
66 | try {
67 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
68 | Properties mavenWrapperProperties = new Properties();
69 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
70 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
71 | } catch (IOException e) {
72 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
73 | } finally {
74 | try {
75 | if(mavenWrapperPropertyFileInputStream != null) {
76 | mavenWrapperPropertyFileInputStream.close();
77 | }
78 | } catch (IOException e) {
79 | // Ignore ...
80 | }
81 | }
82 | }
83 | System.out.println("- Downloading from: : " + url);
84 |
85 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
86 | if(!outputFile.getParentFile().exists()) {
87 | if(!outputFile.getParentFile().mkdirs()) {
88 | System.out.println(
89 | "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
90 | }
91 | }
92 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
93 | try {
94 | downloadFileFromURL(url, outputFile);
95 | System.out.println("Done");
96 | System.exit(0);
97 | } catch (Throwable e) {
98 | System.out.println("- Error downloading");
99 | e.printStackTrace();
100 | System.exit(1);
101 | }
102 | }
103 |
104 | private static void downloadFileFromURL(String urlString, File destination) throws Exception {
105 | URL website = new URL(urlString);
106 | ReadableByteChannel rbc;
107 | rbc = Channels.newChannel(website.openStream());
108 | FileOutputStream fos = new FileOutputStream(destination);
109 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
110 | fos.close();
111 | rbc.close();
112 | }
113 |
114 | }
115 |
--------------------------------------------------------------------------------
/couponapp/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # 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, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/couponservice/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # 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, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/firstPlugin/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # 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, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/firstproject/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # 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, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/springbootdemo/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # 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, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/firstWebApp/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # 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, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84 |
85 | APP_NAME="Gradle"
86 | APP_BASE_NAME=${0##*/}
87 |
88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 |
91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
92 | MAX_FD=maximum
93 |
94 | warn () {
95 | echo "$*"
96 | } >&2
97 |
98 | die () {
99 | echo
100 | echo "$*"
101 | echo
102 | exit 1
103 | } >&2
104 |
105 | # OS specific support (must be 'true' or 'false').
106 | cygwin=false
107 | msys=false
108 | darwin=false
109 | nonstop=false
110 | case "$( uname )" in #(
111 | CYGWIN* ) cygwin=true ;; #(
112 | Darwin* ) darwin=true ;; #(
113 | MSYS* | MINGW* ) msys=true ;; #(
114 | NONSTOP* ) nonstop=true ;;
115 | esac
116 |
117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118 |
119 |
120 | # Determine the Java command to use to start the JVM.
121 | if [ -n "$JAVA_HOME" ] ; then
122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123 | # IBM's JDK on AIX uses strange locations for the executables
124 | JAVACMD=$JAVA_HOME/jre/sh/java
125 | else
126 | JAVACMD=$JAVA_HOME/bin/java
127 | fi
128 | if [ ! -x "$JAVACMD" ] ; then
129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130 |
131 | Please set the JAVA_HOME variable in your environment to match the
132 | location of your Java installation."
133 | fi
134 | else
135 | JAVACMD=java
136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 |
142 | # Increase the maximum file descriptors if we can.
143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 | case $MAX_FD in #(
145 | max*)
146 | MAX_FD=$( ulimit -H -n ) ||
147 | warn "Could not query maximum file descriptor limit"
148 | esac
149 | case $MAX_FD in #(
150 | '' | soft) :;; #(
151 | *)
152 | ulimit -n "$MAX_FD" ||
153 | warn "Could not set maximum file descriptor limit to $MAX_FD"
154 | esac
155 | fi
156 |
157 | # Collect all arguments for the java command, stacking in reverse order:
158 | # * args from the command line
159 | # * the main class name
160 | # * -classpath
161 | # * -D...appname settings
162 | # * --module-path (only if needed)
163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164 |
165 | # For Cygwin or MSYS, switch paths to Windows format before running java
166 | if "$cygwin" || "$msys" ; then
167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169 |
170 | JAVACMD=$( cygpath --unix "$JAVACMD" )
171 |
172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
173 | for arg do
174 | if
175 | case $arg in #(
176 | -*) false ;; # don't mess with options #(
177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178 | [ -e "$t" ] ;; #(
179 | *) false ;;
180 | esac
181 | then
182 | arg=$( cygpath --path --ignore --mixed "$arg" )
183 | fi
184 | # Roll the args list around exactly as many times as the number of
185 | # args, so each arg winds up back in the position where it started, but
186 | # possibly modified.
187 | #
188 | # NB: a `for` loop captures its iteration list before it begins, so
189 | # changing the positional parameters here affects neither the number of
190 | # iterations, nor the values presented in `arg`.
191 | shift # remove old arg
192 | set -- "$@" "$arg" # push replacement arg
193 | done
194 | fi
195 |
196 | # Collect all arguments for the java command;
197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198 | # shell script including quotes and variable substitutions, so put them in
199 | # double quotes to make sure that they get re-expanded; and
200 | # * put everything else in single quotes, so that it's not re-expanded.
201 |
202 | set -- \
203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
204 | -classpath "$CLASSPATH" \
205 | org.gradle.wrapper.GradleWrapperMain \
206 | "$@"
207 |
208 | # Use "xargs" to parse quoted args.
209 | #
210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211 | #
212 | # In Bash we could simply go:
213 | #
214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215 | # set -- "${ARGS[@]}" "$@"
216 | #
217 | # but POSIX shell has neither arrays nor command substitution, so instead we
218 | # post-process each arg (as a line of input to sed) to backslash-escape any
219 | # character that might be a shell metacharacter, then use eval to reverse
220 | # that process (while maintaining the separation between arguments), and wrap
221 | # the whole thing up as a single "set" statement.
222 | #
223 | # This will of course break if any of these variables contains a newline or
224 | # an unmatched quote.
225 | #
226 |
227 | eval "set -- $(
228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229 | xargs -n1 |
230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231 | tr '\n' ' '
232 | )" '"$@"'
233 |
234 | exec "$JAVACMD" "$@"
235 |
--------------------------------------------------------------------------------
/firstJavaProject/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # 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, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84 |
85 | APP_NAME="Gradle"
86 | APP_BASE_NAME=${0##*/}
87 |
88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 |
91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
92 | MAX_FD=maximum
93 |
94 | warn () {
95 | echo "$*"
96 | } >&2
97 |
98 | die () {
99 | echo
100 | echo "$*"
101 | echo
102 | exit 1
103 | } >&2
104 |
105 | # OS specific support (must be 'true' or 'false').
106 | cygwin=false
107 | msys=false
108 | darwin=false
109 | nonstop=false
110 | case "$( uname )" in #(
111 | CYGWIN* ) cygwin=true ;; #(
112 | Darwin* ) darwin=true ;; #(
113 | MSYS* | MINGW* ) msys=true ;; #(
114 | NONSTOP* ) nonstop=true ;;
115 | esac
116 |
117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118 |
119 |
120 | # Determine the Java command to use to start the JVM.
121 | if [ -n "$JAVA_HOME" ] ; then
122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123 | # IBM's JDK on AIX uses strange locations for the executables
124 | JAVACMD=$JAVA_HOME/jre/sh/java
125 | else
126 | JAVACMD=$JAVA_HOME/bin/java
127 | fi
128 | if [ ! -x "$JAVACMD" ] ; then
129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130 |
131 | Please set the JAVA_HOME variable in your environment to match the
132 | location of your Java installation."
133 | fi
134 | else
135 | JAVACMD=java
136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 |
142 | # Increase the maximum file descriptors if we can.
143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 | case $MAX_FD in #(
145 | max*)
146 | MAX_FD=$( ulimit -H -n ) ||
147 | warn "Could not query maximum file descriptor limit"
148 | esac
149 | case $MAX_FD in #(
150 | '' | soft) :;; #(
151 | *)
152 | ulimit -n "$MAX_FD" ||
153 | warn "Could not set maximum file descriptor limit to $MAX_FD"
154 | esac
155 | fi
156 |
157 | # Collect all arguments for the java command, stacking in reverse order:
158 | # * args from the command line
159 | # * the main class name
160 | # * -classpath
161 | # * -D...appname settings
162 | # * --module-path (only if needed)
163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164 |
165 | # For Cygwin or MSYS, switch paths to Windows format before running java
166 | if "$cygwin" || "$msys" ; then
167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169 |
170 | JAVACMD=$( cygpath --unix "$JAVACMD" )
171 |
172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
173 | for arg do
174 | if
175 | case $arg in #(
176 | -*) false ;; # don't mess with options #(
177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178 | [ -e "$t" ] ;; #(
179 | *) false ;;
180 | esac
181 | then
182 | arg=$( cygpath --path --ignore --mixed "$arg" )
183 | fi
184 | # Roll the args list around exactly as many times as the number of
185 | # args, so each arg winds up back in the position where it started, but
186 | # possibly modified.
187 | #
188 | # NB: a `for` loop captures its iteration list before it begins, so
189 | # changing the positional parameters here affects neither the number of
190 | # iterations, nor the values presented in `arg`.
191 | shift # remove old arg
192 | set -- "$@" "$arg" # push replacement arg
193 | done
194 | fi
195 |
196 | # Collect all arguments for the java command;
197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198 | # shell script including quotes and variable substitutions, so put them in
199 | # double quotes to make sure that they get re-expanded; and
200 | # * put everything else in single quotes, so that it's not re-expanded.
201 |
202 | set -- \
203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
204 | -classpath "$CLASSPATH" \
205 | org.gradle.wrapper.GradleWrapperMain \
206 | "$@"
207 |
208 | # Use "xargs" to parse quoted args.
209 | #
210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211 | #
212 | # In Bash we could simply go:
213 | #
214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215 | # set -- "${ARGS[@]}" "$@"
216 | #
217 | # but POSIX shell has neither arrays nor command substitution, so instead we
218 | # post-process each arg (as a line of input to sed) to backslash-escape any
219 | # character that might be a shell metacharacter, then use eval to reverse
220 | # that process (while maintaining the separation between arguments), and wrap
221 | # the whole thing up as a single "set" statement.
222 | #
223 | # This will of course break if any of these variables contains a newline or
224 | # an unmatched quote.
225 | #
226 |
227 | eval "set -- $(
228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229 | xargs -n1 |
230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231 | tr '\n' ' '
232 | )" '"$@"'
233 |
234 | exec "$JAVACMD" "$@"
235 |
--------------------------------------------------------------------------------