Skip to content

Commit 4ce1e1b

Browse files
Merge pull request #4 from contentstack/compileJava
Execution failed for task ':compileJava'.
2 parents f53414e + ced5220 commit 4ce1e1b

File tree

7 files changed

+261
-281
lines changed

7 files changed

+261
-281
lines changed

pom.xml

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45

56
<groupId>com.contentstack.sdk</groupId>
67
<artifactId>utils</artifactId>
7-
<version>1.1.1-SNAPSHOT</version>
8+
<version>{$utils.version}</version>
89
<packaging>jar</packaging>
910
<name>Contentstack-utils</name>
10-
<description>Java Utils SDK for Contentstack Content Delivery API, Contentstack is a headless CMS with an API-first approach</description>
11+
<description>Java Utils SDK for Contentstack Content Delivery API, Contentstack is a headless CMS with an API-first
12+
approach
13+
</description>
1114
<url>https://www.***REMOVED***</url>
1215

1316
<properties>
14-
<util.version>1.1.1-SNAPSHOT</util.version>
17+
<util.version>1.1.2-SNAPSHOT</util.version>
1518
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1619
<project.reporting.sourceEncoding>UTF-8</project.reporting.sourceEncoding>
1720
<maven.compiler.source>1.8</maven.compiler.source>
1821
<maven.compiler.target>1.8</maven.compiler.target>
19-
<java.version>1.8</java.version>
2022
<build-helper.version>3.0.0</build-helper.version>
2123
<surefire-report-plugin.version>2.22.0</surefire-report-plugin.version>
2224
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
2325
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
24-
<kotlin-test-junit.version>1.6.21</kotlin-test-junit.version>
2526
<junit.version>4.13.2</junit.version>
2627
<jsoup.version>1.14.3</jsoup.version>
2728
<json.simple.version>1.1.1</json.simple.version>
@@ -83,16 +84,9 @@
8384
<scope>test</scope>
8485
</dependency>
8586
<dependency>
86-
<groupId>org.jetbrains.kotlin</groupId>
87-
<artifactId>kotlin-stdlib-jdk8</artifactId>
88-
<version>${kotlin-test-junit.version}</version>
89-
<scope>compile</scope>
90-
</dependency>
91-
<dependency>
92-
<groupId>org.jetbrains.kotlin</groupId>
93-
<artifactId>kotlin-test-junit</artifactId>
94-
<version>${kotlin-test-junit.version}</version>
95-
<scope>test</scope>
87+
<groupId>javax.validation</groupId>
88+
<artifactId>validation-api</artifactId>
89+
<version>2.0.1.Final</version>
9690
</dependency>
9791
<dependency>
9892
<groupId>org.jsoup</groupId>
@@ -119,7 +113,6 @@
119113
<scope>compile</scope>
120114
</dependency>
121115
</dependencies>
122-
123116
<build>
124117
<plugins>
125118
<plugin>
@@ -141,17 +134,6 @@
141134
</execution>
142135
</executions>
143136
</plugin>
144-
145-
<plugin>
146-
<groupId>org.apache.maven.plugins</groupId>
147-
<artifactId>maven-compiler-plugin</artifactId>
148-
<version>3.8.1</version>
149-
</plugin>
150-
<!--
151-
mvn test
152-
mvn surefire-report:report-only
153-
mvn surefire-report:report site -DgenerateReports=false
154-
-->
155137
<plugin>
156138
<groupId>org.apache.maven.plugins</groupId>
157139
<artifactId>maven-surefire-report-plugin</artifactId>
@@ -165,7 +147,6 @@
165147
</execution>
166148
</executions>
167149
</plugin>
168-
169150
<plugin>
170151
<groupId>org.apache.maven.plugins</groupId>
171152
<artifactId>maven-source-plugin</artifactId>
@@ -179,7 +160,6 @@
179160
</execution>
180161
</executions>
181162
</plugin>
182-
183163
<plugin>
184164
<groupId>org.apache.maven.plugins</groupId>
185165
<artifactId>maven-javadoc-plugin</artifactId>
@@ -204,13 +184,11 @@
204184
</execution>
205185
</executions>
206186
</plugin>
207-
208187
<plugin>
209188
<groupId>org.apache.maven.plugins</groupId>
210189
<artifactId>maven-site-plugin</artifactId>
211190
<version>${maven-site-plugin.version}</version>
212191
</plugin>
213-
214192
<plugin>
215193
<groupId>org.apache.maven.plugins</groupId>
216194
<artifactId>maven-gpg-plugin</artifactId>
@@ -225,7 +203,6 @@
225203
</execution>
226204
</executions>
227205
</plugin>
228-
229206
<plugin>
230207
<groupId>org.sonatype.plugins</groupId>
231208
<artifactId>nexus-staging-maven-plugin</artifactId>
@@ -237,7 +214,6 @@
237214
<autoReleaseAfterClose>true</autoReleaseAfterClose>
238215
</configuration>
239216
</plugin>
240-
241217
<plugin>
242218
<groupId>org.apache.maven.plugins</groupId>
243219
<artifactId>maven-release-plugin</artifactId>
@@ -249,22 +225,6 @@
249225
<goals>deploy</goals>
250226
</configuration>
251227
</plugin>
252-
<plugin>
253-
<groupId>org.jetbrains.kotlin</groupId>
254-
<artifactId>kotlin-maven-plugin</artifactId>
255-
<version>${kotlin-test-junit.version}</version>
256-
<executions>
257-
<execution>
258-
<?m2e execute onConfiguration,onIncremental?>
259-
<id>compile</id>
260-
<phase>process-sources</phase>
261-
<goals>
262-
<goal>compile</goal>
263-
</goals>
264-
</execution>
265-
</executions>
266-
</plugin>
267-
268228
</plugins>
269229
</build>
270230

