diff options
author | mukesh.paliwal <mukesh.paliwal1@huawei.com> | 2021-03-01 23:11:02 +0530 |
---|---|---|
committer | mukesh.paliwal <mukesh.paliwal1@huawei.com> | 2021-03-01 23:11:02 +0530 |
commit | e025ede411c4811d4c899e1691ec0c97e26c2ed8 (patch) | |
tree | d13751f02591f09f5f6cfc031d25e850c8ced326 | |
parent | 7b3dfeab01237ccb03ee40f5559b3172befcf1e5 (diff) |
docker stage build failed in jenkins
Issue-ID: SO-3559
Signed-off-by: mukesh.paliwal <mukesh.paliwal1@huawei.com>
Change-Id: I834dc0091d2353941e0e77bfe2dab693e11d42c1
28 files changed, 520 insertions, 646 deletions
diff --git a/onap-eclipse-format.xml b/onap-eclipse-format.xml deleted file mode 100755 index 093866a..0000000 --- a/onap-eclipse-format.xml +++ /dev/null @@ -1,313 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<profiles version="12"> -<profile kind="CodeFormatterProfile" name="ONAP Java Rule" version="12"> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="2"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> -<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="48"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/> -<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/> -<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/> -<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/> -<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="3"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/> -<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/> -<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/> -<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/> -<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="48"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/> -<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/> -<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/> -<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/> -<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="0"/> -<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/> -<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/> -</profile> -</profiles>
\ No newline at end of file diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml new file mode 100755 index 0000000..e444d6a --- /dev/null +++ b/packages/docker/pom.xml @@ -0,0 +1,157 @@ +<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so.adapters.so-oof-adapter</groupId> + <artifactId>packages</artifactId> + <version>1.8.0-SNAPSHOT</version> + </parent> + <groupId>org.onap.so.adapters.so-oof-adapter.packages</groupId> + <version>1.8.0-SNAPSHOT</version> + <packaging>pom</packaging> + <artifactId>docker</artifactId> + <name>SO OOF Adapter Docker Packaging</name> + + <properties> + <oof-adapter-project-version>${project.version}</oof-adapter-project-version> + <docker.skip>false</docker.skip> + <docker.skip.build>false</docker.skip.build> + <docker.skip.push>false</docker.skip.push> + <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry> + <docker.push.registry>nexus3.onap.org:10003</docker.push.registry> + <docker.image.prefix>onap/so</docker.image.prefix> + <docker.push.phase>deploy</docker.push.phase> + </properties> + + <build> + <finalName>${project.artifactId}-${project.version}</finalName> + <plugins> + <plugin> + <groupId>org.codehaus.groovy.maven</groupId> + <artifactId>gmaven-plugin</artifactId> + <version>1.0</version> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source> + println 'Project version: ' + project.properties['oof-adapter-project-version']; + def versionArray; + if (project.properties['oof-adapter-project-version'] != null) { + versionArray = project.properties['oof-adapter-project-version'].split('-'); + } + + if (project.properties['oof-adapter-project-version'].endsWith("-SNAPSHOT")) { + project.properties['project.docker.latesttag.version'] = versionArray[0] + "-SNAPSHOT-latest"; + } else { + project.properties['project.docker.latesttag.version'] = versionArray[0] + "-STAGING-latest"; + } + + println 'New tag for docker: ' + project.properties['project.docker.latesttag.version']; + </source> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <configuration combine.self="override"> + <verbose>true</verbose> + <apiVersion>1.23</apiVersion> + <pullRegistry>${docker.pull.registry}</pullRegistry> + <pushRegistry>${docker.push.registry}</pushRegistry> + <images> + <image> + <name>${docker.image.prefix}/base-image:1.0</name> + <build> + <cleanup>try</cleanup> + <dockerFile>docker-files/Dockerfile.so-base-image</dockerFile> + </build> + </image> + <image> + <name>${docker.image.prefix}/so-oof-adapter</name> + <build> + <cleanup>try</cleanup> + <dockerFile>docker-files/Dockerfile.so-app</dockerFile> + <tags> + <tag>${project.version}</tag> + <tag>${project.version}-${maven.build.timestamp}</tag> + <tag>${project.docker.latesttag.version}</tag> + </tags> + <assembly> + <inline> + <dependencySets> + <dependencySet> + <includes> + <include> + org.onap.so.adapters.so-oof-adapter:so-oof-adapter-application + </include> + </includes> + <outputFileNameMapping>app.jar</outputFileNameMapping> + </dependencySet> + </dependencySets> + </inline> + </assembly> + </build> + </image> + + </images> + </configuration> + + <executions> + <execution> + <id>clean-images</id> + <phase>pre-clean</phase> + <goals> + <goal>remove</goal> + </goals> + <configuration> + <removeAll>true</removeAll> + </configuration> + </execution> + + <execution> + <id>generate-images</id> + <phase>generate-sources</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + + <execution> + <id>push-images</id> + <phase>${docker.push.phase}</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + <configuration> + <image>${docker.image.prefix}/so-oof-adapter</image> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>org.onap.so.adapters.so-oof-adapter</groupId> + <artifactId>so-oof-adapter-application</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project>
\ No newline at end of file diff --git a/Dockerfile b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app index 751e08c..dc86ff8 100755..100644 --- a/Dockerfile +++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app @@ -1,31 +1,31 @@ -FROM adoptopenjdk/openjdk11:jre-11.0.8_10-alpine +FROM onap/so/base-image:1.0 -ARG JAR_FILE=*.jar ARG http_proxy ENV HTTP_PROXY=$http_proxy ENV http_proxy=$HTTP_PROXY ARG https_proxy ENV HTTPS_PROXY=$https_proxy ENV https_proxy=$HTTPS_PROXY + USER root RUN mkdir -p /app/config RUN mkdir -p /app/certificates RUN mkdir -p /app/logs RUN mkdir -p /app/ca-certificates -RUN apk update && apk add apache2-utils - -COPY target/${JAR_FILE} /app/app.jar +COPY maven/app.jar /app COPY configs/logging/logback-spring.xml /app COPY scripts/start-app.sh /app COPY scripts/wait-for.sh /app COPY ca-certificates/onap-ca.crt /app/ca-certificates/onap-ca.crt -#RUN chown -R so:so /app -#USER so +RUN chown -R so:so /app + +USER so # Springboot configuration (required) VOLUME /app/config + # Root certificates (optional) VOLUME /app/ca-certificates + WORKDIR /app ENTRYPOINT ["/app/start-app.sh"] - diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image b/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image new file mode 100644 index 0000000..a1f4fc1 --- /dev/null +++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-base-image @@ -0,0 +1,19 @@ +FROM adoptopenjdk/openjdk11:jre-11.0.8_10-alpine + +ARG http_proxy +ARG https_proxy +ENV HTTP_PROXY=$http_proxy +ENV HTTPS_PROXY=$https_proxy +ENV http_proxy=$HTTP_PROXY +ENV https_proxy=$HTTPS_PROXY + +# Install commonly needed tools +RUN apk --no-cache add curl netcat-openbsd nss apache2-utils java-cacerts + +# Create symlink for default Java truststore +RUN set -eux; \ + rm -rf "$JAVA_HOME/lib/security/cacerts"; \ + ln -sT /etc/ssl/certs/java/cacerts "$JAVA_HOME/lib/security/cacerts" + +# Create 'so' user +RUN addgroup -g 1000 so && adduser -S -u 1000 -G so -s /bin/sh so diff --git a/ca-certificates/onap-ca.crt b/packages/docker/src/main/docker/docker-files/ca-certificates/onap-ca.crt index e9a50d7..e9a50d7 100644 --- a/ca-certificates/onap-ca.crt +++ b/packages/docker/src/main/docker/docker-files/ca-certificates/onap-ca.crt diff --git a/configs/logging/logback-spring.xml b/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml index e4be709..ad5fe30 100644 --- a/configs/logging/logback-spring.xml +++ b/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml @@ -1,22 +1,22 @@ <!-- ============LICENSE_START======================================================= - ONAP - SO - ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2021 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + SPDX-License-Identifier: Apache-2.0 ============LICENSE_END========================================================= ---> + --> <configuration scan="true" debug="false"> <contextListener class="org.onap.so.logger.LoggerStartupListener" /> <include resource="org/springframework/boot/logging/logback/defaults.xml" /> @@ -173,15 +173,11 @@ <logger name="org.springframework" level="WARN" /> <logger name="org.springframework.security.authentication.dao.DaoAuthenticationProvider" level="DEBUG" /> - <!-- Camunda related loggers --> - <logger name="org.camunda.bpm.engine.jobexecutor.level" level="WARN" /> - <logger name="org.camunda.bpm.engine.impl.persistence.entity.JobEntity.level" level="WARN" /> - <logger name="org.apache.wire" level="DEBUG" /> <logger name="org.onap" level="DEBUG" /> - <logger name="com.att.ecomp" level="DEBUG" /> + <logger name="org.apache.cxf.interceptor" level="DEBUG" /> - <logger name="com.att.commons" level="DEBUG" /> + <logger name="org.reflections" level="ERROR" /> <logger name="AUDIT" level="INFO" additivity="false"> diff --git a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh new file mode 100755 index 0000000..618d55f --- /dev/null +++ b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh @@ -0,0 +1,95 @@ +#!/bin/sh + +if [ `id -u` = 0 ] +then + # Install certificates found in the /app/ca-certificates volume, if any. + + needUpdate=FALSE + + for certificate in `ls -1 /app/ca-certificates`; do + echo "Installing $certificate in /usr/local/share/ca-certificates" + cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate + needUpdate=TRUE + done + + if [ $needUpdate = TRUE ]; then + update-ca-certificates --fresh + fi + + # Re-exec this script as the 'onap' user. + this=`readlink -f $0` + exec su so -c "$this" +fi + +touch /app/app.jar + +if [ ! -z "$DB_HOST" -a -z "$DB_PORT" ]; then + export DB_PORT=3306 +fi + +if [ -z "${CONFIG_PATH}" ]; then + export CONFIG_PATH=/app/config/override.yaml +fi + +if [ -z "${LOG_PATH}" ]; then + export LOG_PATH="logs/${APP}" +fi + +if [ "${SSL_DEBUG}" = "log" ]; then + export SSL_DEBUG="-Djavax.net.debug=all" +else + export SSL_DEBUG= +fi + +# Set java keystore and truststore options, if specified in the environment. + +jksargs= + +if [ ! -z "${KEYSTORE}" ]; then + jksargs="$jksargs -Dmso.load.ssl.client.keystore=true" + jksargs="$jksargs -Djavax.net.ssl.keyStore=$KEYSTORE" + jksargs="$jksargs -Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWORD}" +fi + +if [ ! -z "${TRUSTSTORE}" ]; then + jksargs="$jksargs -Djavax.net.ssl.trustStore=${TRUSTSTORE}" + jksargs="$jksargs -Djavax.net.ssl.trustStorePassword=${TRUSTSTORE_PASSWORD}" +fi + +if [ -z "${ACTIVE_PROFILE}" ]; then + export ACTIVE_PROFILE="basic" +fi + +jvmargs="${JVM_ARGS} -Dspring.profiles.active=${ACTIVE_PROFILE} -Djava.security.egd=file:/dev/./urandom -Dlogs_dir=${LOG_PATH} -Dlogging.config=/app/logback-spring.xml $jksargs -Dspring.config.additional-location=$CONFIG_PATH ${SSL_DEBUG} ${DISABLE_SNI}" + + +read_properties(){ + while IFS="=" read -r key value; do + case "${key}" in + '#'*) ;; + *) + eKey=$(echo $key | tr '[:lower:]' '[:upper:]') + export "$eKey"="$value" + esac + done <<-EOF + $1 + EOF +} + +if [ -n "${AAF_SSL_CERTS_ENABLED}" ]; then +read_properties "$(head -n 4 /app/certs/.passphrases)" +fi + +echo "JVM Arguments: ${jvmargs}" + +java ${jvmargs} -jar app.jar +rc=$? + +echo "Application exiting with status code $rc" + +if [ ! -z "${EXIT_DELAY}" -a "${EXIT_DELAY}" != 0 ]; then + echo "Delaying $APP exit for $EXIT_DELAY seconds" + sleep $EXIT_DELAY +fi + +exit $rc
\ No newline at end of file diff --git a/scripts/wait-for.sh b/packages/docker/src/main/docker/docker-files/scripts/wait-for.sh index 2525821..2525821 100755 --- a/scripts/wait-for.sh +++ b/packages/docker/src/main/docker/docker-files/scripts/wait-for.sh diff --git a/packages/pom.xml b/packages/pom.xml new file mode 100644 index 0000000..6a04756 --- /dev/null +++ b/packages/pom.xml @@ -0,0 +1,35 @@ +<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so.adapters.so-oof-adapter</groupId> + <artifactId>so-oof-adapter</artifactId> + <version>1.8.0-SNAPSHOT</version> + </parent> + <artifactId>packages</artifactId> + <packaging>pom</packaging> + <version>1.8.0-SNAPSHOT</version> + <name>SO OOF Adapter Packages</name> + + <profiles> + <!-- DO NOT CHANGE THE *ORDER* IN WHICH THESE PROFILES ARE DEFINED! --> + + <profile> + <id>default</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + </profile> + + <!-- Those profile are exclusive, choose docker or with-integration-tests --> + <profile> + <id>docker</id> + <modules> + <module>docker</module> + </modules> + <properties> + <docker.skip.push>false</docker.skip.push> + </properties> + </profile> + </profiles> +</project>
\ No newline at end of file diff --git a/pom-format.properties b/pom-format.properties deleted file mode 100755 index 4452c2a..0000000 --- a/pom-format.properties +++ /dev/null @@ -1,5 +0,0 @@ -maxLineLength=120 -wrapLongLines=true -tabInsteadOfSpaces=false -tabWidth=2 -splitMultiAttrs=false
\ No newline at end of file @@ -1,218 +1,74 @@ -<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.so</groupId> - <artifactId>adapters</artifactId> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>so</artifactId> + <version>1.8.0-SNAPSHOT</version> + </parent> + <groupId>org.onap.so.adapters.so-oof-adapter</groupId> + <artifactId>so-oof-adapter</artifactId> <version>1.8.0-SNAPSHOT</version> - </parent> - <groupId>org.onap.so.adapters</groupId> - <artifactId>so-oof-adapter</artifactId> - <version>1.8.0-SNAPSHOT</version> - <name>so-oof-adapter</name> - <description>mso oof adapter</description> + <name>SO OOF Adapter</name> + <packaging>pom</packaging> + <build> + <plugins> + <plugin> + <groupId>net.revelc.code.formatter</groupId> + <artifactId>formatter-maven-plugin</artifactId> + <version>2.9.0</version> + <executions> + <execution> + <id>format-java</id> + <goals> + <goal>format</goal> + </goals> + <phase>process-sources</phase> + <configuration> + <skip>true</skip> + </configuration> + </execution> + <execution> + <id>format-xml</id> + <goals> + <goal>format</goal> + </goals> + <phase>process-sources</phase> + <configuration> + <skip>true</skip> + <includes> + <include>pom.xml</include> + </includes> + </configuration> + </execution> + <execution> + <id>validate-java</id> + <goals> + <goal>validate</goal> + </goals> + <configuration> + <skip>true</skip> + </configuration> + </execution> + <execution> + <id>validate-poms</id> + <goals> + <goal>validate</goal> + </goals> + <configuration> + <skip>true</skip> + <includes> + <include>pom.xml</include> + </includes> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-dependencies</artifactId> - <version>${springboot.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-webflux</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-spring-boot-starter-jaxrs</artifactId> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-service-description-swagger</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>org.junit.vintage</groupId> - <artifactId>junit-vintage-engine</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-api</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-engine</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.junit.vintage</groupId> - <artifactId>junit-vintage-engine</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <finalName>${project.artifactId}-${project.version}</finalName> - <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <configuration> - <mainClass>org.onap.so.adapters.oof.MsoOofAdapterApplication</mainClass> - </configuration> - <executions> - <execution> - <goals> - <goal>repackage</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.jacoco</groupId> - <artifactId>jacoco-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>net.revelc.code.formatter</groupId> - <artifactId>formatter-maven-plugin</artifactId> - <version>2.9.0</version> - <executions> - <execution> - <id>format-java</id> - <goals> - <goal>format</goal> - </goals> - <phase>process-sources</phase> - <configuration> - <skip>${format.skipExecute}</skip> - <configFile>${project.basedir}/onap-eclipse-format.xml</configFile> - </configuration> - </execution> - <execution> - <id>format-xml</id> - <goals> - <goal>format</goal> - </goals> - <phase>process-sources</phase> - <configuration> - <skip>${format.skipExecute}</skip> - <sourceDirectory>${project.basedir}</sourceDirectory> - <configXmlFile>${project.basedir}/pom-format.properties</configXmlFile> - <includes> - <include>pom.xml</include> - </includes> - </configuration> - </execution> - <execution> - <id>validate-java</id> - <goals> - <goal>validate</goal> - </goals> - <configuration> - <skip>${format.skipValidate}</skip> - <configFile>${project.basedir}/onap-eclipse-format.xml</configFile> - </configuration> - </execution> - <execution> - <id>validate-poms</id> - <goals> - <goal>validate</goal> - </goals> - <configuration> - <skip>${format.skipValidate}</skip> - <configFile>${project.basedir}/pom-format.properties</configFile> - <includes> - <include>pom.xml</include> - </includes> - </configuration> - </execution> - </executions> - <dependencies> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - <version>2.9.8</version> - </dependency> - </dependencies> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.6.0</version> - <executions> - <execution> - <id>docker-build</id> - <phase>install</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <dockerFile>Dockerfile</dockerFile> - <executable>docker</executable> - <workingDirectory>${project.basedir}</workingDirectory> - <arguments> - <argument>build</argument> - <argument>-t</argument> - <argument>${project.artifactId}:${project.version}</argument> - <argument>.</argument> - </arguments> - <buildArgs> - <JAR_FILE>${project.artifactId}-${project.version}.jar</JAR_FILE> - <ARTIFACT_ID>${project.artifactId}</ARTIFACT_ID> - </buildArgs> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - <resources> - <resource> - <directory>src/main/resources</directory> - <filtering>true</filtering> - <excludes> - <exclude>**/*.p12</exclude> - <exclude>**/*.jks</exclude> - </excludes> - </resource> - <resource> - <directory>src/main/resources</directory> - <filtering>false</filtering> - <includes> - <include>**/*.p12</include> - <include>**/*.jks</include> - </includes> - </resource> - </resources> - </build> + <modules> + <module>so-oof-adapter-application</module> + <module>packages</module> + </modules> </project> diff --git a/scripts/.gitattributes b/scripts/.gitattributes deleted file mode 100644 index b905d1d..0000000 --- a/scripts/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -# Default behavior -* text=auto - -# Files to have unix style line endings on checkout -*.sh text eol=lf
\ No newline at end of file diff --git a/scripts/start-app.sh b/scripts/start-app.sh deleted file mode 100755 index 54ed9ed..0000000 --- a/scripts/start-app.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh -#temprary condition -if [ `id -u` = 0 ] -then - # Install certificates found in the /app/ca-certificates volume, if any. - - needUpdate=FALSE - - for certificate in `ls -1 /app/ca-certificates`; do - echo "Installing $certificate in /usr/local/share/ca-certificates" - # cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate - needUpdate=FALSE - done - - # Re-exec this script as the 'onap' user. - this=`readlink -f $0` - # exec su so -c "$this" -fi - -touch /app/app.jar - -if [ ! -z "$DB_HOST" -a -z "$DB_PORT" ]; then - export DB_PORT=3306 -fi - -if [ -z "${CONFIG_PATH}" ]; then - export CONFIG_PATH=/app/config/override.yaml -fi - -if [ "${SSL_DEBUG}" = "log" ]; then - export SSL_DEBUG="-Djavax.net.debug=all" -else - export SSL_DEBUG= -fi - -# Set java keystore and truststore options, if specified in the environment. - -jksargs= - -if [ ! -z "${KEYSTORE}" ]; then - jksargs="$jksargs -Dmso.load.ssl.client.keystore=true" - jksargs="$jksargs -Djavax.net.ssl.keyStore=$KEYSTORE" - jksargs="$jksargs -Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWORD}" -fi - -if [ ! -z "${TRUSTSTORE}" ]; then - jksargs="$jksargs -Djavax.net.ssl.trustStore=${TRUSTSTORE}" - jksargs="$jksargs -Djavax.net.ssl.trustStorePassword=${TRUSTSTORE_PASSWORD}" -fi - -if [ -z "${ACTIVE_PROFILE}" ]; then - export ACTIVE_PROFILE="basic" -fi - -jvmargs="${JVM_ARGS} -Dspring.profiles.active=${ACTIVE_PROFILE} -Djava.security.egd=file:/dev/./urandom -Dlogs_dir=${LOG_PATH} -Dlogging.config=/app/logback-spring.xml $jksargs -Dspring.config.additional-location=$CONFIG_PATH ${SSL_DEBUG} ${DISABLE_SNI}" - - -read_properties(){ - while IFS="=" read -r key value; do - case "${key}" in - '#'*) ;; - *) - eKey=$(echo $key | tr '[:lower:]' '[:upper:]') - export "$eKey"="$value" - esac - done <<-EOF - $1 - EOF -} - - - -if [ -n "${AAF_SSL_CERTS_ENABLED}" ]; then -read_properties "$(head -n 4 /app/certs/.passphrases)" -fi - -echo "JVM Arguments: ${jvmargs}" - -java ${jvmargs} -jar app.jar -rc=$? - -echo "Application exiting with status code $rc" - -if [ ! -z "${EXIT_DELAY}" -a "${EXIT_DELAY}" != 0 ]; then - echo "Delaying $APP exit for $EXIT_DELAY seconds" - sleep $EXIT_DELAY -fi - -exit $rc diff --git a/so-oof-adapter-application/pom.xml b/so-oof-adapter-application/pom.xml new file mode 100755 index 0000000..a563fe2 --- /dev/null +++ b/so-oof-adapter-application/pom.xml @@ -0,0 +1,128 @@ +<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so.adapters.so-oof-adapter</groupId> + <artifactId>so-oof-adapter</artifactId> + <version>1.8.0-SNAPSHOT</version> + </parent> + <artifactId>so-oof-adapter-application</artifactId> + <version>1.8.0-SNAPSHOT</version> + <name>SO OOF Application Jar</name> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>${springboot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-webflux</artifactId> + </dependency> + + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-spring-boot-starter-jaxrs</artifactId> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-service-description-swagger</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>org.junit.vintage</groupId> + <artifactId>junit-vintage-engine</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.vintage</groupId> + <artifactId>junit-vintage-engine</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>aai-client</artifactId> + <version>1.8.0-SNAPSHOT</version> + </dependency> + </dependencies> + <build> + <finalName>${project.artifactId}-${project.version}</finalName> + <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <configuration> + <mainClass>org.onap.so.adapters.oof.MsoOofAdapterApplication</mainClass> + </configuration> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + </plugin> + </plugins> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + <excludes> + <exclude>**/*.p12</exclude> + <exclude>**/*.jks</exclude> + </excludes> + </resource> + <resource> + <directory>src/main/resources</directory> + <filtering>false</filtering> + <includes> + <include>**/*.p12</include> + <include>**/*.jks</include> + </includes> + </resource> + </resources> + </build> +</project> diff --git a/src/main/java/org/onap/so/adapters/oof/MsoOofAdapterApplication.java b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/MsoOofAdapterApplication.java index 78fbe6e..78fbe6e 100644 --- a/src/main/java/org/onap/so/adapters/oof/MsoOofAdapterApplication.java +++ b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/MsoOofAdapterApplication.java diff --git a/src/main/java/org/onap/so/adapters/oof/OofAdapterClientConfig.java b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/OofAdapterClientConfig.java index 5e13c59..5e13c59 100644 --- a/src/main/java/org/onap/so/adapters/oof/OofAdapterClientConfig.java +++ b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/OofAdapterClientConfig.java diff --git a/src/main/java/org/onap/so/adapters/oof/WebSecurityConfig.java b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/WebSecurityConfig.java index 9a07b01..9a07b01 100644 --- a/src/main/java/org/onap/so/adapters/oof/WebSecurityConfig.java +++ b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/WebSecurityConfig.java diff --git a/src/main/java/org/onap/so/adapters/oof/constants/Constants.java b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/constants/Constants.java index 5d91bf3..5d91bf3 100644 --- a/src/main/java/org/onap/so/adapters/oof/constants/Constants.java +++ b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/constants/Constants.java diff --git a/src/main/java/org/onap/so/adapters/oof/exceptions/OofAdapterException.java b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/exceptions/OofAdapterException.java index ff16d74..ff16d74 100644 --- a/src/main/java/org/onap/so/adapters/oof/exceptions/OofAdapterException.java +++ b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/exceptions/OofAdapterException.java diff --git a/src/main/java/org/onap/so/adapters/oof/model/OofRequest.java b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/model/OofRequest.java index 1eb694f..1eb694f 100644 --- a/src/main/java/org/onap/so/adapters/oof/model/OofRequest.java +++ b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/model/OofRequest.java diff --git a/src/main/java/org/onap/so/adapters/oof/rest/OofCallbackHandler.java b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/rest/OofCallbackHandler.java index f8da6c6..f8da6c6 100644 --- a/src/main/java/org/onap/so/adapters/oof/rest/OofCallbackHandler.java +++ b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/rest/OofCallbackHandler.java diff --git a/src/main/java/org/onap/so/adapters/oof/rest/OofClient.java b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/rest/OofClient.java index 3a91ec4..3a91ec4 100644 --- a/src/main/java/org/onap/so/adapters/oof/rest/OofClient.java +++ b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/rest/OofClient.java diff --git a/src/main/java/org/onap/so/adapters/oof/utils/OofUtils.java b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/utils/OofUtils.java index f45baa3..f45baa3 100644 --- a/src/main/java/org/onap/so/adapters/oof/utils/OofUtils.java +++ b/so-oof-adapter-application/src/main/java/org/onap/so/adapters/oof/utils/OofUtils.java diff --git a/src/test/java/org/onap/so/adapters/oof/rest/OofCallbackHandlerTest.java b/so-oof-adapter-application/src/test/java/org/onap/so/adapters/oof/rest/OofCallbackHandlerTest.java index 3a2f7f5..3a2f7f5 100644 --- a/src/test/java/org/onap/so/adapters/oof/rest/OofCallbackHandlerTest.java +++ b/so-oof-adapter-application/src/test/java/org/onap/so/adapters/oof/rest/OofCallbackHandlerTest.java diff --git a/src/test/java/org/onap/so/adapters/oof/rest/OofClientTest.java b/so-oof-adapter-application/src/test/java/org/onap/so/adapters/oof/rest/OofClientTest.java index ff38a9a..ff38a9a 100644 --- a/src/test/java/org/onap/so/adapters/oof/rest/OofClientTest.java +++ b/so-oof-adapter-application/src/test/java/org/onap/so/adapters/oof/rest/OofClientTest.java diff --git a/src/test/java/org/onap/so/adapters/oof/utils/OofUtilsTest.java b/so-oof-adapter-application/src/test/java/org/onap/so/adapters/oof/utils/OofUtilsTest.java index e68fa10..e68fa10 100644 --- a/src/test/java/org/onap/so/adapters/oof/utils/OofUtilsTest.java +++ b/so-oof-adapter-application/src/test/java/org/onap/so/adapters/oof/utils/OofUtilsTest.java diff --git a/src/test/resources/testInputs/NsiSelectionOofRequest.json b/so-oof-adapter-application/src/test/resources/testInputs/NsiSelectionOofRequest.json index 569aae9..569aae9 100644 --- a/src/test/resources/testInputs/NsiSelectionOofRequest.json +++ b/so-oof-adapter-application/src/test/resources/testInputs/NsiSelectionOofRequest.json diff --git a/src/test/resources/testInputs/NsiSelectionResponse.json b/so-oof-adapter-application/src/test/resources/testInputs/NsiSelectionResponse.json index 4ddca3e..4ddca3e 100644 --- a/src/test/resources/testInputs/NsiSelectionResponse.json +++ b/so-oof-adapter-application/src/test/resources/testInputs/NsiSelectionResponse.json |