diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 5de62b4f..885100c1 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -13,18 +13,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file - - name: Build with Maven - run: mvn -B package --file pom.xml + - name: Build with Maven + run: mvn -B package --file pom.xml - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml - env: - GITHUB_TOKEN: ${{ github.token }} + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index c8aeb3a2..71e70c75 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -5,9 +5,9 @@ name: Java CI with Maven on: push: - branches: [ master ] + branches: [ master, include_fallback ] pull_request: - branches: [ master ] + branches: [ master, include_fallback ] jobs: build: @@ -15,10 +15,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Build with Maven - run: mvn -B package --file pom.xml + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Maven + run: mvn -B package --file pom.xml diff --git a/.gitignore b/.gitignore index 296896a1..cc91a811 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +1,260 @@ -# Package Files # -#*.jar -*.ear +### Code-Java ### +# Language Support for Java(TM) by Red Hat extension for Visual Studio Code - https://marketplace.visualstudio.com/items?itemName=redhat.java -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* -!/src/main/java/Test.java +.project +.classpath +factoryConfiguration.json -# OS generated files # -.DS_Store -.DS_Store? +### Eclipse ### +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ +.apt_generated_test/ +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet -# Compiled source files # -*.iml -/target/ -/out/ -/profiles.xml/ -*.class +# Uncomment this line if you wish to ignore the project description file. +# Typically, this file would be tracked if it contains build/dependency configurations: +#.project + +### Eclipse Patch ### +# Spring Boot Tooling +.sts4-cache/ + +### Intellij ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +### Java-Web ### +## ignoring target file +target/ + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Maven ### +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +# https://github.com/takari/maven-wrapper#usage-without-binary-jar +.mvn/wrapper/maven-wrapper.jar + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history + +### Gradle ### +.gradle build/ -.idea/ -*.log -CSLoggerLevel/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +### Gradle Patch ### +**/build/ + +# End of https://www.toptal.com/developers/gitignore/api/macos,code-java,java-web,maven,gradle,intellij,visualstudiocode,eclipse +.idea/compiler.xml +.idea/encodings.xml +.idea/jarRepositories.xml +.idea/misc.xml +.idea/modules.xml +.idea/vcs.xml +java.iml +src/main/resources/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 33af01a4..ba52c75f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,83 +1,93 @@ ## CHANGELOG +------------------------------------------------ + +## Version 1.5.4 +###### Date: 08-DEC-2020 +Publish content fallback +New Features: +• [Entry] - Publish fallback method added +• [Query] - Publish fallback method added +• [Asset] - Publish fallback method added, includeDimension method added +• [Assets] - Publish fallback method added ------------------------------------------------ ## Version 1.5.3 ###### Date: 28-July-2020 - - [Build Issue] : Build update issue fixed + - **Build Issue** Build update issue fixed ------------------------------------------------ ## Version 1.5.2 ###### Date: 23-July-2020 - - [Bump Issue] : Bump Issue: log4j-core from 2.5 to 2.13.2 - - [Query] : Query.locale() documentation - - [ CSHttpConnection ] : StandardCharsets.UTF_8 Support Added + - **Bump Issue** : Bump Issue: log4j-core from 2.5 to 2.13.2 + - **Query** : Query.locale() documentation + - **CSHttpConnection** : StandardCharsets.UTF_8 Support Added ------------------------------------------------ ## Version 1.5.1 ###### Date: 13-Jan-2020 - - [ dependency vulnerability ] : Java Github reported vulnerable issue on dependency logj + - **Dependency Vulnerability** Java Github reported vulnerable issue on dependency logj ------------------------------------------------ ## Version 1.5.0 ###### Date: 15-Nov-2019 - - [Stack]: Added support for function getContentType() - - [ContentType]: updated function fetch() - - [Query]: Updated support of whereIn(String KEY, Query queryObject) - - [Query]: Updated support of whereNotIn(String KEY, Query queryObject) + - **Stack**: Added support for function getContentType() + - **ContentType**: updated function fetch() + - **Query**: Updated support of whereIn(String KEY, Query queryObject) + - **Query**: Updated support of whereNotIn(String KEY, Query queryObject) ------------------------------------------------ ## Version 1.4.2 ###### Date: 03-Sept-2019 - - [Config] - Added support for Region in Config. + - **Config** - Added support for Region in Config. ------------------------------------------------ ## Version 1.4.1 ###### Date: 21-August-2019 - - [Query] - Added support for whereIn(String key) and whereNotIn(String key) methods - - [CSAppConstants] - Removed google internet connection check from CSAppConstants + - **Query** - Added support for whereIn(String key) and whereNotIn(String key) methods + - **CSAppConstants** - Removed google internet connection check from CSAppConstants ------------------------------------------------ ## Version 1.4.0 ###### Date: 26-July-2019 - - [Entry] - Added support for includeReferenceContentTypeUid support in Entry. - - [Query] - Added support for includeReferenceContentTypeUid support in Query. - - [Entry] - setLanguage and getLanguage Deprecated in Entry. - - [Query] - language deprecated in Query - - [Entry] - Added method for getLocale and setLocale(String locale) in Entry - - [Query] - Added method for locale in Query. - - [Query] - Removed deprecated method for includeSchema in Query + - **Entry** - Added support for includeReferenceContentTypeUid support in Entry. + - **Query** - Added support for includeReferenceContentTypeUid support in Query. + - **Entry** - setLanguage and getLanguage Deprecated in Entry. + - **Query** - language deprecated in Query + - **Entry** - Added method for getLocale and setLocale(String locale) in Entry + - **Query** - Added method for locale in Query. + - **Query** - Removed deprecated method for includeSchema in Query ------------------------------------------------ ## Version 1.3.3 ###### Date: 21-June-2019 - - Override response hot-fix + - **HOTFIX**: Override response hot-fix ------------------------------------------------ ## Version 1.3.2 ### Date: 13-May-2019 - - Removed println - - Added support for Logger + - **Code Improvement** Removed println + - **Code Improvement** Added support for Logger ------------------------------------------------ ## Version 1.3.1 ###### Date: May-02-2019 - - Change: include reference bug fixed - - added testcase report for v1.3.1 + - **Change**: include reference bug fixed + - **Added testcase** report for v1.3.1 ------------------------------------------------ diff --git a/pom.properties b/pom.properties deleted file mode 100644 index 0f71a7e0..00000000 --- a/pom.properties +++ /dev/null @@ -1,4 +0,0 @@ -# Written manually. -version=1.5.3 -groupId=com.contentstack.sdk -artifactId=java diff --git a/pom.xml b/pom.xml index c0a044be..993a661d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,89 +6,91 @@ 4.0.0 com.contentstack.sdk java - 1.5.3 + 1.5.4 jar contentstack-java - Java SDK for Contentstack Content Delivery API, Contentstack is a headless CMS with an API-first approach + Java SDK for Contentstack Content Delivery API, Contentstack is a headless CMS with an API-first approach + https://github.com/contentstack/contentstack-java/ + + org.sonatype.oss + oss-parent + 7 + + + + https://github.com/contentstack/contentstack-java + scm:git:git://github.com/contentstack/contentstack-java.git + scm:git:ssh://github.com:contentstack/contentstack-java.git + HEAD + + + + GitHub Issues + http://github.com/contentstack/contentstack-java/issues + + - MIT License + MIT http://www.opensource.org/licenses/mit-license.php - + + Contentstack. + http://contentstack.com + + + UTF-8 + UTF-8 + + 1.8 + + 3.0.0 + 2.22.0 + 2.2.1 + 3.1.1 + + + - Shailesh Mishra - mshaileshr@gmail.com - Contentstack + shaileshmishra + shailesh.mishra@contentstack.com + contentstack https://www.contentstack.com/ - Contentstacksdk + contentstack mobile@contentstack.com Contentstack https://www.contentstack.com/ - - - - https://github.com/contentstack/contentstack-java/tree/master - scm:git:git://github.com/contentstack/contentstack-java.git - scm:git:ssh://github.com:contentstack/contentstack-java.git - v1.5.3 - - - - GitHub Issues - https://github.com/contentstack/contentstack-java/issues - - - - - Contentstack - https://www.contentstack.com - - - - ossrh https://oss.sonatype.org/content/repositories/snapshots - ossrh https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - UTF-8 - 1.8 - 1.8 - - - - junit junit - 4.13 + 4.13.1 test - org.json json @@ -109,23 +111,44 @@ + - + + org.apache.maven.plugins maven-surefire-report-plugin - - contentstack-java-test-report - - 2.22.0 + ${surefire-report-plugin.version} + + + test + + report-only + + + + org.apache.maven.plugins maven-source-plugin - 2.2.1 + ${maven-source-plugin.version} attach-sources @@ -136,10 +159,11 @@ + org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + ${maven-javadoc-plugin.version} attach-javadocs @@ -147,35 +171,48 @@ jar - ${java.home}/bin/javadoc + -Xdoclint:none + false false 1.8 - http://docs.oracle.com/javase/7/docs/api/ http://docs.oracle.com/javase/7/docs/api/ + + http://docs.oracle.com/javase/7/docs/api/ + http://docs.oracle.com/javase/7/docs/api/ + none + org.apache.maven.plugins maven-site-plugin 3.3 - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - ${javadoc.opts} - - - - + + + + + + + + + + + + + org.apache.maven.plugins maven-gpg-plugin @@ -191,16 +228,27 @@ + org.apache.maven.plugins maven-compiler-plugin 3.8.0 - 1.8 - 1.8 + ${java.version} + ${java.version} + -Xlint:all + true + true + + org.sonatype.plugins nexus-staging-maven-plugin @@ -213,6 +261,10 @@ + org.apache.maven.plugins maven-release-plugin @@ -225,6 +277,27 @@ + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + + prepare-agent + + + + report + prepare-package + + report + + + + +