diff --git a/.github/workflows/maven-central-push.yml b/.github/workflows/maven-central-push.yml
index c6d8a6c..d0084f9 100644
--- a/.github/workflows/maven-central-push.yml
+++ b/.github/workflows/maven-central-push.yml
@@ -19,7 +19,7 @@ jobs:
check-version:
runs-on: ubuntu-latest
needs: [check-pr-labels]
- if: ${{ contains(needs.check-pr-labels.outputs.labels, 'release') || contains(needs.check-pr-labels.outputs.labels, 'maven') }}
+ if: ${{ contains(needs.check-pr-labels.outputs.labels, 'release') }}
steps:
- uses: actions/checkout@v3
- name: Check if version is updated
diff --git a/.github/workflows/maven-pr.yml b/.github/workflows/maven-pr.yml
index 011a3ee..a1b11ff 100644
--- a/.github/workflows/maven-pr.yml
+++ b/.github/workflows/maven-pr.yml
@@ -15,23 +15,23 @@ jobs:
continue-on-error: true
- name: Check if version is updated
uses: avides/actions-project-version-check@v1.3
- id: maven_plugin_version_check
+ id: maven_processor_version_check
with:
token: ${{ secrets.GITHUB_TOKEN }}
file-to-check: pom.xml
continue-on-error: true
- name: Warn about version specification
- if: ${{ steps.engine_version_check.outcome != 'success' || steps.maven_plugin_version_check.outcome != 'success' }}
+ if: ${{steps.maven_processor_version_check.outcome != 'success' }}
uses: thollander/actions-comment-pull-request@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: Project version has not been updated in pom.xml. Please, update your version using https://semver.org specifications
- name: Fail
- if: ${{ steps.engine_version_check.outcome != 'success' || steps.maven_plugin_version_check.outcome != 'success' }}
+ if: ${{steps.maven_processor_version_check.outcome != 'success' }}
uses: cutenode/action-always-fail@v1
- name: New software version
- if: ${{ steps.engine_version_check.outcome == 'success' && steps.maven_plugin_version_check.outcome == 'success' }}
- run: echo "New Pact Annotation Builder engine version is " ${{ steps.engine_version_check.outputs.version }}
+ if: ${{ steps.maven_processor_version_check.outcome == 'success' }}
+ run: echo "New Pact Annotation Builder engine version is " ${{ steps.maven_processor_version_check.version }}
build:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml
index 8dec9bc..41eb42b 100644
--- a/.github/workflows/pr-review.yml
+++ b/.github/workflows/pr-review.yml
@@ -12,9 +12,9 @@ jobs:
if: github.event.review.state == 'approved'
steps:
- name: Warn about missing labels
- if: ${{ !contains(github.event.pull_request.labels.*.name, 'release') && !contains(github.event.pull_request.labels.*.name, 'documentation') && !contains(github.event.pull_request.labels.*.name, 'maven')}}}
+ if: ${{ !contains(github.event.pull_request.labels.*.name, 'release') && !contains(github.event.pull_request.labels.*.name, 'documentation')}}}
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- message: "This pull request hasn't been labeled as `release`, `maven` nor `documentation`. Please ensure this is intentional before merging."
+ message: "This pull request hasn't been labeled as `release` nor `documentation`. Please ensure this is intentional before merging."
comment_tag: label-warn
diff --git a/.gitignore b/.gitignore
index dfe3b37..99cf823 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,4 +41,5 @@ pom.xml.bak
.vscode/
**/.java-version
-*.bak
\ No newline at end of file
+*.bak
+dependency-reduced-pom*
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 60623a4..7339a6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.sngular
pact-annotation-processor
- 1.0.0
+ 1.0.1
PactDslBuilder - Annotation Processor
Pact DSL Builder annotation processor.
@@ -39,6 +39,17 @@
Europe/Madrid
+
+ apenlor
+ Alejandro Pena Lorenzo
+ alejandro.pena@sngular.com
+ https://sngular.github.io/
+
+ Principal Engineer
+ Team Leader
+
+ America/New_York
+
diff --git a/src/main/resources/templates/templateDslBuilder.ftlh b/src/main/resources/templates/templateDslBuilder.ftlh
index fc1622d..dc03c82 100644
--- a/src/main/resources/templates/templateDslBuilder.ftlh
+++ b/src/main/resources/templates/templateDslBuilder.ftlh
@@ -64,7 +64,7 @@
<#if complexField.complexType.name() == "COLLECTION">
${complexField.fieldType?no_esc} ${complexField.name} = List.of(${writeDefaultsList(complexField.fields)});
<#elseif complexField.needBuilder>
- ${complexField.fieldType?no_esc}Builder ${complexField.name};
+ ${complexField.fieldType?no_esc}Builder ${complexField.name} = new ${complexField.fieldType?no_esc}Builder();
<#else >
${complexField.fieldType?no_esc} ${complexField.name};
#if>