-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Support For Thin Jars in GAE (#10420)
* add support for thin jar in gae Only adds to maven build; work in progress * correcting mistake introduced in a pervious pull request A previous pull request incorrectly removes the com.google.cloud.tools when gaeCloudSQLInstanceNeeded is set to false #10362 * add correct handlers for retrieving static files * remove bootWar from gradle The new GAE with Java 11 builds on JAR; this has been done on the maven side. * correcting mistake introduced in a pervious pull request A previous pull request incorrectly removes the com.google.cloud.tools when gaeCloudSQLInstanceNeeded is set to false * replace deprecated value "project" by "projectId" * testing with cloudsql; change string to single quotes If this is not done the following error is created; yntaxError: Multi-line double-quoted string needs to be sufficiently indented (16:14) 14 | datasource: 15 | type: com.zaxxer.hikari.HikariDataSource > 16 | url: "jdbc:mysql://google/mysql?cloudSqlInstance=abstract-block-253023:us-central1:testjhipster | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Add copyright information * add mainclass name instead of basename * add gradle support for unjaring the original jar This adds Gradle side support for thin jars * missing symbol from previous commit * remove the original jar as per discussion * minor bug fix per code review * add max heap size to entrypoint field in app.yaml * Revert Xmx change * correction of the url strings * remove whitespaces in project ID * simplify the prod-gae profile definition * thin jar generation support for maven * thin jar generation support for gradle * adjustments to the maven and gradle deployment commands * add thinResolve step before staging * prettier issue fix * add error code checking for gcloud - gcloud seems to print out info messages to the error stream as well. We need to check whether it's an actual error * add trim to remove unnecessary newline and remove silent mode for prompt in order to trigger cloud sql api * fix the trim line more elegantly * add missing maven dependency * refactor code to include application-prod-gae.yml file regardless of Cloud SQL - this makes sure the correct port environment variable is passed whether the user chose to use cloud sql or not. * fix dependency problem (similar to #9175) to get rid of the clean option * add dependency before the check for cloud sql * changed per code review
- Loading branch information
1 parent
08f36bb
commit 7d21a02
Showing
8 changed files
with
209 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<%# | ||
Copyright 2013-2019 the original author or authors from the JHipster project. | ||
This file is part of the JHipster project, see https://www.jhipster.tech/ | ||
for more information. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
-%> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-undertow</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<dependencies> | ||
<!-- package as a thin jar --> | ||
<dependency> | ||
<groupId>org.springframework.boot.experimental</groupId> | ||
<artifactId>spring-boot-thin-layout</artifactId> | ||
<version>1.0.23.RELEASE</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.springframework.boot.experimental</groupId> | ||
<artifactId>spring-boot-thin-maven-plugin</artifactId> | ||
<version>1.0.23.RELEASE</version> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/appengine-staging</outputDirectory> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>resolve</id> | ||
<goals> | ||
<goal>resolve</goal> | ||
</goals> | ||
<inherited>false</inherited> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>pl.project13.maven</groupId> | ||
<artifactId>git-commit-id-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
<%# | ||
Copyright 2013-2019 the original author or authors from the JHipster project. | ||
This file is part of the JHipster project, see https://www.jhipster.tech/ | ||
for more information. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
-%> | ||
<configuration> | ||
<deploy.project><%=gcpProjectId%></deploy.project> | ||
<deploy.projectId><%=gcpProjectId%></deploy.projectId> | ||
<deploy.version>1</deploy.version> | ||
</configuration> |
Oops, something went wrong.