src/main/java/com/contentstack/utils/AutomateCommon.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import com.contentstack.utils.interfaces.Option;
88
import com.contentstack.utils.node.NodeToHTML;
99
import com.contentstack.utils.render.DefaultOption;
10-
import org.jetbrains.annotations.NotNull;
10+
import javax.validation.constraints.NotNull;
1111
import org.json.JSONArray;
1212
import org.json.JSONObject;
1313
import org.jsoup.nodes.Attributes;

src/main/java/com/contentstack/utils/GQL.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import com.contentstack.utils.interfaces.ContentCallback;
44
import com.contentstack.utils.interfaces.MetaToEmbedCallback;
55
import com.contentstack.utils.render.DefaultOption;
6-
import org.jetbrains.annotations.NotNull;
76
import org.json.JSONArray;
87
import org.json.JSONObject;
98

9+
import javax.validation.constraints.NotNull;
1010
import java.util.Optional;
1111
import java.util.stream.StreamSupport;
1212

@@ -22,9 +22,12 @@ public class GQL {
2222
/**
2323
* Json to html.
2424
*
25-
* @param gqlEntry the gql entry is entry @{@link JSONObject}
26-
* @param path the path is array of @{@link String}
27-
* @param renderOption the render option is instance of @{@link DefaultOption}
25+
* @param gqlEntry
26+
* the gql entry is entry @{@link JSONObject}
27+
* @param path
28+
* the path is array of @{@link String}
29+
* @param renderOption
30+
* the render option is instance of @{@link DefaultOption}
2831
*/
2932
public static void jsonToHTML(@NotNull JSONObject gqlEntry, @NotNull String[] path, @NotNull DefaultOption renderOption) {
3033

src/main/java/com/contentstack/utils/Utils.java

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
import com.contentstack.utils.interfaces.ContentCallback;
55
import com.contentstack.utils.interfaces.MetaToEmbedCallback;
66
import com.contentstack.utils.interfaces.Option;
7-
import org.jetbrains.annotations.NotNull;
87
import org.json.JSONArray;
98
import org.json.JSONObject;
109
import org.jsoup.Jsoup;
1110
import org.jsoup.nodes.Document;
1211

12+
import javax.validation.constraints.NotNull;
1313
import java.util.ArrayList;
1414
import java.util.Optional;
1515
import java.util.Set;
@@ -20,20 +20,23 @@
2020

2121

2222
/**
23-
* The Utils Class enables few functions like render, renderContent,
24-
* jsonToHtml, RTE and SRTE to process the entry data and converts in html format.
23+
* The Utils Class enables few functions like render, renderContent, jsonToHtml, RTE and SRTE to process the entry data
24+
* and converts in html format.
2525
*/
2626
public class Utils {
2727

2828

29-
final private static Logger logger = Logger.getLogger(Utils.class.getName());
29+
static final Logger logger = Logger.getLogger(Utils.class.getName());
3030

3131
/**
3232
* Render.
3333
*
34-
* @param entryObj the entry obj
35-
* @param pathString the key path
36-
* @param renderObject the render object
34+
* @param entryObj
35+
* the entry obj
36+
* @param pathString
37+
* the key path
38+
* @param renderObject
39+
* the render object
3740
*/
3841
public static void render(JSONObject entryObj, String[] pathString, Option renderObject) {
3942

@@ -50,7 +53,7 @@ public static void render(JSONObject entryObj, String[] pathString, Option rende
5053

5154
if (entryObj != null && entryObj.has("_embedded_items")) {
5255
// when pathString is provided by user
53-
if (pathString != null && pathString.length>0) {
56+
if (pathString != null && pathString.length > 0) {
5457
for (String path : pathString) {
5558
findContent(entryObj, path, callback);
5659
}
@@ -69,9 +72,12 @@ public static void render(JSONObject entryObj, String[] pathString, Option rende
6972
/**
7073
* Render content string.
7174
*
72-
* @param rteStringify the rte stringify
73-
* @param embedObject the embed object
74-
* @param option the option
75+
* @param rteStringify
76+
* the rte stringify
77+
* @param embedObject
78+
* the embed object
79+
* @param option
80+
* the option
7581
* @return the string
7682
*/
7783
public static String renderContent(String rteStringify, JSONObject embedObject, Option option) {
@@ -120,9 +126,12 @@ private static Optional<JSONObject> findEmbeddedItems(JSONObject jsonObject, Met
120126
/**
121127
* Json to html.
122128
*
123-
* @param entryArray the entry array
124-
* @param keyPath the key path
125-
* @param option the render option
129+
* @param entryArray
130+
* the entry array
131+
* @param keyPath
132+
* the key path
133+
* @param option
134+
* the render option
126135
*/
127136
public static void jsonToHTML(@NotNull JSONArray entryArray, @NotNull String[] keyPath, @NotNull Option option) {
128137
entryArray.forEach(jsonObj -> jsonToHTML((JSONObject) jsonObj, keyPath, option));
@@ -132,9 +141,12 @@ public static void jsonToHTML(@NotNull JSONArray entryArray, @NotNull String[] k
132141
/**
133142
* Json to html.
134143
*
135-
* @param entry the entry
136-
* @param keyPath the key path
137-
* @param renderOption the render object
144+
* @param entry
145+
* the entry
146+
* @param keyPath
147+
* the key path
148+
* @param renderOption
149+
* the render object
138150
*/
139151
public static void jsonToHTML(@NotNull JSONObject entry, @NotNull String[] keyPath, Option renderOption) {
140152

@@ -162,6 +174,7 @@ public static void jsonToHTML(@NotNull JSONObject entry, @NotNull String[] keyPa
162174

163175
if (keyPath.length > 0) {
164176
for (String path : keyPath) {
177+
logger.info(path);
165178
findContent(entry, path, callback);
166179
}
167180
}
@@ -171,9 +184,12 @@ public static void jsonToHTML(@NotNull JSONObject entry, @NotNull String[] keyPa
171184
/**
172185
* Render.
173186
*
174-
* @param jsonArray the json array
175-
* @param keyPath the key path
176-
* @param renderObject the render object
187+
* @param jsonArray
188+
* the json array
189+
* @param keyPath
190+
* the key path
191+
* @param renderObject
192+
* the render object
177193
*/
178194
public void render(@NotNull JSONArray jsonArray, @NotNull String[] keyPath, @NotNull Option renderObject) {
179195
jsonArray.forEach(jsonObj -> render((JSONObject) jsonObj, keyPath, renderObject));

0 commit comments

Comments
 (0)