-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add rest-builder (rb) template
- Loading branch information
Showing
15 changed files
with
709 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.gradle/ | ||
build/ | ||
target/ |
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,5 @@ | ||
subprojects { | ||
configurations.all { | ||
resolutionStrategy.force 'com.liferay:com.liferay.portal.vulcan.api:7.13.0' | ||
} | ||
} |
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,5 @@ | ||
subprojects { | ||
configurations.all { | ||
resolutionStrategy.force 'com.liferay:com.liferay.portal.vulcan.api:7.13.0' | ||
} | ||
} |
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,69 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>{{.WorkspacePackage}}</groupId> | ||
<artifactId>{{.WorkspaceName}}-modules</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<groupId>{{.Package}}</groupId> | ||
<artifactId>{{.Name}}</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<name>{{.WorkspaceCamelCaseName}} :: Modules :: {{.CamelCaseName}}</name> | ||
<packaging>pom</packaging> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.1</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.1.2</version> | ||
<configuration> | ||
<archive> | ||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-maven-plugin</artifactId> | ||
<version>5.2.0</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>bnd-process</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<dependencies> | ||
<dependency> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>biz.aQute.bndlib</artifactId> | ||
<version>5.2.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>com.liferay.ant.bnd</artifactId> | ||
<version>3.2.6</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<modules> | ||
<module>{{.Name}}-api</module> | ||
<module>{{.Name}}-impl</module> | ||
</modules> | ||
</project> |
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,6 @@ | ||
Bundle-Name: {{.CamelCaseName}} API | ||
Bundle-SymbolicName: {{.Package}}.api | ||
Bundle-Version: 1.0.0 | ||
Export-Package:\ | ||
{{.Package}}.dto.v1_0,\ | ||
{{.Package}}.resource.v1_0 |
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,14 @@ | ||
dependencies { | ||
compileOnly group: "com.fasterxml.jackson.core", name: "jackson-annotations", version: "2.10.3" | ||
compileOnly group: "com.liferay", name: "com.liferay.petra.function" | ||
compileOnly group: "com.liferay", name: "com.liferay.petra.string" | ||
compileOnly group: "com.liferay", name: "com.liferay.portal.vulcan.api", version: "7.13.0" | ||
compileOnly group: "com.liferay", name: "javax.xml.bind" | ||
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel" | ||
compileOnly group: "io.swagger.core.v3", name: "swagger-annotations", version: "2.0.5" | ||
compileOnly group: "javax.annotation", name: "javax.annotation-api", version: "1.3.2" | ||
compileOnly group: "javax.validation", name: "validation-api", version: "2.0.1.Final" | ||
compileOnly group: "javax.ws.rs", name: "javax.ws.rs-api" | ||
compileOnly group: "org.apache.felix", name: "org.apache.felix.http.servlet-api", version: "1.1.2" | ||
compileOnly group: "org.osgi", name: "org.osgi.annotation.versioning" | ||
} |
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,87 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>{{.Package}}</groupId> | ||
<artifactId>{{.Name}}</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<groupId>{{.Package}}</groupId> | ||
<artifactId>{{.Name}}-api</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<name>{{.WorkspaceCamelCaseName}} :: Modules :: {{.CamelCaseName}} :: {{.CamelCaseName}} API</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
<version>2.10.3</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>com.liferay.petra.function</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>com.liferay.petra.string</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>com.liferay.portal.vulcan.api</artifactId> | ||
<version>7.13.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>javax.xml.bind</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay.portal</groupId> | ||
<artifactId>com.liferay.portal.kernel</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.swagger.core.v3</groupId> | ||
<artifactId>swagger-annotations</artifactId> | ||
<version>2.0.5</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.annotation</groupId> | ||
<artifactId>javax.annotation-api</artifactId> | ||
<version>1.3.2</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.validation</groupId> | ||
<artifactId>validation-api</artifactId> | ||
<version>2.0.1.Final</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.ws.rs</groupId> | ||
<artifactId>javax.ws.rs-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>org.apache.felix.http.servlet-api</artifactId> | ||
<version>1.1.2</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>org.osgi.annotation.versioning</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
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,3 @@ | ||
Bundle-Name: {{.CamelCaseName}} Impl | ||
Bundle-SymbolicName: {{.Package}}.impl | ||
Bundle-Version: 1.0.0 |
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,25 @@ | ||
dependencies { | ||
compile project(":modules:{{.Name}}:{{.Name}}-api") | ||
|
||
compileOnly group: "com.fasterxml.jackson.core", name: "jackson-annotations", version: "2.10.3" | ||
compileOnly group: "com.liferay", name: "com.liferay.petra.function" | ||
compileOnly group: "com.liferay", name: "com.liferay.petra.string" | ||
compileOnly group: "com.liferay", name: "com.liferay.portal.odata.api" | ||
compileOnly group: "com.liferay", name: "com.liferay.portal.vulcan.api", version: "7.13.0" | ||
compileOnly group: "com.liferay", name: "javax.xml.bind" | ||
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl" | ||
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel" | ||
compileOnly group: "commons-collections", name: "commons-collections" | ||
compileOnly group: "io.swagger.core.v3", name: "swagger-annotations", version: "2.0.5" | ||
compileOnly group: "javax.annotation", name: "javax.annotation-api", version: "1.3.2" | ||
compileOnly group: "javax.validation", name: "validation-api", version: "2.0.1.Final" | ||
compileOnly group: "javax.ws.rs", name: "javax.ws.rs-api" | ||
compileOnly group: "org.apache.felix", name: "org.apache.felix.http.servlet-api", version: "1.1.2" | ||
compileOnly group: "org.osgi", name: "org.osgi.service.component", version: "1.3.0" | ||
compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations" | ||
compileOnly group: "org.osgi", name: "org.osgi.core" | ||
|
||
restBuilder group: "com.liferay", name: "com.liferay.portal.tools.rest.builder", version: "1.0.167" | ||
} | ||
|
||
group = "{{.Name}}" |
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,126 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>{{.Package}}</groupId> | ||
<artifactId>{{.Name}}</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<groupId>{{.Package}}</groupId> | ||
<artifactId>{{.Name}}-service</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<name>{{.WorkspaceCamelCaseName}} :: Modules :: {{.CamelCaseName}} :: {{.CamelCaseName}} Service</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
<version>2.10.3</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>com.liferay.petra.function</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>com.liferay.petra.string</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>com.liferay.portal.odata.api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>com.liferay.portal.vulcan.api</artifactId> | ||
<version>7.13.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>javax.xml.bind</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay.portal</groupId> | ||
<artifactId>com.liferay.portal.impl</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.liferay.portal</groupId> | ||
<artifactId>com.liferay.portal.kernel</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-collections</groupId> | ||
<artifactId>commons-collections</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.swagger.core.v3</groupId> | ||
<artifactId>swagger-annotations</artifactId> | ||
<version>2.0.5</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.annotation</groupId> | ||
<artifactId>javax.annotation-api</artifactId> | ||
<version>1.3.2</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.validation</groupId> | ||
<artifactId>validation-api</artifactId> | ||
<version>2.0.1.Final</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.ws.rs</groupId> | ||
<artifactId>javax.ws.rs-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>org.apache.felix.http.servlet-api</artifactId> | ||
<version>1.1.2</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>org.osgi.service.component</artifactId> | ||
<version>1.3.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>org.osgi.service.component.annotations</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>org.osgi.core</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>{{.Package}}</groupId> | ||
<artifactId>{{.Name}}-api</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.liferay</groupId> | ||
<artifactId>com.liferay.portal.tools.rest.builder</artifactId> | ||
<version>1.0.167</version> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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,9 @@ | ||
apiDir: "../{{.Name}}-api/src/main/java" | ||
apiPackagePath: "{{.Package}}" | ||
application: | ||
baseURI: "/{{.Name}}" | ||
className: "{{.CamelCaseName}}Application" | ||
name: "{{.CamelCaseName}}" | ||
author: "{{.User}}" | ||
clientDir: "../{{.Name}}-client/src/main/java" | ||
testDir: "../{{.Name}}-test/src/testIntegration/java" |
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,8 @@ | ||
info: | ||
description: "{{.CamelCaseName}} REST API" | ||
license: | ||
name: "Apache 2.0" | ||
url: "http://www.apache.org/licenses/LICENSE-2.0.html" | ||
title: "{{.CamelCaseName}}" | ||
version: v1.0 | ||
openapi: 3.0.1 |
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
Oops, something went wrong.