diff --git a/.github/workflows/broken_links_checker.yml b/.github/workflows/broken_links_checker.yml index 6a69306..c268e21 100644 --- a/.github/workflows/broken_links_checker.yml +++ b/.github/workflows/broken_links_checker.yml @@ -4,13 +4,21 @@ on: schedule: - cron: "0 5 * * *" push: + branches: + - main + pull_request: jobs: linkChecker: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Configure broken links checker + run: | + mkdir -p ./target + echo '{ "aliveStatusCodes": [429, 200] }' > ./target/broken_links_checker.json - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: use-quiet-mode: 'yes' - use-verbose-mode: 'yes' \ No newline at end of file + use-verbose-mode: 'yes' + config-file: ./target/broken_links_checker.json \ No newline at end of file diff --git a/.github/workflows/ci-build-next-java.yml b/.github/workflows/ci-build-next-java.yml new file mode 100644 index 0000000..2abe7cb --- /dev/null +++ b/.github/workflows/ci-build-next-java.yml @@ -0,0 +1,37 @@ +name: CI Build next Java + +on: + push: + branches: + - main + pull_request: + +jobs: + java-17-compatibility: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: 17 + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Run tests and build with Maven + run: | + mvn --batch-mode --update-snapshots clean package -DtrimStackTrace=false \ + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + - name: Publish Test Report + uses: scacap/action-surefire-report@v1 + if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 94c3309..54ee71c 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -12,8 +12,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 - name: Cache local Maven repository uses: actions/cache@v2 @@ -27,4 +28,9 @@ jobs: env: GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Publish Test Report + uses: scacap/action-surefire-report@v1 + if: ${{ always() }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dependencies_check.yml b/.github/workflows/dependencies_check.yml index 2cb0303..d28c0b4 100644 --- a/.github/workflows/dependencies_check.yml +++ b/.github/workflows/dependencies_check.yml @@ -11,8 +11,9 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 - name: Cache local Maven repository uses: actions/cache@v2 diff --git a/.github/workflows/release_droid_prepare_original_checksum.yml b/.github/workflows/release_droid_prepare_original_checksum.yml index 5133083..650b120 100644 --- a/.github/workflows/release_droid_prepare_original_checksum.yml +++ b/.github/workflows/release_droid_prepare_original_checksum.yml @@ -12,8 +12,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 - name: Cache local Maven repository uses: actions/cache@v2 @@ -23,7 +24,7 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Run tests and build with Maven - run: mvn -B clean verify --file pom.xml + run: mvn --batch-mode clean verify --file pom.xml - name: Prepare checksum run: find target -maxdepth 1 -name *.jar -exec sha256sum "{}" + > original_checksum - name: Upload checksum to the artifactory diff --git a/.github/workflows/release_droid_print_quick_checksum.yml b/.github/workflows/release_droid_print_quick_checksum.yml index f5f938f..746fc43 100644 --- a/.github/workflows/release_droid_print_quick_checksum.yml +++ b/.github/workflows/release_droid_print_quick_checksum.yml @@ -12,8 +12,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 - name: Cache local Maven repository uses: actions/cache@v2 @@ -23,7 +24,7 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Build with Maven skipping tests - run: mvn -B clean verify -DskipTests + run: mvn --batch-mode clean verify -DskipTests - name: Print checksum run: echo 'checksum_start==';find target -maxdepth 1 -name *.jar -exec sha256sum "{}" + | xargs;echo '==checksum_end' diff --git a/.github/workflows/release_droid_release_on_maven_central.yml b/.github/workflows/release_droid_release_on_maven_central.yml index e768946..5758ecf 100644 --- a/.github/workflows/release_droid_release_on_maven_central.yml +++ b/.github/workflows/release_droid_release_on_maven_central.yml @@ -12,8 +12,9 @@ jobs: with: fetch-depth: 0 - name: Set up Maven Central Repository - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 server-id: ossrh server-username: MAVEN_USERNAME diff --git a/.github/workflows/release_droid_upload_github_release_assets.yml b/.github/workflows/release_droid_upload_github_release_assets.yml index aeb2121..e2c761b 100644 --- a/.github/workflows/release_droid_upload_github_release_assets.yml +++ b/.github/workflows/release_droid_upload_github_release_assets.yml @@ -16,8 +16,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: 'temurin' java-version: 11 - name: Cache local Maven repository uses: actions/cache@v2 @@ -27,12 +28,19 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Build with Maven skipping tests - run: mvn clean verify -DskipTests + run: mvn --batch-mode clean verify -DskipTests + - name: Generate sha256sum files + run: find target -maxdepth 1 -name *.jar -exec bash -c 'sha256sum {} > {}.sha256' \; - name: Upload assets to the GitHub release draft uses: shogo82148/actions-upload-release-asset@v1 with: upload_url: ${{ github.event.inputs.upload_url }} asset_path: target/*.jar + - name: Upload sha256sum files + uses: shogo82148/actions-upload-release-asset@v1 + with: + upload_url: ${{ github.event.inputs.upload_url }} + asset_path: target/*.sha256 - name: Upload error-code-report uses: shogo82148/actions-upload-release-asset@v1 with: diff --git a/.gitignore b/.gitignore index 869d258..4c08c92 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,10 @@ Scripts .directory venv/ pom.xml.versionsBackup + +~* +*.lock +*.bak +*.orig +*.old +*.md.html \ No newline at end of file diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index e3a8580..8b5a9aa 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -111,6 +111,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=enabled org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false @@ -119,12 +120,20 @@ org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false org.eclipse.jdt.core.formatter.align_with_spaces=false org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assertion_message=0 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 @@ -142,6 +151,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_record_components=16 org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 @@ -149,14 +159,18 @@ org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0 org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 @@ -165,6 +179,7 @@ org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line @@ -176,6 +191,8 @@ org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true @@ -193,6 +210,7 @@ org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false org.eclipse.jdt.core.formatter.comment.indent_root_tags=false org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert org.eclipse.jdt.core.formatter.comment.line_length=120 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true @@ -208,6 +226,7 @@ org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=fals org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false @@ -234,6 +253,8 @@ org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=d org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert @@ -263,13 +284,16 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arg org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -286,6 +310,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not ins org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert @@ -302,6 +327,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert @@ -321,6 +348,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not in org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert @@ -347,7 +375,9 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_ar org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert @@ -365,6 +395,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_ org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert @@ -380,6 +412,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert @@ -419,6 +452,8 @@ org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false @@ -428,7 +463,12 @@ org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never org.eclipse.jdt.core.formatter.lineSplit=120 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines @@ -438,14 +478,17 @@ org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=commo org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.text_block_indentation=0 org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs index e7e7880..1add06a 100644 --- a/.settings/org.eclipse.jdt.ui.prefs +++ b/.settings/org.eclipse.jdt.ui.prefs @@ -61,11 +61,12 @@ cleanup_settings_version=2 eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_Exasol -formatter_settings_version=16 +formatter_settings_version=21 org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.importorder=java;javax;org;com; org.eclipse.jdt.ui.ondemandthreshold=3 org.eclipse.jdt.ui.staticondemandthreshold=3 +sp_cleanup.add_all=false sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -79,26 +80,73 @@ sp_cleanup.always_use_blocks=true sp_cleanup.always_use_parentheses_in_expressions=true sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.array_with_curly=false +sp_cleanup.arrays_fill=false +sp_cleanup.bitwise_conditional_expression=false +sp_cleanup.boolean_literal=false +sp_cleanup.boolean_value_rather_than_comparison=false +sp_cleanup.break_loop=false +sp_cleanup.collection_cloning=false +sp_cleanup.comparing_on_criteria=false +sp_cleanup.comparison_statement=false +sp_cleanup.controlflow_merge=false sp_cleanup.convert_functional_interfaces=true sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.convert_to_enhanced_for_loop_if_loop_var_used=false +sp_cleanup.convert_to_switch_expressions=false sp_cleanup.correct_indentation=true +sp_cleanup.do_while_rather_than_while=false +sp_cleanup.double_negation=false +sp_cleanup.else_if=false +sp_cleanup.embedded_if=false +sp_cleanup.evaluate_nullable=false +sp_cleanup.extract_increment=false sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false +sp_cleanup.hash=false +sp_cleanup.if_condition=false sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.instanceof=false +sp_cleanup.instanceof_keyword=false +sp_cleanup.invert_equals=false +sp_cleanup.join=false +sp_cleanup.lazy_logical_operator=false sp_cleanup.make_local_variable_final=true sp_cleanup.make_parameters_final=true sp_cleanup.make_private_fields_final=true sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_variable_declarations_final=true +sp_cleanup.map_cloning=false +sp_cleanup.merge_conditional_blocks=false +sp_cleanup.multi_catch=false sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=false +sp_cleanup.no_string_creation=false +sp_cleanup.no_super=false +sp_cleanup.number_suffix=false +sp_cleanup.objects_equals=false sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=false +sp_cleanup.operand_factorization=false sp_cleanup.organize_imports=true +sp_cleanup.overridden_assignment=false +sp_cleanup.plain_replacement=false +sp_cleanup.precompile_regex=false +sp_cleanup.primitive_comparison=false +sp_cleanup.primitive_parsing=false +sp_cleanup.primitive_rather_than_wrapper=false +sp_cleanup.primitive_serialization=false +sp_cleanup.pull_out_if_from_if_else=false +sp_cleanup.pull_up_assignment=false +sp_cleanup.push_down_negation=false sp_cleanup.qualify_static_field_accesses_with_declaring_class=false sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.reduce_indentation=false +sp_cleanup.redundant_comparator=false +sp_cleanup.redundant_falling_through_block_end=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_redundant_modifiers=false sp_cleanup.remove_redundant_semicolons=true @@ -106,6 +154,7 @@ sp_cleanup.remove_redundant_type_arguments=true sp_cleanup.remove_trailing_whitespaces=true sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_array_creation=false sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_nls_tags=true sp_cleanup.remove_unused_imports=true @@ -114,14 +163,43 @@ sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true +sp_cleanup.return_expression=false +sp_cleanup.simplify_lambda_expression_and_method_ref=false +sp_cleanup.single_used_field=false sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false +sp_cleanup.standard_comparison=false +sp_cleanup.static_inner_class=false +sp_cleanup.strictly_equal_or_different=false +sp_cleanup.stringbuffer_to_stringbuilder=false +sp_cleanup.stringbuilder=false +sp_cleanup.stringbuilder_for_local_vars=false +sp_cleanup.substring=false +sp_cleanup.switch=false +sp_cleanup.system_property=false +sp_cleanup.system_property_boolean=false +sp_cleanup.system_property_file_encoding=false +sp_cleanup.system_property_file_separator=false +sp_cleanup.system_property_line_separator=false +sp_cleanup.system_property_path_separator=false +sp_cleanup.ternary_operator=false +sp_cleanup.try_with_resource=false +sp_cleanup.unlooped_while=false +sp_cleanup.unreachable_block=false sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_autoboxing=false sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_directly_map_method=false sp_cleanup.use_lambda=true sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_string_is_blank=false sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_method_access=false sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true +sp_cleanup.use_unboxing=false +sp_cleanup.use_var=false +sp_cleanup.useless_continue=false +sp_cleanup.useless_return=false +sp_cleanup.valueof_rather_than_instantiation=false diff --git a/dependencies.md b/dependencies.md index d8e8bc5..53a2cd1 100644 --- a/dependencies.md +++ b/dependencies.md @@ -19,13 +19,8 @@ | [SLF4J JDK14 Binding][12] | [MIT License][13] | | [Maven Plugin Integration Testing][14] | [MIT][7] | | [JUnit][16] | [Eclipse Public License 1.0][17] | -| [maven-project-version-getter][18] | [MIT][7] | - -## Runtime Dependencies - -| Dependency | License | -| --------------------- | -------------------------------- | -| [JaCoCo :: Agent][20] | [Eclipse Public License 2.0][21] | +| [Maven Project Version Getter][18] | [MIT][7] | +| [JaCoCo :: Agent][20] | [Eclipse Public License 2.0][21] | ## Plugin Dependencies @@ -39,11 +34,11 @@ | [Apache Maven Enforcer Plugin][32] | [Apache License, Version 2.0][1] | | [Apache Maven Source Plugin][34] | [Apache License, Version 2.0][1] | | [Apache Maven Javadoc Plugin][36] | [Apache License, Version 2.0][1] | -| [Apache Maven GPG Plugin][38] | [Apache License, Version 2.0][5] | +| [Apache Maven GPG Plugin][38] | [Apache License, Version 2.0][1] | | [Project keeper maven plugin][40] | [MIT][7] | | [Maven Surefire Plugin][42] | [Apache License, Version 2.0][1] | -| [JaCoCo :: Maven Plugin][20] | [Eclipse Public License 2.0][21] | -| [Maven Deploy Plugin][46] | [The Apache Software License, Version 2.0][5] | +| [JaCoCo :: Maven Plugin][44] | [Eclipse Public License 2.0][21] | +| [Apache Maven Deploy Plugin][46] | [Apache License, Version 2.0][1] | | [Nexus Staging Maven Plugin][48] | [Eclipse Public License][17] | | [error-code-crawler-maven-plugin][50] | [MIT][7] | | [Reproducible Build Maven Plugin][52] | [Apache 2.0][5] | @@ -68,11 +63,11 @@ [28]: http://www.mojohaus.org/versions-maven-plugin/ [54]: http://maven.apache.org/plugins/maven-dependency-plugin/ [22]: https://maven.apache.org/plugins/maven-compiler-plugin/ -[38]: http://maven.apache.org/plugins/maven-gpg-plugin/ -[2]: https://maven.apache.org/ref/3.8.2/maven-plugin-api/ [16]: http://junit.org [21]: https://www.eclipse.org/legal/epl-2.0/ +[46]: https://maven.apache.org/plugins/maven-deploy-plugin/ [17]: http://www.eclipse.org/legal/epl-v10.html +[44]: https://www.jacoco.org/jacoco/trunk/doc/maven.html [52]: http://zlika.github.io/reproducible-build-maven-plugin [60]: http://maven.apache.org/plugins/maven-jar-plugin/ [13]: http://www.opensource.org/licenses/mit-license.php @@ -83,12 +78,13 @@ [8]: https://junit.org/junit5/ [30]: https://sonatype.github.io/ossindex-maven/maven-plugin/ [24]: https://maven.apache.org/plugin-tools/maven-plugin-plugin +[38]: https://maven.apache.org/plugins/maven-gpg-plugin/ [14]: https://github.com/exasol/maven-plugin-integration-testing [34]: https://maven.apache.org/plugins/maven-source-plugin/ [12]: http://www.slf4j.org -[46]: http://maven.apache.org/plugins/maven-deploy-plugin/ [64]: http://maven.apache.org/plugins/maven-site-plugin/ [58]: http://maven.apache.org/plugins/maven-resources-plugin/ [0]: https://maven.apache.org/plugin-tools/maven-plugin-annotations [36]: https://maven.apache.org/plugins/maven-javadoc-plugin/ [50]: https://github.com/exasol/error-code-crawler-maven-plugin +[2]: https://maven.apache.org/ref/3.8.4/maven-plugin-api/ diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 0fcd7a6..b054c3c 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -6,4 +6,4 @@ * [0.3.1](changes_0.3.1.md) * [0.3.0](changes_0.3.0.md) * [0.2.0](changes_0.2.0.md) -* [0.1.0](changes_0.1.0.md) \ No newline at end of file +* [0.1.0](changes_0.1.0.md) diff --git a/doc/changes/changes_0.4.1.md b/doc/changes/changes_0.4.1.md index c4f39a1..8f75fd5 100644 --- a/doc/changes/changes_0.4.1.md +++ b/doc/changes/changes_0.4.1.md @@ -1,18 +1,43 @@ -# Artifact reference checker and unifier 0.4.1, released 2021-??-?? +# Artifact reference checker and unifier 0.4.1, released 2022-02-25 -Code name: +Code name: Dependency updates + +## Bugfixes + +* #20: Fixed security issue in dependency ## Dependency Updates ### Compile Dependency Updates -* Updated `org.apache.maven:maven-plugin-api:3.8.1` to `3.8.2` +* Updated `com.exasol:error-reporting-java:0.4.0` to `0.4.1` +* Removed `org.apache.maven:maven-plugin-api:3.8.1` +* Removed `org.apache.maven:maven-project:2.2.1` + +### Runtime Dependency Updates + +* Removed `org.jacoco:org.jacoco.agent:0.8.7` ### Test Dependency Updates -* Updated `org.slf4j:slf4j-jdk14:1.7.31` to `1.7.32` +* Updated `com.exasol:maven-plugin-integration-testing:0.1.0` to `1.1.1` +* Updated `com.exasol:maven-project-version-getter:0.1.0` to `1.1.0` +* Added `org.jacoco:org.jacoco.agent:0.8.7` +* Updated `org.junit.jupiter:junit-jupiter-engine:5.7.2` to `5.8.2` +* Updated `org.junit.jupiter:junit-jupiter-params:5.7.2` to `5.8.2` +* Updated `org.slf4j:slf4j-jdk14:1.7.31` to `1.7.36` ### Plugin Dependency Updates -* Updated `com.exasol:error-code-crawler-maven-plugin:0.5.0` to `0.5.1` -* Updated `com.exasol:project-keeper-maven-plugin:0.9.0` to `0.10.0` +* Updated `com.exasol:error-code-crawler-maven-plugin:0.5.0` to `1.0.0` +* Updated `com.exasol:project-keeper-maven-plugin:0.9.0` to `1.3.4` +* Updated `io.github.zlika:reproducible-build-maven-plugin:0.13` to `0.15` +* Updated `org.apache.maven.plugins:maven-compiler-plugin:3.8.1` to `3.10.0` +* Updated `org.apache.maven.plugins:maven-deploy-plugin:2.7` to `3.0.0-M2` +* Updated `org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3` to `3.0.0` +* Updated `org.apache.maven.plugins:maven-gpg-plugin:1.6` to `3.0.1` +* Updated `org.apache.maven.plugins:maven-javadoc-plugin:3.2.0` to `3.3.2` +* Updated `org.apache.maven.plugins:maven-plugin-plugin:3.6.0` to `3.6.4` +* Updated `org.codehaus.mojo:versions-maven-plugin:2.7` to `2.9.0` +* Updated `org.jacoco:jacoco-maven-plugin:0.8.5` to `0.8.7` +* Updated `org.sonatype.ossindex.maven:ossindex-maven-plugin:3.1.0` to `3.2.0` diff --git a/error_code_config.yml b/error_code_config.yml index 9b2f978..d41bacc 100644 --- a/error_code_config.yml +++ b/error_code_config.yml @@ -1,4 +1,5 @@ error-tags: ARCM: packages: - - com.exasol.artifactreferencechecker \ No newline at end of file + - com.exasol.artifactreferencechecker + highest-index: 7 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 0747155..94deb84 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,4 @@ - - + 4.0.0 com.exasol artifact-reference-checker-maven-plugin @@ -44,8 +42,8 @@ https://github.com/exasol/artifact-reference-checker-maven-plugin/tree/master - 3.8.2 - 5.7.2 + 3.8.4 + 5.8.2 11 UTF-8 UTF-8 @@ -55,13 +53,14 @@ org.apache.maven.plugin-tools maven-plugin-annotations - 3.6.1 + 3.6.4 provided org.apache.maven maven-plugin-api ${maven.version} + provided org.apache.maven @@ -73,11 +72,12 @@ junit + provided com.exasol error-reporting-java - 0.4.0 + 0.4.1 @@ -95,13 +95,13 @@ org.slf4j slf4j-jdk14 - 1.7.32 + 1.7.36 test com.exasol maven-plugin-integration-testing - 0.1.0 + 1.1.1 test @@ -114,7 +114,7 @@ com.exasol maven-project-version-getter - 0.1.0 + 1.1.0 test @@ -122,7 +122,7 @@ org.jacoco 0.8.7 runtime - runtime + test @@ -130,7 +130,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.0 ${java.version} ${java.version} @@ -139,7 +139,7 @@ org.apache.maven.plugins maven-plugin-plugin - 3.6.0 + 3.6.4 org.apache.maven.plugins @@ -167,7 +167,7 @@ org.codehaus.mojo versions-maven-plugin - 2.7 + 2.9.0 package @@ -184,7 +184,7 @@ org.sonatype.ossindex.maven ossindex-maven-plugin - 3.1.0 + 3.2.0 package @@ -197,7 +197,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M3 + 3.0.0 enforce-maven @@ -207,7 +207,7 @@ - 3.3.9 + 3.6.3 @@ -230,7 +230,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.3.2 attach-javadocs @@ -250,7 +250,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.0.1 sign-artifacts @@ -270,7 +270,7 @@ com.exasol project-keeper-maven-plugin - 0.10.0 + 1.3.4 @@ -302,7 +302,7 @@ org.jacoco jacoco-maven-plugin - 0.8.5 + 0.8.7 prepare-agent @@ -349,6 +349,7 @@ org.apache.maven.plugins maven-deploy-plugin + 3.0.0-M2 true @@ -375,7 +376,7 @@ com.exasol error-code-crawler-maven-plugin - 0.5.1 + 1.0.0 @@ -387,7 +388,7 @@ io.github.zlika reproducible-build-maven-plugin - 0.13 + 0.15 strip-jar @@ -419,4 +420,4 @@ - + \ No newline at end of file diff --git a/release_config.yml b/release_config.yml new file mode 100644 index 0000000..44dac34 --- /dev/null +++ b/release_config.yml @@ -0,0 +1,3 @@ +release-platforms: + - GitHub + - Maven diff --git a/src/main/java/com/exasol/artifactreferencechecker/AbstractArtifactReferenceCheckerMojo.java b/src/main/java/com/exasol/artifactreferencechecker/AbstractArtifactReferenceCheckerMojo.java index 669ab3b..8a80d47 100644 --- a/src/main/java/com/exasol/artifactreferencechecker/AbstractArtifactReferenceCheckerMojo.java +++ b/src/main/java/com/exasol/artifactreferencechecker/AbstractArtifactReferenceCheckerMojo.java @@ -30,12 +30,16 @@ public abstract class AbstractArtifactReferenceCheckerMojo extends AbstractMojo /** * Create a new instance of {@link AbstractArtifactReferenceCheckerMojo}. - * */ - public AbstractArtifactReferenceCheckerMojo() { + protected AbstractArtifactReferenceCheckerMojo() { this.fileAndLineVisitor = getFileAndLineVisitor(); } + /** + * Get the visitor for processing the files. + * + * @return the visitor + */ protected abstract FileAndLineVisitor getFileAndLineVisitor(); @Override @@ -145,6 +149,7 @@ private void report() throws MojoFailureException { } private static class ExceptionWrapper extends RuntimeException { + private static final long serialVersionUID = 2123268790118308800L; private final MojoExecutionException executionException; private ExceptionWrapper(final MojoExecutionException executionException) { diff --git a/src/main/java/com/exasol/artifactreferencechecker/FileAndLineVisitor.java b/src/main/java/com/exasol/artifactreferencechecker/FileAndLineVisitor.java index 9189c80..58acc0e 100644 --- a/src/main/java/com/exasol/artifactreferencechecker/FileAndLineVisitor.java +++ b/src/main/java/com/exasol/artifactreferencechecker/FileAndLineVisitor.java @@ -10,11 +10,36 @@ * Interface for verify or unify specific behaviour. */ public interface FileAndLineVisitor { + + /** + * Visit the given file. This is called before the file content is processed with + * {@link #visitLine(String, Pattern, String)}. + * + * @param file the visited file + */ public void visit(Path file); + /** + * This is called after the complete file content is processed. + * + * @param file the visited file + * @throws MojoExecutionException in case processing fails + */ public void leave(Path file) throws MojoExecutionException; + /** + * This is called for each line of a visited file. + * + * @param line the processed line + * @param pattern the regular expression + * @param expected the expected text + */ public void visitLine(String line, Pattern pattern, String expected); + /** + * This method is called after all files have been visited. + * + * @throws MojoFailureException in case processing fails + */ public void report() throws MojoFailureException; }