Update upstream source from tag 'upstream/1.7.26'
Update to upstream version '1.7.26'
with Debian dir ddd2442d2b3102635af5101b2aceb2fcb34fb129
Emmanuel Bourg
2 years ago
0 | # Auto detect text files and perform LF normalization | |
1 | * text=auto | |
2 | ||
3 | # Custom for Visual Studio | |
4 | *.cs diff=csharp | |
5 | *.sln merge=union | |
6 | *.csproj merge=union | |
7 | *.vbproj merge=union | |
8 | *.fsproj merge=union | |
9 | *.dbproj merge=union | |
10 | ||
11 | # Standard to msysgit | |
12 | *.doc diff=astextplain | |
13 | *.DOC diff=astextplain | |
14 | *.docx diff=astextplain | |
15 | *.DOCX diff=astextplain | |
16 | *.dot diff=astextplain | |
17 | *.DOT diff=astextplain | |
18 | *.pdf diff=astextplain | |
19 | *.PDF diff=astextplain | |
20 | *.rtf diff=astextplain | |
21 | *.RTF diff=astextplain |
0 | .settings | |
1 | target | |
2 | .classpath | |
3 | .project | |
4 | *~ | |
5 | *.tmproj | |
6 | *.iml | |
7 | .idea | |
8 | .scala_dependencies | |
9 | integration/bundle/ | |
10 | integration/felix-cache/ | |
11 | runner | |
12 | .DS_Store |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <project version="4"> | |
2 | <component name="ProjectCodeStyleSettingsManager"> | |
3 | <option name="PER_PROJECT_SETTINGS"> | |
4 | <value> | |
5 | <option name="OTHER_INDENT_OPTIONS"> | |
6 | <value> | |
7 | <option name="INDENT_SIZE" value="2" /> | |
8 | <option name="CONTINUATION_INDENT_SIZE" value="8" /> | |
9 | <option name="TAB_SIZE" value="2" /> | |
10 | <option name="USE_TAB_CHARACTER" value="false" /> | |
11 | <option name="SMART_TABS" value="false" /> | |
12 | <option name="LABEL_INDENT_SIZE" value="0" /> | |
13 | <option name="LABEL_INDENT_ABSOLUTE" value="false" /> | |
14 | <option name="USE_RELATIVE_INDENTS" value="false" /> | |
15 | </value> | |
16 | </option> | |
17 | <XML> | |
18 | <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> | |
19 | </XML> | |
20 | <codeStyleSettings language="JAVA"> | |
21 | <option name="RIGHT_MARGIN" value="120" /> | |
22 | <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" /> | |
23 | <option name="SPACE_BEFORE_IF_PARENTHESES" value="false" /> | |
24 | <option name="SPACE_BEFORE_WHILE_PARENTHESES" value="false" /> | |
25 | <option name="SPACE_BEFORE_FOR_PARENTHESES" value="false" /> | |
26 | <option name="SPACE_BEFORE_TRY_PARENTHESES" value="false" /> | |
27 | <option name="SPACE_BEFORE_SWITCH_PARENTHESES" value="false" /> | |
28 | <option name="SPACE_BEFORE_SYNCHRONIZED_PARENTHESES" value="false" /> | |
29 | <option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" /> | |
30 | <option name="KEEP_SIMPLE_CLASSES_IN_ONE_LINE" value="true" /> | |
31 | <option name="KEEP_MULTIPLE_EXPRESSIONS_IN_ONE_LINE" value="true" /> | |
32 | <indentOptions> | |
33 | <option name="INDENT_SIZE" value="2" /> | |
34 | <option name="TAB_SIZE" value="2" /> | |
35 | </indentOptions> | |
36 | </codeStyleSettings> | |
37 | <codeStyleSettings language="XML"> | |
38 | <indentOptions> | |
39 | <option name="INDENT_SIZE" value="2" /> | |
40 | <option name="TAB_SIZE" value="2" /> | |
41 | </indentOptions> | |
42 | </codeStyleSettings> | |
43 | </value> | |
44 | </option> | |
45 | <option name="USE_PER_PROJECT_SETTINGS" value="true" /> | |
46 | </component> | |
47 | </project>⏎ |
0 | Copyright (c) 2004-2017 QOS.ch | |
1 | All rights reserved. | |
2 | ||
3 | Permission is hereby granted, free of charge, to any person obtaining | |
4 | a copy of this software and associated documentation files (the | |
5 | "Software"), to deal in the Software without restriction, including | |
6 | without limitation the rights to use, copy, modify, merge, publish, | |
7 | distribute, sublicense, and/or sell copies of the Software, and to | |
8 | permit persons to whom the Software is furnished to do so, subject to | |
9 | the following conditions: | |
10 | ||
11 | The above copyright notice and this permission notice shall be | |
12 | included in all copies or substantial portions of the Software. | |
13 | ||
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
21 | ||
22 | ||
23 | ||
0 | Copyright (c) 2004-2017 QOS.ch | |
1 | All rights reserved. | |
2 | ||
3 | Permission is hereby granted, free of charge, to any person obtaining | |
4 | a copy of this software and associated documentation files (the | |
5 | "Software"), to deal in the Software without restriction, including | |
6 | without limitation the rights to use, copy, modify, merge, publish, | |
7 | distribute, sublicense, and/or sell copies of the Software, and to | |
8 | permit persons to whom the Software is furnished to do so, subject to | |
9 | the following conditions: | |
10 | ||
11 | The above copyright notice and this permission notice shall be | |
12 | included in all copies or substantial portions of the Software. | |
13 | ||
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
21 | ||
22 | ||
23 |
0 | # About SLF4J | |
1 | The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks (e.g. java.util.logging, logback, log4j) allowing the end user to plug in the desired logging framework at deployment time. | |
2 | More information can be found on the [SLF4J website](http://www.slf4j.org). | |
3 | # Build Status | |
4 | [](https://travis-ci.org/qos-ch/slf4j) | |
5 | ||
6 | # How to contribute pull requests | |
7 | If you are interested in improving SLF4J, great! The SLF4J community looks forward to your contribution. Please follow this process: | |
8 | ||
9 | 1. Start a discussion on the [slf4j-dev mailing list](http://www.slf4j.org/mailing-lists.html) about your proposed change. Alternately file a [bug report](http://www.slf4j.org/bug-reporting.html). | |
10 | 2. Fork qos-ch/slf4j. Ideally, create a new branch from your fork for your contribution to make it easier to merge your changes back. | |
11 | 3. Make your changes on the branch you hopefuly created in Step 2. Be sure that your code passes existing unit tests. Please add unit tests for your work if appropriate. It usually is. | |
12 | 4. Push your changes to your fork/branch in github. Don't push it to your master! If you do it will make it harder to submit new changes later. | |
13 | 5. Submit a pull request to SLF4J from from your commit page on github. | |
0 | # About SLF4J | |
1 | The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks (e.g. java.util.logging, logback, log4j) allowing the end user to plug in the desired logging framework at deployment time. | |
2 | More information can be found on the [SLF4J website](http://www.slf4j.org). | |
3 | # Build Status | |
4 | [](https://travis-ci.org/qos-ch/slf4j) | |
5 | ||
6 | # How to contribute pull requests | |
7 | If you are interested in improving SLF4J, great! The SLF4J community looks forward to your contribution. Please follow this process: | |
8 | ||
9 | 1. Start a discussion on the [slf4j-dev mailing list](http://www.slf4j.org/mailing-lists.html) about your proposed change. Alternately file a [bug report](http://www.slf4j.org/bug-reporting.html). | |
10 | 2. Fork qos-ch/slf4j. Ideally, create a new branch from your fork for your contribution to make it easier to merge your changes back. | |
11 | 3. Make your changes on the branch you hopefuly created in Step 2. Be sure that your code passes existing unit tests. Please add unit tests for your work if appropriate. It usually is. | |
12 | 4. Push your changes to your fork/branch in github. Don't push it to your master! If you do it will make it harder to submit new changes later. | |
13 | 5. Submit a pull request to SLF4J from from your commit page on github. |
0 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
1 | <profiles version="12"> | |
2 | <profile kind="CodeFormatterProfile" name="slf4jCodeStyle" version="12"> | |
3 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/> | |
4 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/> | |
5 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/> | |
6 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/> | |
7 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/> | |
8 | <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/> | |
9 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/> | |
10 | <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/> | |
11 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/> | |
12 | <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/> | |
13 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/> | |
14 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/> | |
15 | <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> | |
16 | <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/> | |
17 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/> | |
18 | <setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="false"/> | |
19 | <setting id="org.eclipse.jdt.core.formatter.indentation.size" value="8"/> | |
20 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/> | |
21 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/> | |
22 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> | |
23 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/> | |
24 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/> | |
25 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/> | |
26 | <setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> | |
27 | <setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="4"/> | |
28 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/> | |
29 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/> | |
30 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/> | |
31 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/> | |
32 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/> | |
33 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/> | |
34 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> | |
35 | <setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/> | |
36 | <setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/> | |
37 | <setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/> | |
38 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/> | |
39 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/> | |
40 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/> | |
41 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/> | |
42 | <setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/> | |
43 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/> | |
44 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/> | |
45 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/> | |
46 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/> | |
47 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/> | |
48 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/> | |
49 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/> | |
50 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/> | |
51 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/> | |
52 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/> | |
53 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/> | |
54 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/> | |
55 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/> | |
56 | <setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/> | |
57 | <setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/> | |
58 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/> | |
59 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/> | |
60 | <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/> | |
61 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> | |
62 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/> | |
63 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/> | |
64 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/> | |
65 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/> | |
66 | <setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/> | |
67 | <setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/> | |
68 | <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/> | |
69 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/> | |
70 | <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/> | |
71 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/> | |
72 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> | |
73 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/> | |
74 | <setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/> | |
75 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/> | |
76 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/> | |
77 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/> | |
78 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/> | |
79 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/> | |
80 | <setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/> | |
81 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/> | |
82 | <setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/> | |
83 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/> | |
84 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/> | |
85 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/> | |
86 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/> | |
87 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/> | |
88 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/> | |
89 | <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/> | |
90 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/> | |
91 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/> | |
92 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/> | |
93 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/> | |
94 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/> | |
95 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/> | |
96 | <setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/> | |
97 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> | |
98 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/> | |
99 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/> | |
100 | <setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/> | |
101 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/> | |
102 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/> | |
103 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/> | |
104 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/> | |
105 | <setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/> | |
106 | <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/> | |
107 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/> | |
108 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/> | |
109 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/> | |
110 | <setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/> | |
111 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/> | |
112 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/> | |
113 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/> | |
114 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/> | |
115 | <setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/> | |
116 | <setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/> | |
117 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/> | |
118 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/> | |
119 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/> | |
120 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/> | |
121 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/> | |
122 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/> | |
123 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/> | |
124 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/> | |
125 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/> | |
126 | <setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/> | |
127 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/> | |
128 | <setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/> | |
129 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/> | |
130 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/> | |
131 | <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/> | |
132 | <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/> | |
133 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/> | |
134 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/> | |
135 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/> | |
136 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/> | |
137 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/> | |
138 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/> | |
139 | <setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/> | |
140 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/> | |
141 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/> | |
142 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/> | |
143 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/> | |
144 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/> | |
145 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/> | |
146 | <setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/> | |
147 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/> | |
148 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/> | |
149 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/> | |
150 | <setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/> | |
151 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/> | |
152 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/> | |
153 | <setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/> | |
154 | <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/> | |
155 | <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/> | |
156 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/> | |
157 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/> | |
158 | <setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/> | |
159 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/> | |
160 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/> | |
161 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/> | |
162 | <setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/> | |
163 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/> | |
164 | <setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/> | |
165 | <setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/> | |
166 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/> | |
167 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/> | |
168 | <setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/> | |
169 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/> | |
170 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/> | |
171 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/> | |
172 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/> | |
173 | <setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="false"/> | |
174 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/> | |
175 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/> | |
176 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/> | |
177 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/> | |
178 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/> | |
179 | <setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/> | |
180 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/> | |
181 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/> | |
182 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/> | |
183 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/> | |
184 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/> | |
185 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/> | |
186 | <setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/> | |
187 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/> | |
188 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/> | |
189 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/> | |
190 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/> | |
191 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/> | |
192 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/> | |
193 | <setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="false"/> | |
194 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/> | |
195 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/> | |
196 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/> | |
197 | <setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/> | |
198 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/> | |
199 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/> | |
200 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/> | |
201 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/> | |
202 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/> | |
203 | <setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/> | |
204 | <setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/> | |
205 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/> | |
206 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/> | |
207 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/> | |
208 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/> | |
209 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/> | |
210 | <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/> | |
211 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/> | |
212 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/> | |
213 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/> | |
214 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> | |
215 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/> | |
216 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/> | |
217 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/> | |
218 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/> | |
219 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/> | |
220 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/> | |
221 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/> | |
222 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/> | |
223 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/> | |
224 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/> | |
225 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/> | |
226 | <setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/> | |
227 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/> | |
228 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/> | |
229 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/> | |
230 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/> | |
231 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/> | |
232 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/> | |
233 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/> | |
234 | <setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/> | |
235 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/> | |
236 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/> | |
237 | <setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/> | |
238 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/> | |
239 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/> | |
240 | <setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/> | |
241 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/> | |
242 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/> | |
243 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/> | |
244 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/> | |
245 | <setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/> | |
246 | <setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/> | |
247 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/> | |
248 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/> | |
249 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/> | |
250 | <setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/> | |
251 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/> | |
252 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/> | |
253 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/> | |
254 | <setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/> | |
255 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/> | |
256 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> | |
257 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/> | |
258 | <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/> | |
259 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/> | |
260 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/> | |
261 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/> | |
262 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/> | |
263 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/> | |
264 | <setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/> | |
265 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/> | |
266 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/> | |
267 | <setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/> | |
268 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/> | |
269 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/> | |
270 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/> | |
271 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/> | |
272 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/> | |
273 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/> | |
274 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/> | |
275 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/> | |
276 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/> | |
277 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/> | |
278 | <setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/> | |
279 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/> | |
280 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/> | |
281 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/> | |
282 | <setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/> | |
283 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/> | |
284 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/> | |
285 | <setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/> | |
286 | <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/> | |
287 | <setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/> | |
288 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/> | |
289 | <setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/> | |
290 | <setting id="org.eclipse.jdt.core.formatter.lineSplit" value="160"/> | |
291 | <setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/> | |
292 | <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/> | |
293 | </profile> | |
294 | </profiles> |
0 | <project name="integration" default="testAll" basedir="."> | |
1 | ||
2 | <!-- | |
3 | This build file is usually run indirectly via Maven. | |
4 | ||
5 | When running this build file through Ant directly, you must | |
6 | define the currentVersion property on the command line, e.g.: | |
7 | ||
8 | ant -DcurrentVersion=1.5.4-SNAPSHOT | |
9 | --> | |
10 | ||
11 | <echo message="compile classpath: ${compile_classpath}" /> | |
12 | <echo message="runtime classpath: ${runtime_classpath}" /> | |
13 | <echo message="test classpath: ${test_classpath}" /> | |
14 | <echo message="plugin classpath: ${plugin_classpath}" /> | |
15 | <echo message="basedir: ${basedir}" /> | |
16 | ||
17 | ||
18 | <!--<property name="path_to_policy" value="file:./integration/src/policy/java-under-ant.policy"/>--> | |
19 | ||
20 | ||
21 | <path id="path142Binding"> | |
22 | <pathelement location="target/test-classes/" /> | |
23 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
24 | <pathelement location="./lib/slf4j-simple-1.4.2.jar" /> | |
25 | </path > | |
26 | ||
27 | <path id="path150Binding"> | |
28 | <pathelement location="target/test-classes/" /> | |
29 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
30 | <pathelement location="./lib/slf4j-simple-1.5.0.jar" /> | |
31 | </path > | |
32 | ||
33 | <path id="path1511API"> | |
34 | <pathelement location="target/test-classes/" /> | |
35 | <pathelement location="./lib/slf4j-api-1.5.11.jar" /> | |
36 | <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> | |
37 | </path > | |
38 | ||
39 | <path id="path1511Binding"> | |
40 | <pathelement location="target/test-classes/" /> | |
41 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
42 | <pathelement location="./lib/slf4j-simple-1.5.11.jar" /> | |
43 | </path > | |
44 | ||
45 | <!--<path id="pathIncompatible"> | |
46 | <pathelement location="target/test-classes/" /> | |
47 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
48 | <pathelement location="./lib/slf4j-simple-INCOMPATIBLE.jar" /> | |
49 | </path > | |
50 | --> | |
51 | ||
52 | <path id="pathCurrent"> | |
53 | <pathelement location="target/test-classes/" /> | |
54 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
55 | <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> | |
56 | </path > | |
57 | ||
58 | ||
59 | <path id="incompatibleMultiBinding"> | |
60 | <pathelement location="target/test-classes/" /> | |
61 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
62 | <pathelement location="./lib/slf4j-simple-1.5.0.jar" /> | |
63 | <pathelement location="./lib/slf4j-nop-1.5.6.jar" /> | |
64 | </path > | |
65 | ||
66 | <path id="multiBinding"> | |
67 | <pathelement location="target/test-classes/" /> | |
68 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
69 | <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> | |
70 | <pathelement location="../slf4j-nop/target/slf4j-nop-${currentVersion}.jar" /> | |
71 | </path > | |
72 | ||
73 | <path id="binding166"> | |
74 | <pathelement location="target/test-classes/" /> | |
75 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
76 | <pathelement location="./lib/slf4j-simple-1.6.6.jar" /> | |
77 | </path > | |
78 | ||
79 | <path id="binding2099"> | |
80 | <pathelement location="target/test-classes/" /> | |
81 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
82 | <pathelement location="./lib/slf4j-simple-2.0.99.jar" /> | |
83 | </path > | |
84 | ||
85 | ||
86 | <path id="api166"> | |
87 | <pathelement location="target/test-classes/" /> | |
88 | <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> | |
89 | <pathelement location="./lib/slf4j-api-1.6.6.jar" /> | |
90 | </path > | |
91 | ||
92 | ||
93 | <!-- this is really very ugly, but it's the only way to circumvent | |
94 | http://jira.codehaus.org/browse/MANTRUN-95 | |
95 | --> | |
96 | <taskdef name="junit" classpath="${plugin_classpath};${compile_classpath}" | |
97 | classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" /> | |
98 | ||
99 | <target name="init"> | |
100 | <mkdir dir="target/unit-reports" /> | |
101 | </target> | |
102 | ||
103 | <target name="testAll" depends="init, | |
104 | testMissingSingletonMethod, | |
105 | testMismatch, | |
106 | testMatch, | |
107 | testMultiBinding, | |
108 | testIncompatibleMultiBinding, | |
109 | testFuture_16Series, | |
110 | testActiveSecurityManager"> | |
111 | </target> | |
112 | ||
113 | ||
114 | <target name="testMissingSingletonMethod"> | |
115 | ||
116 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
117 | <classpath refid="path142Binding" /> | |
118 | <formatter type="plain" /> | |
119 | <test fork="yes" todir="target/unit-reports" | |
120 | outfile="TEST-142BININDING" | |
121 | name="org.slf4j.MissingSingletonMethodAssertionTest" /> | |
122 | </junit> | |
123 | ||
124 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
125 | <classpath refid="path150Binding" /> | |
126 | <formatter type="plain" /> | |
127 | <test fork="yes" todir="target/unit-reports" | |
128 | outfile="TEST-150BINDING" | |
129 | name="org.slf4j.MissingSingletonMethodAssertionTest" /> | |
130 | </junit> | |
131 | ||
132 | </target> | |
133 | ||
134 | ||
135 | <target name="testMixed17"> | |
136 | ||
137 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
138 | <classpath refid="pathMixed17" /> | |
139 | <formatter type="plain" /> | |
140 | <test fork="yes" todir="target/unit-reports" | |
141 | outfile="TEST-MIXED-17" | |
142 | name="org.slf4j.VersionMismatchAssertionTest" /> | |
143 | </junit> | |
144 | </target> | |
145 | ||
146 | ||
147 | <target name="testMismatch"> | |
148 | ||
149 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
150 | <classpath refid="path1511API" /> | |
151 | <formatter type="plain" /> | |
152 | <test fork="yes" todir="target/unit-reports" | |
153 | outfile="TEST-MISMATCH-1511API" | |
154 | name="org.slf4j.VersionMismatchAssertionTest" /> | |
155 | </junit> | |
156 | ||
157 | ||
158 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
159 | <classpath refid="path1511Binding" /> | |
160 | <formatter type="plain" /> | |
161 | <test fork="yes" todir="target/unit-reports" | |
162 | outfile="TEST-MISMATCH-1511Binding" | |
163 | name="org.slf4j.VersionMismatchAssertionTest" /> | |
164 | </junit> | |
165 | ||
166 | </target> | |
167 | ||
168 | <target name="testMatch"> | |
169 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
170 | <classpath refid="pathCurrent" /> | |
171 | <formatter type="plain" /> | |
172 | <test fork="yes" todir="target/unit-reports" | |
173 | outfile="TEST-Match" | |
174 | name="org.slf4j.CompatibilityAssertionTest" /> | |
175 | </junit> | |
176 | </target> | |
177 | ||
178 | <target name="testIncompatibleMultiBinding"> | |
179 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
180 | <classpath refid="incompatibleMultiBinding" /> | |
181 | <formatter type="plain" /> | |
182 | <test fork="yes" todir="target/unit-reports" | |
183 | outfile="TEST-IncompatibleMultiBinding" | |
184 | name="org.slf4j.IncompatibleMultiBindingAssertionTest" /> | |
185 | </junit> | |
186 | </target> | |
187 | ||
188 | <target name="testMultiBinding"> | |
189 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
190 | <classpath refid="multiBinding" /> | |
191 | <formatter type="plain" /> | |
192 | <test fork="yes" todir="target/unit-reports" | |
193 | outfile="TEST-MultiBinding" | |
194 | name="org.slf4j.MultiBindingAssertionTest" /> | |
195 | </junit> | |
196 | </target> | |
197 | ||
198 | <target name="testFuture_16Series"> | |
199 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
200 | <classpath refid="binding166" /> | |
201 | <formatter type="plain" /> | |
202 | <test fork="yes" todir="target/unit-reports" | |
203 | outfile="TEST-binding166" | |
204 | name="org.slf4j.CompatibilityAssertionTest" /> | |
205 | </junit> | |
206 | ||
207 | ||
208 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
209 | <classpath refid="api166" /> | |
210 | <formatter type="plain" /> | |
211 | <test fork="yes" todir="target/unit-reports" | |
212 | outfile="TEST-api166" | |
213 | name="org.slf4j.CompatibilityAssertionTest" /> | |
214 | </junit> | |
215 | ||
216 | </target> | |
217 | ||
218 | ||
219 | <condition property="runFromWithinIntegrationModule"> | |
220 | <contains string="${user.dir}" substring="integration" /> | |
221 | </condition> | |
222 | ||
223 | <target name="setPathToPolicy_FromTop" unless="runFromWithinIntegrationModule"> | |
224 | <echo>setPathToPolicy_FromTop</echo> | |
225 | <property name="path_to_policy" value="file:./integration/src/policy/java-under-ant.policy"/> | |
226 | </target> | |
227 | ||
228 | <target name="setPathToPolicy_FromIntegration" if="runFromWithinIntegrationModule"> | |
229 | <echo>setPathToPolicy_FromInegration </echo> | |
230 | <property name="path_to_policy" value="file:./src/policy/java-under-ant.policy"/> | |
231 | </target> | |
232 | ||
233 | ||
234 | <target name="testActiveSecurityManager" depends="setPathToPolicy_FromTop, setPathToPolicy_FromIntegration"> | |
235 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
236 | <jvmarg value="-Djava.security.manager"/> | |
237 | <jvmarg value="-Djava.security.policy=${path_to_policy}"/> | |
238 | <jvmarg value="-Dslf4j.detectLoggerNameMismatch=true"/> | |
239 | <classpath refid="pathCurrent" /> | |
240 | <formatter type="plain" /> | |
241 | <test fork="yes" todir="target/unit-reports" | |
242 | outfile="TEST-SecurityManager" | |
243 | name="org.slf4j.issues.Issue324Test" /> | |
244 | </junit> | |
245 | </target> | |
246 | ||
0 | <project name="integration" default="testAll" basedir="."> | |
1 | ||
2 | <!-- | |
3 | This build file is usually run indirectly via Maven. | |
4 | ||
5 | When running this build file through Ant directly, you must | |
6 | define the currentVersion property on the command line, e.g.: | |
7 | ||
8 | ant -DcurrentVersion=1.5.4-SNAPSHOT | |
9 | --> | |
10 | ||
11 | <echo message="compile classpath: ${compile_classpath}" /> | |
12 | <echo message="runtime classpath: ${runtime_classpath}" /> | |
13 | <echo message="test classpath: ${test_classpath}" /> | |
14 | <echo message="plugin classpath: ${plugin_classpath}" /> | |
15 | <echo message="basedir: ${basedir}" /> | |
16 | ||
17 | ||
18 | <!--<property name="path_to_policy" value="file:./integration/src/policy/java-under-ant.policy"/>--> | |
19 | ||
20 | ||
21 | <path id="path142Binding"> | |
22 | <pathelement location="target/test-classes/" /> | |
23 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
24 | <pathelement location="./lib/slf4j-simple-1.4.2.jar" /> | |
25 | </path > | |
26 | ||
27 | <path id="path150Binding"> | |
28 | <pathelement location="target/test-classes/" /> | |
29 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
30 | <pathelement location="./lib/slf4j-simple-1.5.0.jar" /> | |
31 | </path > | |
32 | ||
33 | <path id="path1511API"> | |
34 | <pathelement location="target/test-classes/" /> | |
35 | <pathelement location="./lib/slf4j-api-1.5.11.jar" /> | |
36 | <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> | |
37 | </path > | |
38 | ||
39 | <path id="path1511Binding"> | |
40 | <pathelement location="target/test-classes/" /> | |
41 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
42 | <pathelement location="./lib/slf4j-simple-1.5.11.jar" /> | |
43 | </path > | |
44 | ||
45 | <!--<path id="pathIncompatible"> | |
46 | <pathelement location="target/test-classes/" /> | |
47 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
48 | <pathelement location="./lib/slf4j-simple-INCOMPATIBLE.jar" /> | |
49 | </path > | |
50 | --> | |
51 | ||
52 | <path id="pathCurrent"> | |
53 | <pathelement location="target/test-classes/" /> | |
54 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
55 | <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> | |
56 | </path > | |
57 | ||
58 | ||
59 | <path id="incompatibleMultiBinding"> | |
60 | <pathelement location="target/test-classes/" /> | |
61 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
62 | <pathelement location="./lib/slf4j-simple-1.5.0.jar" /> | |
63 | <pathelement location="./lib/slf4j-nop-1.5.6.jar" /> | |
64 | </path > | |
65 | ||
66 | <path id="multiBinding"> | |
67 | <pathelement location="target/test-classes/" /> | |
68 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
69 | <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> | |
70 | <pathelement location="../slf4j-nop/target/slf4j-nop-${currentVersion}.jar" /> | |
71 | </path > | |
72 | ||
73 | <path id="binding166"> | |
74 | <pathelement location="target/test-classes/" /> | |
75 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
76 | <pathelement location="./lib/slf4j-simple-1.6.6.jar" /> | |
77 | </path > | |
78 | ||
79 | <path id="binding2099"> | |
80 | <pathelement location="target/test-classes/" /> | |
81 | <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> | |
82 | <pathelement location="./lib/slf4j-simple-2.0.99.jar" /> | |
83 | </path > | |
84 | ||
85 | ||
86 | <path id="api166"> | |
87 | <pathelement location="target/test-classes/" /> | |
88 | <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> | |
89 | <pathelement location="./lib/slf4j-api-1.6.6.jar" /> | |
90 | </path > | |
91 | ||
92 | ||
93 | <!-- this is really very ugly, but it's the only way to circumvent | |
94 | http://jira.codehaus.org/browse/MANTRUN-95 | |
95 | --> | |
96 | <taskdef name="junit" classpath="${plugin_classpath};${compile_classpath}" | |
97 | classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" /> | |
98 | ||
99 | <target name="init"> | |
100 | <mkdir dir="target/unit-reports" /> | |
101 | </target> | |
102 | ||
103 | <target name="testAll" depends="init, | |
104 | testMissingSingletonMethod, | |
105 | testMismatch, | |
106 | testMatch, | |
107 | testMultiBinding, | |
108 | testIncompatibleMultiBinding, | |
109 | testFuture_16Series, | |
110 | testActiveSecurityManager"> | |
111 | </target> | |
112 | ||
113 | ||
114 | <target name="testMissingSingletonMethod"> | |
115 | ||
116 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
117 | <classpath refid="path142Binding" /> | |
118 | <formatter type="plain" /> | |
119 | <test fork="yes" todir="target/unit-reports" | |
120 | outfile="TEST-142BININDING" | |
121 | name="org.slf4j.MissingSingletonMethodAssertionTest" /> | |
122 | </junit> | |
123 | ||
124 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
125 | <classpath refid="path150Binding" /> | |
126 | <formatter type="plain" /> | |
127 | <test fork="yes" todir="target/unit-reports" | |
128 | outfile="TEST-150BINDING" | |
129 | name="org.slf4j.MissingSingletonMethodAssertionTest" /> | |
130 | </junit> | |
131 | ||
132 | </target> | |
133 | ||
134 | ||
135 | <target name="testMixed17"> | |
136 | ||
137 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
138 | <classpath refid="pathMixed17" /> | |
139 | <formatter type="plain" /> | |
140 | <test fork="yes" todir="target/unit-reports" | |
141 | outfile="TEST-MIXED-17" | |
142 | name="org.slf4j.VersionMismatchAssertionTest" /> | |
143 | </junit> | |
144 | </target> | |
145 | ||
146 | ||
147 | <target name="testMismatch"> | |
148 | ||
149 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
150 | <classpath refid="path1511API" /> | |
151 | <formatter type="plain" /> | |
152 | <test fork="yes" todir="target/unit-reports" | |
153 | outfile="TEST-MISMATCH-1511API" | |
154 | name="org.slf4j.VersionMismatchAssertionTest" /> | |
155 | </junit> | |
156 | ||
157 | ||
158 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
159 | <classpath refid="path1511Binding" /> | |
160 | <formatter type="plain" /> | |
161 | <test fork="yes" todir="target/unit-reports" | |
162 | outfile="TEST-MISMATCH-1511Binding" | |
163 | name="org.slf4j.VersionMismatchAssertionTest" /> | |
164 | </junit> | |
165 | ||
166 | </target> | |
167 | ||
168 | <target name="testMatch"> | |
169 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
170 | <classpath refid="pathCurrent" /> | |
171 | <formatter type="plain" /> | |
172 | <test fork="yes" todir="target/unit-reports" | |
173 | outfile="TEST-Match" | |
174 | name="org.slf4j.CompatibilityAssertionTest" /> | |
175 | </junit> | |
176 | </target> | |
177 | ||
178 | <target name="testIncompatibleMultiBinding"> | |
179 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
180 | <classpath refid="incompatibleMultiBinding" /> | |
181 | <formatter type="plain" /> | |
182 | <test fork="yes" todir="target/unit-reports" | |
183 | outfile="TEST-IncompatibleMultiBinding" | |
184 | name="org.slf4j.IncompatibleMultiBindingAssertionTest" /> | |
185 | </junit> | |
186 | </target> | |
187 | ||
188 | <target name="testMultiBinding"> | |
189 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
190 | <classpath refid="multiBinding" /> | |
191 | <formatter type="plain" /> | |
192 | <test fork="yes" todir="target/unit-reports" | |
193 | outfile="TEST-MultiBinding" | |
194 | name="org.slf4j.MultiBindingAssertionTest" /> | |
195 | </junit> | |
196 | </target> | |
197 | ||
198 | <target name="testFuture_16Series"> | |
199 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
200 | <classpath refid="binding166" /> | |
201 | <formatter type="plain" /> | |
202 | <test fork="yes" todir="target/unit-reports" | |
203 | outfile="TEST-binding166" | |
204 | name="org.slf4j.CompatibilityAssertionTest" /> | |
205 | </junit> | |
206 | ||
207 | ||
208 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
209 | <classpath refid="api166" /> | |
210 | <formatter type="plain" /> | |
211 | <test fork="yes" todir="target/unit-reports" | |
212 | outfile="TEST-api166" | |
213 | name="org.slf4j.CompatibilityAssertionTest" /> | |
214 | </junit> | |
215 | ||
216 | </target> | |
217 | ||
218 | ||
219 | <condition property="runFromWithinIntegrationModule"> | |
220 | <contains string="${user.dir}" substring="integration" /> | |
221 | </condition> | |
222 | ||
223 | <target name="setPathToPolicy_FromTop" unless="runFromWithinIntegrationModule"> | |
224 | <echo>setPathToPolicy_FromTop</echo> | |
225 | <property name="path_to_policy" value="file:./integration/src/policy/java-under-ant.policy"/> | |
226 | </target> | |
227 | ||
228 | <target name="setPathToPolicy_FromIntegration" if="runFromWithinIntegrationModule"> | |
229 | <echo>setPathToPolicy_FromInegration </echo> | |
230 | <property name="path_to_policy" value="file:./src/policy/java-under-ant.policy"/> | |
231 | </target> | |
232 | ||
233 | ||
234 | <target name="testActiveSecurityManager" depends="setPathToPolicy_FromTop, setPathToPolicy_FromIntegration"> | |
235 | <junit printsummary="yes" fork="no" haltonfailure="yes"> | |
236 | <jvmarg value="-Djava.security.manager"/> | |
237 | <jvmarg value="-Djava.security.policy=${path_to_policy}"/> | |
238 | <jvmarg value="-Dslf4j.detectLoggerNameMismatch=true"/> | |
239 | <classpath refid="pathCurrent" /> | |
240 | <formatter type="plain" /> | |
241 | <test fork="yes" todir="target/unit-reports" | |
242 | outfile="TEST-SecurityManager" | |
243 | name="org.slf4j.issues.Issue324Test" /> | |
244 | </junit> | |
245 | </target> | |
246 | ||
247 | 247 | </project>⏎ |
0 | <project name="osgi-test" default="testAll"> | |
1 | ||
2 | <!-- | |
3 | This build file is usually run indirectly via Maven. | |
4 | ||
5 | When running this build file through Ant directly, you must | |
6 | define the currentVersion property on the command line, e.g.: | |
7 | ||
8 | ant -DcurrentVersion=1.5.4-SNAPSHOT | |
9 | --> | |
10 | ||
11 | <echo message="compile classpath: ${currentVersion}" /> | |
12 | <echo message="test classpath: ${test_classpath}" /> | |
13 | <echo message="basedir: ${basedir}" /> | |
14 | ||
15 | <property name="iBundleJar" value="target/iBundle.jar"/> | |
16 | <property name="bundlesDir" value="bundle"/> | |
17 | ||
18 | ||
19 | <!-- this is really very ugly, but it's the only way to circumvent | |
20 | http://jira.codehaus.org/browse/MANTRUN-95 | |
21 | --> | |
22 | <taskdef name="junit" classpath="${test_classpath}" | |
23 | classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" /> | |
24 | ||
25 | <path id="minimal"> | |
26 | <pathelement location="target/test-classes/" /> | |
27 | </path > | |
28 | ||
29 | <target name="init"> | |
30 | <mkdir dir="target/unit-reports" /> | |
31 | </target> | |
32 | ||
33 | <target name="createIBundle"> | |
34 | <mkdir dir="${bundlesDir}"/> | |
35 | <jar destFile="${iBundleJar}" | |
36 | manifest="src/IBUNDLE-META-INF/MANIFEST.MF" | |
37 | basedir="target/test-classes/" | |
38 | includes="integrator/**.class"/> | |
39 | ||
40 | </target> | |
41 | ||
42 | <target name="testAll" depends="init, createIBundle, nop, simple, jdk14"> | |
43 | </target> | |
44 | ||
45 | ||
46 | <macrodef name="prepareOSGiHarness"> | |
47 | <attribute name="binding"/> | |
48 | <sequential> | |
49 | <delete> | |
50 | <fileset dir="${bundlesDir}" includes="*.jar"/> | |
51 | </delete> | |
52 | <copy file="${iBundleJar}" todir="${bundlesDir}"/> | |
53 | <copy file="../slf4j-api/target/slf4j-api-${currentVersion}.jar" todir="${bundlesDir}"/> | |
54 | <copy file="../slf4j-@{binding}/target/slf4j-@{binding}-${currentVersion}.jar" todir="${bundlesDir}"/> | |
55 | <echo>value of t = @{t}</echo> | |
56 | </sequential> | |
57 | </macrodef> | |
58 | ||
59 | ||
60 | <!-- for some reason if mvn is invoked from the parent directory, junit gets | |
61 | invoked from the parent dir, which messes up theses tests. Hence, the | |
62 | fork="yes" dir="${basedir}" --> | |
63 | ||
64 | <target name="nop"> | |
65 | <prepareOSGiHarness binding="nop"/> | |
66 | <junit printsummary="yes" fork="yes" dir="${basedir}" haltonfailure="yes"> | |
67 | <classpath path="${test_classpath}"/> | |
68 | <formatter type="plain" /> | |
69 | <test fork="yes" todir="target/unit-reports" name="org.slf4j.test_osgi.BundleTest" /> | |
70 | </junit> | |
71 | </target> | |
72 | ||
73 | <target name="simple"> | |
74 | <prepareOSGiHarness binding="simple"/> | |
75 | <junit printsummary="yes" fork="yes" dir="${basedir}" haltonfailure="yes"> | |
76 | <classpath path="${test_classpath}"/> | |
77 | <formatter type="plain" /> | |
78 | <test fork="yes" todir="target/unit-reports" name="org.slf4j.test_osgi.BundleTest" /> | |
79 | </junit> | |
80 | </target> | |
81 | ||
82 | <target name="jdk14"> | |
83 | <prepareOSGiHarness binding="jdk14"/> | |
84 | <junit printsummary="yes" fork="yes" dir="${basedir}" haltonfailure="yes"> | |
85 | <classpath path="${test_classpath}"/> | |
86 | <formatter type="plain" /> | |
87 | <test fork="yes" todir="target/unit-reports" name="org.slf4j.test_osgi.BundleTest" /> | |
88 | </junit> | |
89 | </target> | |
90 | ||
0 | <project name="osgi-test" default="testAll"> | |
1 | ||
2 | <!-- | |
3 | This build file is usually run indirectly via Maven. | |
4 | ||
5 | When running this build file through Ant directly, you must | |
6 | define the currentVersion property on the command line, e.g.: | |
7 | ||
8 | ant -DcurrentVersion=1.5.4-SNAPSHOT | |
9 | --> | |
10 | ||
11 | <echo message="compile classpath: ${currentVersion}" /> | |
12 | <echo message="test classpath: ${test_classpath}" /> | |
13 | <echo message="basedir: ${basedir}" /> | |
14 | ||
15 | <property name="iBundleJar" value="target/iBundle.jar"/> | |
16 | <property name="bundlesDir" value="bundle"/> | |
17 | ||
18 | ||
19 | <!-- this is really very ugly, but it's the only way to circumvent | |
20 | http://jira.codehaus.org/browse/MANTRUN-95 | |
21 | --> | |
22 | <taskdef name="junit" classpath="${test_classpath}" | |
23 | classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" /> | |
24 | ||
25 | <path id="minimal"> | |
26 | <pathelement location="target/test-classes/" /> | |
27 | </path > | |
28 | ||
29 | <target name="init"> | |
30 | <mkdir dir="target/unit-reports" /> | |
31 | </target> | |
32 | ||
33 | <target name="createIBundle"> | |
34 | <mkdir dir="${bundlesDir}"/> | |
35 | <jar destFile="${iBundleJar}" | |
36 | manifest="src/IBUNDLE-META-INF/MANIFEST.MF" | |
37 | basedir="target/test-classes/" | |
38 | includes="integrator/**.class"/> | |
39 | ||
40 | </target> | |
41 | ||
42 | <target name="testAll" depends="init, createIBundle, nop, simple, jdk14"> | |
43 | </target> | |
44 | ||
45 | ||
46 | <macrodef name="prepareOSGiHarness"> | |
47 | <attribute name="binding"/> | |
48 | <sequential> | |
49 | <delete> | |
50 | <fileset dir="${bundlesDir}" includes="*.jar"/> | |
51 | </delete> | |
52 | <copy file="${iBundleJar}" todir="${bundlesDir}"/> | |
53 | <copy file="../slf4j-api/target/slf4j-api-${currentVersion}.jar" todir="${bundlesDir}"/> | |
54 | <copy file="../slf4j-@{binding}/target/slf4j-@{binding}-${currentVersion}.jar" todir="${bundlesDir}"/> | |
55 | <echo>value of t = @{t}</echo> | |
56 | </sequential> | |
57 | </macrodef> | |
58 | ||
59 | ||
60 | <!-- for some reason if mvn is invoked from the parent directory, junit gets | |
61 | invoked from the parent dir, which messes up theses tests. Hence, the | |
62 | fork="yes" dir="${basedir}" --> | |
63 | ||
64 | <target name="nop"> | |
65 | <prepareOSGiHarness binding="nop"/> | |
66 | <junit printsummary="yes" fork="yes" dir="${basedir}" haltonfailure="yes"> | |
67 | <classpath path="${test_classpath}"/> | |
68 | <formatter type="plain" /> | |
69 | <test fork="yes" todir="target/unit-reports" name="org.slf4j.test_osgi.BundleTest" /> | |
70 | </junit> | |
71 | </target> | |
72 | ||
73 | <target name="simple"> | |
74 | <prepareOSGiHarness binding="simple"/> | |
75 | <junit printsummary="yes" fork="yes" dir="${basedir}" haltonfailure="yes"> | |
76 | <classpath path="${test_classpath}"/> | |
77 | <formatter type="plain" /> | |
78 | <test fork="yes" todir="target/unit-reports" name="org.slf4j.test_osgi.BundleTest" /> | |
79 | </junit> | |
80 | </target> | |
81 | ||
82 | <target name="jdk14"> | |
83 | <prepareOSGiHarness binding="jdk14"/> | |
84 | <junit printsummary="yes" fork="yes" dir="${basedir}" haltonfailure="yes"> | |
85 | <classpath path="${test_classpath}"/> | |
86 | <formatter type="plain" /> | |
87 | <test fork="yes" todir="target/unit-reports" name="org.slf4j.test_osgi.BundleTest" /> | |
88 | </junit> | |
89 | </target> | |
90 | ||
91 | 91 | </project>⏎ |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
3 | ||
4 | <modelVersion>4.0.0</modelVersion> | |
5 | ||
6 | <parent> | |
7 | <groupId>org.slf4j</groupId> | |
8 | <artifactId>slf4j-parent</artifactId> | |
9 | <version>1.7.25</version> | |
10 | </parent> | |
11 | ||
12 | <artifactId>integration</artifactId> | |
13 | <packaging>jar</packaging> | |
14 | <name>SLF4J Integration tests</name> | |
15 | ||
16 | <url>http://www.slf4j.org</url> | |
17 | <description>SLF4J integration tests</description> | |
18 | ||
19 | <dependencies> | |
20 | <dependency> | |
21 | <groupId>org.slf4j</groupId> | |
22 | <artifactId>slf4j-api</artifactId> | |
23 | </dependency> | |
24 | ||
25 | <!-- declaration to circumvent http://jira.codehaus.org/browse/MANTRUN-95 --> | |
26 | <dependency> | |
27 | <groupId>junit</groupId> | |
28 | <artifactId>junit</artifactId> | |
29 | <version>3.8.1</version> | |
30 | </dependency> | |
31 | <!-- declaration to circumvent http://jira.codehaus.org/browse/MANTRUN-95 --> | |
32 | <dependency> | |
33 | <groupId>ant</groupId> | |
34 | <artifactId>ant-junit</artifactId> | |
35 | <version>1.6.5</version> | |
36 | </dependency> | |
37 | ||
38 | <!-- some test run Felix in hosted mode --> | |
39 | <dependency> | |
40 | <groupId>org.apache.felix</groupId> | |
41 | <artifactId>org.apache.felix.main</artifactId> | |
42 | <version>5.6.1</version> | |
43 | <!--<version>2.0.2</version>--> | |
44 | </dependency> | |
45 | </dependencies> | |
46 | ||
47 | <build> | |
48 | <plugins> | |
49 | <plugin> | |
50 | <artifactId>maven-antrun-plugin</artifactId> | |
51 | <version>1.2</version> | |
52 | <dependencies> | |
53 | <dependency> | |
54 | <groupId>junit</groupId> | |
55 | <artifactId>junit</artifactId> | |
56 | <version>3.8.1</version> | |
57 | </dependency> | |
58 | <dependency> | |
59 | <groupId>ant</groupId> | |
60 | <artifactId>ant-junit</artifactId> | |
61 | <version>1.6.5</version> | |
62 | </dependency> | |
63 | </dependencies> | |
64 | <executions> | |
65 | <execution> | |
66 | <id>ant-test</id> | |
67 | <phase>package</phase> | |
68 | <configuration> | |
69 | <tasks> | |
70 | <property name="currentVersion" value="${project.version}"/> | |
71 | <property name="compile_classpath" refid="maven.compile.classpath"/> | |
72 | <property name="runtime_classpath" refid="maven.runtime.classpath"/> | |
73 | <property name="test_classpath" refid="maven.test.classpath"/> | |
74 | <property name="plugin_classpath" refid="maven.plugin.classpath"/> | |
75 | <ant antfile="${basedir}/build.xml"/> | |
76 | </tasks> | |
77 | </configuration> | |
78 | <goals> | |
79 | <goal>run</goal> | |
80 | </goals> | |
81 | </execution> | |
82 | <execution> | |
83 | <id>ant-osgi-test</id> | |
84 | <phase>package</phase> | |
85 | <configuration> | |
86 | <tasks> | |
87 | <property name="currentVersion" value="${project.version}"/> | |
88 | <property name="test_classpath" refid="maven.test.classpath"/> | |
89 | <property name="basedir" value="${basedir}"/> | |
90 | <ant antfile="${basedir}/osgi-build.xml"/> | |
91 | </tasks> | |
92 | </configuration> | |
93 | <goals> | |
94 | <goal>run</goal> | |
95 | </goals> | |
96 | </execution> | |
97 | ||
98 | </executions> | |
99 | </plugin> | |
100 | ||
101 | <plugin> | |
102 | <groupId>org.apache.maven.plugins</groupId> | |
103 | <artifactId>maven-surefire-plugin</artifactId> | |
104 | <configuration> | |
105 | <forkMode>once</forkMode> | |
106 | <reportFormat>plain</reportFormat> | |
107 | <trimStackTrace>false</trimStackTrace> | |
108 | <excludes> | |
109 | <exclude>**/*Test.java</exclude> | |
110 | </excludes> | |
111 | </configuration> | |
112 | </plugin> | |
113 | </plugins> | |
114 | ||
115 | ||
116 | </build> | |
117 | ||
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
3 | ||
4 | <modelVersion>4.0.0</modelVersion> | |
5 | ||
6 | <parent> | |
7 | <groupId>org.slf4j</groupId> | |
8 | <artifactId>slf4j-parent</artifactId> | |
9 | <version>1.7.26</version> | |
10 | </parent> | |
11 | ||
12 | <artifactId>integration</artifactId> | |
13 | <packaging>jar</packaging> | |
14 | <name>SLF4J Integration tests</name> | |
15 | ||
16 | <url>http://www.slf4j.org</url> | |
17 | <description>SLF4J integration tests</description> | |
18 | ||
19 | <dependencies> | |
20 | <dependency> | |
21 | <groupId>org.slf4j</groupId> | |
22 | <artifactId>slf4j-api</artifactId> | |
23 | </dependency> | |
24 | ||
25 | <!-- declaration to circumvent http://jira.codehaus.org/browse/MANTRUN-95 --> | |
26 | <dependency> | |
27 | <groupId>junit</groupId> | |
28 | <artifactId>junit</artifactId> | |
29 | <version>3.8.1</version> | |
30 | </dependency> | |
31 | <!-- declaration to circumvent http://jira.codehaus.org/browse/MANTRUN-95 --> | |
32 | <dependency> | |
33 | <groupId>ant</groupId> | |
34 | <artifactId>ant-junit</artifactId> | |
35 | <version>1.6.5</version> | |
36 | </dependency> | |
37 | ||
38 | <!-- some test run Felix in hosted mode --> | |
39 | <dependency> | |
40 | <groupId>org.apache.felix</groupId> | |
41 | <artifactId>org.apache.felix.main</artifactId> | |
42 | <version>5.6.1</version> | |
43 | <!--<version>2.0.2</version>--> | |
44 | </dependency> | |
45 | </dependencies> | |
46 | ||
47 | <build> | |
48 | <plugins> | |
49 | <plugin> | |
50 | <artifactId>maven-antrun-plugin</artifactId> | |
51 | <version>1.2</version> | |
52 | <dependencies> | |
53 | <dependency> | |
54 | <groupId>junit</groupId> | |
55 | <artifactId>junit</artifactId> | |
56 | <version>3.8.1</version> | |
57 | </dependency> | |
58 | <dependency> | |
59 | <groupId>ant</groupId> | |
60 | <artifactId>ant-junit</artifactId> | |
61 | <version>1.6.5</version> | |
62 | </dependency> | |
63 | </dependencies> | |
64 | <executions> | |
65 | <execution> | |
66 | <id>ant-test</id> | |
67 | <phase>package</phase> | |
68 | <configuration> | |
69 | <tasks> | |
70 | <property name="currentVersion" value="${project.version}"/> | |
71 | <property name="compile_classpath" refid="maven.compile.classpath"/> | |
72 | <property name="runtime_classpath" refid="maven.runtime.classpath"/> | |
73 | <property name="test_classpath" refid="maven.test.classpath"/> | |
74 | <property name="plugin_classpath" refid="maven.plugin.classpath"/> | |
75 | <ant antfile="${basedir}/build.xml"/> | |
76 | </tasks> | |
77 | </configuration> | |
78 | <goals> | |
79 | <goal>run</goal> | |
80 | </goals> | |
81 | </execution> | |
82 | <execution> | |
83 | <id>ant-osgi-test</id> | |
84 | <phase>package</phase> | |
85 | <configuration> | |
86 | <tasks> | |
87 | <property name="currentVersion" value="${project.version}"/> | |
88 | <property name="test_classpath" refid="maven.test.classpath"/> | |
89 | <property name="basedir" value="${basedir}"/> | |
90 | <ant antfile="${basedir}/osgi-build.xml"/> | |
91 | </tasks> | |
92 | </configuration> | |
93 | <goals> | |
94 | <goal>run</goal> | |
95 | </goals> | |
96 | </execution> | |
97 | ||
98 | </executions> | |
99 | </plugin> | |
100 | ||
101 | <plugin> | |
102 | <groupId>org.apache.maven.plugins</groupId> | |
103 | <artifactId>maven-surefire-plugin</artifactId> | |
104 | <configuration> | |
105 | <forkMode>once</forkMode> | |
106 | <reportFormat>plain</reportFormat> | |
107 | <trimStackTrace>false</trimStackTrace> | |
108 | <excludes> | |
109 | <exclude>**/*Test.java</exclude> | |
110 | </excludes> | |
111 | </configuration> | |
112 | </plugin> | |
113 | </plugins> | |
114 | ||
115 | ||
116 | </build> | |
117 | ||
118 | 118 | </project>⏎ |
0 | Manifest-Version: 1.0 | |
1 | Archiver-Version: Plexus Archiver | |
2 | Created-By: Apache Maven | |
3 | Built-By: ceki | |
4 | Build-Jdk: 1.6.0_16 | |
5 | Bundle-Description: iBundle | |
6 | Bundle-Version: 0.1 | |
7 | Bundle-Activator: integrator.Activator | |
8 | Implementation-Title: iBundle | |
9 | Bundle-ManifestVersion: 2 | |
10 | Bundle-SymbolicName: iBundle | |
11 | Bundle-Name: abundle | |
12 | Bundle-RequiredExecutionEnvironment: J2SE-1.5 | |
13 | Export-Package: apack | |
0 | Manifest-Version: 1.0 | |
1 | Archiver-Version: Plexus Archiver | |
2 | Created-By: Apache Maven | |
3 | Built-By: ceki | |
4 | Build-Jdk: 1.6.0_16 | |
5 | Bundle-Description: iBundle | |
6 | Bundle-Version: 0.1 | |
7 | Bundle-Activator: integrator.Activator | |
8 | Implementation-Title: iBundle | |
9 | Bundle-ManifestVersion: 2 | |
10 | Bundle-SymbolicName: iBundle | |
11 | Bundle-Name: abundle | |
12 | Bundle-RequiredExecutionEnvironment: J2SE-1.5 | |
13 | Export-Package: apack | |
14 | 14 | Import-Package: org.osgi.framework, org.slf4j;version=1.5⏎ |
0 | ||
1 | grant { | |
2 | ||
3 | // note that java.lang.RuntimePermission createSecurityManager is NOT granted | |
4 | ||
5 | permission java.util.PropertyPermission "user.dir", "read"; | |
6 | permission java.util.PropertyPermission "*", "read"; | |
7 | ||
8 | permission java.net.SocketPermission "*", "connect,resolve"; | |
0 | ||
1 | grant { | |
2 | ||
3 | // note that java.lang.RuntimePermission createSecurityManager is NOT granted | |
4 | ||
5 | permission java.util.PropertyPermission "user.dir", "read"; | |
6 | permission java.util.PropertyPermission "*", "read"; | |
7 | ||
8 | permission java.net.SocketPermission "*", "connect,resolve"; | |
9 | 9 | };⏎ |
0 | ||
1 | grant { | |
2 | ||
3 | // note that java.lang.RuntimePermission createSecurityManager is NOT granted | |
4 | ||
5 | permission java.util.PropertyPermission "user.dir", "read"; | |
6 | ||
7 | // permissions required for Ant's Junit runner | |
8 | permission java.util.PropertyPermission "*", "read, write"; | |
9 | permission java.io.FilePermission "./-", "read"; | |
10 | permission java.io.FilePermission "./-", "write"; | |
11 | permission java.lang.RuntimePermission "setIO"; | |
0 | ||
1 | grant { | |
2 | ||
3 | // note that java.lang.RuntimePermission createSecurityManager is NOT granted | |
4 | ||
5 | permission java.util.PropertyPermission "user.dir", "read"; | |
6 | ||
7 | // permissions required for Ant's Junit runner | |
8 | permission java.util.PropertyPermission "*", "read, write"; | |
9 | permission java.io.FilePermission "./-", "read"; | |
10 | permission java.io.FilePermission "./-", "write"; | |
11 | permission java.lang.RuntimePermission "setIO"; | |
12 | 12 | };⏎ |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package integrator; | |
25 | ||
26 | import org.osgi.framework.Bundle; | |
27 | import org.osgi.framework.BundleActivator; | |
28 | import org.osgi.framework.BundleContext; | |
29 | import org.slf4j.Logger; | |
30 | import org.slf4j.LoggerFactory; | |
31 | ||
32 | /** | |
33 | * A BundleActivator which invokes slf4j loggers | |
34 | * @author Ceki Gülcü | |
35 | * | |
36 | */ | |
37 | public class Activator implements BundleActivator { | |
38 | ||
39 | private BundleContext m_context = null; | |
40 | ||
41 | public void start(BundleContext context) { | |
42 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
43 | logger.info("Activator.start()"); | |
44 | m_context = context; | |
45 | } | |
46 | ||
47 | public void stop(BundleContext context) { | |
48 | m_context = null; | |
49 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
50 | logger.info("Activator.stop"); | |
51 | } | |
52 | ||
53 | public Bundle[] getBundles() { | |
54 | if (m_context != null) { | |
55 | return m_context.getBundles(); | |
56 | } | |
57 | return null; | |
58 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package integrator; | |
25 | ||
26 | import org.osgi.framework.Bundle; | |
27 | import org.osgi.framework.BundleActivator; | |
28 | import org.osgi.framework.BundleContext; | |
29 | import org.slf4j.Logger; | |
30 | import org.slf4j.LoggerFactory; | |
31 | ||
32 | /** | |
33 | * A BundleActivator which invokes slf4j loggers | |
34 | * @author Ceki Gülcü | |
35 | * | |
36 | */ | |
37 | public class Activator implements BundleActivator { | |
38 | ||
39 | private BundleContext m_context = null; | |
40 | ||
41 | public void start(BundleContext context) { | |
42 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
43 | logger.info("Activator.start()"); | |
44 | m_context = context; | |
45 | } | |
46 | ||
47 | public void stop(BundleContext context) { | |
48 | m_context = null; | |
49 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
50 | logger.info("Activator.stop"); | |
51 | } | |
52 | ||
53 | public Bundle[] getBundles() { | |
54 | if (m_context != null) { | |
55 | return m_context.getBundles(); | |
56 | } | |
57 | return null; | |
58 | } | |
59 | 59 | }⏎ |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | ||
25 | package org.slf4j; | |
26 | ||
27 | import java.io.PrintStream; | |
28 | import java.util.Random; | |
29 | ||
30 | import junit.framework.TestCase; | |
31 | ||
32 | public class CompatibilityAssertionTest extends TestCase { | |
33 | ||
34 | StringPrintStream sps = new StringPrintStream(System.err); | |
35 | PrintStream old = System.err; | |
36 | int diff = 1024 + new Random().nextInt(10000); | |
37 | ||
38 | public CompatibilityAssertionTest(String name) { | |
39 | super(name); | |
40 | } | |
41 | ||
42 | protected void setUp() throws Exception { | |
43 | super.setUp(); | |
44 | System.setErr(sps); | |
45 | } | |
46 | ||
47 | protected void tearDown() throws Exception { | |
48 | super.tearDown(); | |
49 | System.setErr(old); | |
50 | } | |
51 | ||
52 | public void test() throws Exception { | |
53 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
54 | String msg = "hello world " + diff; | |
55 | logger.info(msg); | |
56 | assertEquals(1, sps.stringList.size()); | |
57 | String s0 = (String) sps.stringList.get(0); | |
58 | assertTrue(s0.contains(msg)); | |
59 | } | |
60 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | ||
25 | package org.slf4j; | |
26 | ||
27 | import java.io.PrintStream; | |
28 | import java.util.Random; | |
29 | ||
30 | import junit.framework.TestCase; | |
31 | ||
32 | public class CompatibilityAssertionTest extends TestCase { | |
33 | ||
34 | StringPrintStream sps = new StringPrintStream(System.err); | |
35 | PrintStream old = System.err; | |
36 | int diff = 1024 + new Random().nextInt(10000); | |
37 | ||
38 | public CompatibilityAssertionTest(String name) { | |
39 | super(name); | |
40 | } | |
41 | ||
42 | protected void setUp() throws Exception { | |
43 | super.setUp(); | |
44 | System.setErr(sps); | |
45 | } | |
46 | ||
47 | protected void tearDown() throws Exception { | |
48 | super.tearDown(); | |
49 | System.setErr(old); | |
50 | } | |
51 | ||
52 | public void test() throws Exception { | |
53 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
54 | String msg = "hello world " + diff; | |
55 | logger.info(msg); | |
56 | assertEquals(1, sps.stringList.size()); | |
57 | String s0 = (String) sps.stringList.get(0); | |
58 | assertTrue(s0.contains(msg)); | |
59 | } | |
60 | } |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.List; | |
28 | import java.util.Random; | |
29 | ||
30 | import junit.framework.TestCase; | |
31 | ||
32 | public class IncompatibleMultiBindingAssertionTest extends TestCase { | |
33 | ||
34 | StringPrintStream sps = new StringPrintStream(System.err); | |
35 | PrintStream old = System.err; | |
36 | int diff = 1024 + new Random().nextInt(10000); | |
37 | ||
38 | public IncompatibleMultiBindingAssertionTest(String name) { | |
39 | super(name); | |
40 | } | |
41 | ||
42 | protected void setUp() throws Exception { | |
43 | super.setUp(); | |
44 | System.setErr(sps); | |
45 | } | |
46 | ||
47 | protected void tearDown() throws Exception { | |
48 | super.tearDown(); | |
49 | System.setErr(old); | |
50 | } | |
51 | ||
52 | public void test() throws Exception { | |
53 | try { | |
54 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
55 | String msg = "hello world " + diff; | |
56 | logger.info(msg); | |
57 | fail("was expecting NoSuchMethodError"); | |
58 | } catch (NoSuchMethodError e) { | |
59 | } | |
60 | List<String> list = sps.stringList; | |
61 | assertMsgContains(list, 0, "Class path contains multiple SLF4J bindings."); | |
62 | assertMsgContains(list, 1, "Found binding in"); | |
63 | assertMsgContains(list, 2, "Found binding in"); | |
64 | assertMsgContains(list, 3, "See http://www.slf4j.org/codes.html"); | |
65 | assertMsgContains(list, 4, "slf4j-api 1.6.x (or later) is incompatible with this binding"); | |
66 | assertMsgContains(list, 5, "Your binding is version 1.5.5 or earlier."); | |
67 | ||
68 | } | |
69 | ||
70 | void assertMsgContains(List<String> strList, int index, String msg) { | |
71 | assertTrue(((String) strList.get(index)).contains(msg)); | |
72 | } | |
73 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.List; | |
28 | import java.util.Random; | |
29 | ||
30 | import junit.framework.TestCase; | |
31 | ||
32 | public class IncompatibleMultiBindingAssertionTest extends TestCase { | |
33 | ||
34 | StringPrintStream sps = new StringPrintStream(System.err); | |
35 | PrintStream old = System.err; | |
36 | int diff = 1024 + new Random().nextInt(10000); | |
37 | ||
38 | public IncompatibleMultiBindingAssertionTest(String name) { | |
39 | super(name); | |
40 | } | |
41 | ||
42 | protected void setUp() throws Exception { | |
43 | super.setUp(); | |
44 | System.setErr(sps); | |
45 | } | |
46 | ||
47 | protected void tearDown() throws Exception { | |
48 | super.tearDown(); | |
49 | System.setErr(old); | |
50 | } | |
51 | ||
52 | public void test() throws Exception { | |
53 | try { | |
54 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
55 | String msg = "hello world " + diff; | |
56 | logger.info(msg); | |
57 | fail("was expecting NoSuchMethodError"); | |
58 | } catch (NoSuchMethodError e) { | |
59 | } | |
60 | List<String> list = sps.stringList; | |
61 | assertMsgContains(list, 0, "Class path contains multiple SLF4J bindings."); | |
62 | assertMsgContains(list, 1, "Found binding in"); | |
63 | assertMsgContains(list, 2, "Found binding in"); | |
64 | assertMsgContains(list, 3, "See http://www.slf4j.org/codes.html"); | |
65 | assertMsgContains(list, 4, "slf4j-api 1.6.x (or later) is incompatible with this binding"); | |
66 | assertMsgContains(list, 5, "Your binding is version 1.5.5 or earlier."); | |
67 | ||
68 | } | |
69 | ||
70 | void assertMsgContains(List<String> strList, int index, String msg) { | |
71 | assertTrue(((String) strList.get(index)).contains(msg)); | |
72 | } | |
73 | } |
0 | /** | |
1 | * Copyright (c) 2004-2016 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.Random; | |
28 | ||
29 | import junit.framework.TestCase; | |
30 | ||
31 | public class MissingSingletonMethodAssertionTest extends TestCase { | |
32 | ||
33 | StringPrintStream sps = new StringPrintStream(System.err); | |
34 | PrintStream old = System.err; | |
35 | int diff = 1024 + new Random().nextInt(10000); | |
36 | ||
37 | public MissingSingletonMethodAssertionTest(String name) { | |
38 | super(name); | |
39 | } | |
40 | ||
41 | protected void setUp() throws Exception { | |
42 | super.setUp(); | |
43 | System.setErr(sps); | |
44 | } | |
45 | ||
46 | protected void tearDown() throws Exception { | |
47 | super.tearDown(); | |
48 | System.setErr(old); | |
49 | } | |
50 | ||
51 | public void test() throws Exception { | |
52 | try { | |
53 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
54 | String msg = "hello world " + diff; | |
55 | logger.info(msg); | |
56 | fail("NoSuchMethodError expected"); | |
57 | } catch (NoSuchMethodError e) { | |
58 | } | |
59 | ||
60 | int lineCount = sps.stringList.size(); | |
61 | assertTrue("number of lines should be 3 but was " + lineCount, lineCount == 3); | |
62 | ||
63 | // expected output: | |
64 | // SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding. | |
65 | // SLF4J: Your binding is version 1.4.x or earlier. | |
66 | // SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x | |
67 | ||
68 | { | |
69 | String s = (String) sps.stringList.get(0); | |
70 | assertTrue(s.contains("SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.")); | |
71 | } | |
72 | { | |
73 | String s = (String) sps.stringList.get(1); | |
74 | assertTrue(s.contains("SLF4J: Your binding is version 1.5.5 or earlier.")); | |
75 | } | |
76 | { | |
77 | String s = (String) sps.stringList.get(2); | |
78 | assertTrue(s.contains("SLF4J: Upgrade your binding to version 1.6.x.")); | |
79 | } | |
80 | ||
81 | } | |
82 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2016 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.Random; | |
28 | ||
29 | import junit.framework.TestCase; | |
30 | ||
31 | public class MissingSingletonMethodAssertionTest extends TestCase { | |
32 | ||
33 | StringPrintStream sps = new StringPrintStream(System.err); | |
34 | PrintStream old = System.err; | |
35 | int diff = 1024 + new Random().nextInt(10000); | |
36 | ||
37 | public MissingSingletonMethodAssertionTest(String name) { | |
38 | super(name); | |
39 | } | |
40 | ||
41 | protected void setUp() throws Exception { | |
42 | super.setUp(); | |
43 | System.setErr(sps); | |
44 | } | |
45 | ||
46 | protected void tearDown() throws Exception { | |
47 | super.tearDown(); | |
48 | System.setErr(old); | |
49 | } | |
50 | ||
51 | public void test() throws Exception { | |
52 | try { | |
53 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
54 | String msg = "hello world " + diff; | |
55 | logger.info(msg); | |
56 | fail("NoSuchMethodError expected"); | |
57 | } catch (NoSuchMethodError e) { | |
58 | } | |
59 | ||
60 | int lineCount = sps.stringList.size(); | |
61 | assertTrue("number of lines should be 3 but was " + lineCount, lineCount == 3); | |
62 | ||
63 | // expected output: | |
64 | // SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding. | |
65 | // SLF4J: Your binding is version 1.4.x or earlier. | |
66 | // SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x | |
67 | ||
68 | { | |
69 | String s = (String) sps.stringList.get(0); | |
70 | assertTrue(s.contains("SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.")); | |
71 | } | |
72 | { | |
73 | String s = (String) sps.stringList.get(1); | |
74 | assertTrue(s.contains("SLF4J: Your binding is version 1.5.5 or earlier.")); | |
75 | } | |
76 | { | |
77 | String s = (String) sps.stringList.get(2); | |
78 | assertTrue(s.contains("SLF4J: Upgrade your binding to version 1.6.x.")); | |
79 | } | |
80 | ||
81 | } | |
82 | } |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.List; | |
28 | import java.util.Random; | |
29 | ||
30 | import junit.framework.TestCase; | |
31 | ||
32 | public class MultiBindingAssertionTest extends TestCase { | |
33 | ||
34 | StringPrintStream sps = new StringPrintStream(System.err); | |
35 | PrintStream old = System.err; | |
36 | int diff = 1024 + new Random().nextInt(10000); | |
37 | ||
38 | public MultiBindingAssertionTest(String name) { | |
39 | super(name); | |
40 | } | |
41 | ||
42 | protected void setUp() throws Exception { | |
43 | super.setUp(); | |
44 | System.setErr(sps); | |
45 | } | |
46 | ||
47 | protected void tearDown() throws Exception { | |
48 | super.tearDown(); | |
49 | System.setErr(old); | |
50 | } | |
51 | ||
52 | public void test() throws Exception { | |
53 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
54 | String msg = "hello world " + diff; | |
55 | logger.info(msg); | |
56 | List<String> list = sps.stringList; | |
57 | assertMsgContains(list, 0, "Class path contains multiple SLF4J bindings."); | |
58 | assertMsgContains(list, 1, "Found binding in"); | |
59 | assertMsgContains(list, 2, "Found binding in"); | |
60 | assertMsgContains(list, 3, "See http://www.slf4j.org/codes.html"); | |
61 | assertMsgContains(list, 4, "Actual binding is of type ["); | |
62 | } | |
63 | ||
64 | void assertMsgContains(List<String> strList, int index, String msg) { | |
65 | assertTrue(((String) strList.get(index)).contains(msg)); | |
66 | } | |
67 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.List; | |
28 | import java.util.Random; | |
29 | ||
30 | import junit.framework.TestCase; | |
31 | ||
32 | public class MultiBindingAssertionTest extends TestCase { | |
33 | ||
34 | StringPrintStream sps = new StringPrintStream(System.err); | |
35 | PrintStream old = System.err; | |
36 | int diff = 1024 + new Random().nextInt(10000); | |
37 | ||
38 | public MultiBindingAssertionTest(String name) { | |
39 | super(name); | |
40 | } | |
41 | ||
42 | protected void setUp() throws Exception { | |
43 | super.setUp(); | |
44 | System.setErr(sps); | |
45 | } | |
46 | ||
47 | protected void tearDown() throws Exception { | |
48 | super.tearDown(); | |
49 | System.setErr(old); | |
50 | } | |
51 | ||
52 | public void test() throws Exception { | |
53 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
54 | String msg = "hello world " + diff; | |
55 | logger.info(msg); | |
56 | List<String> list = sps.stringList; | |
57 | assertMsgContains(list, 0, "Class path contains multiple SLF4J bindings."); | |
58 | assertMsgContains(list, 1, "Found binding in"); | |
59 | assertMsgContains(list, 2, "Found binding in"); | |
60 | assertMsgContains(list, 3, "See http://www.slf4j.org/codes.html"); | |
61 | assertMsgContains(list, 4, "Actual binding is of type ["); | |
62 | } | |
63 | ||
64 | void assertMsgContains(List<String> strList, int index, String msg) { | |
65 | assertTrue(((String) strList.get(index)).contains(msg)); | |
66 | } | |
67 | } |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.ArrayList; | |
28 | import java.util.List; | |
29 | ||
30 | public class StringPrintStream extends PrintStream { | |
31 | ||
32 | public static final String LINE_SEP = System.getProperty("line.separator"); | |
33 | PrintStream other; | |
34 | List<String> stringList = new ArrayList<String>(); | |
35 | ||
36 | public StringPrintStream(PrintStream ps) { | |
37 | super(ps); | |
38 | other = ps; | |
39 | } | |
40 | ||
41 | public void print(String s) { | |
42 | other.print(s); | |
43 | stringList.add(s); | |
44 | } | |
45 | ||
46 | public void println(String s) { | |
47 | other.println(s); | |
48 | stringList.add(s); | |
49 | } | |
50 | ||
51 | public void println(Object o) { | |
52 | other.println(o); | |
53 | stringList.add(o.toString()); | |
54 | } | |
55 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.ArrayList; | |
28 | import java.util.List; | |
29 | ||
30 | public class StringPrintStream extends PrintStream { | |
31 | ||
32 | public static final String LINE_SEP = System.getProperty("line.separator"); | |
33 | PrintStream other; | |
34 | List<String> stringList = new ArrayList<String>(); | |
35 | ||
36 | public StringPrintStream(PrintStream ps) { | |
37 | super(ps); | |
38 | other = ps; | |
39 | } | |
40 | ||
41 | public void print(String s) { | |
42 | other.print(s); | |
43 | stringList.add(s); | |
44 | } | |
45 | ||
46 | public void println(String s) { | |
47 | other.println(s); | |
48 | stringList.add(s); | |
49 | } | |
50 | ||
51 | public void println(Object o) { | |
52 | other.println(o); | |
53 | stringList.add(o.toString()); | |
54 | } | |
55 | } |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.Random; | |
28 | ||
29 | import junit.framework.TestCase; | |
30 | ||
31 | public class VersionMismatchAssertionTest extends TestCase { | |
32 | ||
33 | StringPrintStream sps = new StringPrintStream(System.err); | |
34 | PrintStream old = System.err; | |
35 | int diff = 1024 + new Random().nextInt(10000); | |
36 | ||
37 | public VersionMismatchAssertionTest(String name) { | |
38 | super(name); | |
39 | } | |
40 | ||
41 | protected void setUp() throws Exception { | |
42 | super.setUp(); | |
43 | System.setErr(sps); | |
44 | } | |
45 | ||
46 | protected void tearDown() throws Exception { | |
47 | super.tearDown(); | |
48 | System.setErr(old); | |
49 | } | |
50 | ||
51 | public void test() throws Exception { | |
52 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
53 | String msg = "hello world " + diff; | |
54 | logger.info(msg); | |
55 | ||
56 | String s0 = (String) sps.stringList.get(0); | |
57 | assertTrue(s0.matches("SLF4J: The requested version .* by your slf4j binding is not compatible with.*")); | |
58 | ||
59 | String s1 = (String) sps.stringList.get(1); | |
60 | assertTrue(s1.contains(LoggerFactory.VERSION_MISMATCH)); | |
61 | ||
62 | String s2 = (String) sps.stringList.get(2); | |
63 | assertTrue(s2.contains(msg)); | |
64 | ||
65 | } | |
66 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j; | |
25 | ||
26 | import java.io.PrintStream; | |
27 | import java.util.Random; | |
28 | ||
29 | import junit.framework.TestCase; | |
30 | ||
31 | public class VersionMismatchAssertionTest extends TestCase { | |
32 | ||
33 | StringPrintStream sps = new StringPrintStream(System.err); | |
34 | PrintStream old = System.err; | |
35 | int diff = 1024 + new Random().nextInt(10000); | |
36 | ||
37 | public VersionMismatchAssertionTest(String name) { | |
38 | super(name); | |
39 | } | |
40 | ||
41 | protected void setUp() throws Exception { | |
42 | super.setUp(); | |
43 | System.setErr(sps); | |
44 | } | |
45 | ||
46 | protected void tearDown() throws Exception { | |
47 | super.tearDown(); | |
48 | System.setErr(old); | |
49 | } | |
50 | ||
51 | public void test() throws Exception { | |
52 | Logger logger = LoggerFactory.getLogger(this.getClass()); | |
53 | String msg = "hello world " + diff; | |
54 | logger.info(msg); | |
55 | ||
56 | String s0 = (String) sps.stringList.get(0); | |
57 | assertTrue(s0.matches("SLF4J: The requested version .* by your slf4j binding is not compatible with.*")); | |
58 | ||
59 | String s1 = (String) sps.stringList.get(1); | |
60 | assertTrue(s1.contains(LoggerFactory.VERSION_MISMATCH)); | |
61 | ||
62 | String s2 = (String) sps.stringList.get(2); | |
63 | assertTrue(s2.contains(msg)); | |
64 | ||
65 | } | |
66 | } |
0 | package org.slf4j.issues; | |
1 | ||
2 | import org.slf4j.Logger; | |
3 | import org.slf4j.LoggerFactory; | |
4 | ||
5 | import junit.framework.TestCase; | |
6 | ||
7 | public class Issue324Test extends TestCase { | |
8 | ||
9 | public void testLoggerCreationInPresenseOfSecurityManager() { | |
10 | String currentDir = System.getProperty("user.dir"); | |
11 | System.out.println("currentDir:" + currentDir); | |
12 | Logger logger = LoggerFactory.getLogger(Issue324Test.class); | |
13 | logger.debug("hello"); | |
14 | } | |
15 | } | |
0 | package org.slf4j.issues; | |
1 | ||
2 | import org.slf4j.Logger; | |
3 | import org.slf4j.LoggerFactory; | |
4 | ||
5 | import junit.framework.TestCase; | |
6 | ||
7 | public class Issue324Test extends TestCase { | |
8 | ||
9 | public void testLoggerCreationInPresenseOfSecurityManager() { | |
10 | String currentDir = System.getProperty("user.dir"); | |
11 | System.out.println("currentDir:" + currentDir); | |
12 | Logger logger = LoggerFactory.getLogger(Issue324Test.class); | |
13 | logger.debug("hello"); | |
14 | } | |
15 | } |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j.test_osgi; | |
25 | ||
26 | import java.io.File; | |
27 | ||
28 | import junit.framework.TestCase; | |
29 | ||
30 | public class BundleTest extends TestCase { | |
31 | ||
32 | FrameworkErrorListener fel = new FrameworkErrorListener(); | |
33 | CheckingBundleListener mbl = new CheckingBundleListener(); | |
34 | ||
35 | FelixHost felixHost = new FelixHost(fel, mbl); | |
36 | ||
37 | protected void setUp() throws Exception { | |
38 | super.setUp(); | |
39 | felixHost.doLaunch(); | |
40 | } | |
41 | ||
42 | protected void tearDown() throws Exception { | |
43 | super.tearDown(); | |
44 | felixHost.stop(); | |
45 | } | |
46 | ||
47 | public void testSmoke() { | |
48 | System.out.println("===========" + new File(".").getAbsolutePath()); | |
49 | mbl.dumpAll(); | |
50 | // check that the bundle was installed | |
51 | assertTrue(mbl.exists("iBundle")); | |
52 | if (fel.errorList.size() != 0) { | |
53 | fel.dumpAll(); | |
54 | } | |
55 | // check that no errors occured | |
56 | assertEquals(0, fel.errorList.size()); | |
57 | } | |
58 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j.test_osgi; | |
25 | ||
26 | import java.io.File; | |
27 | ||
28 | import junit.framework.TestCase; | |
29 | ||
30 | public class BundleTest extends TestCase { | |
31 | ||
32 | FrameworkErrorListener fel = new FrameworkErrorListener(); | |
33 | CheckingBundleListener mbl = new CheckingBundleListener(); | |
34 | ||
35 | FelixHost felixHost = new FelixHost(fel, mbl); | |
36 | ||
37 | protected void setUp() throws Exception { | |
38 | super.setUp(); | |
39 | felixHost.doLaunch(); | |
40 | } | |
41 | ||
42 | protected void tearDown() throws Exception { | |
43 | super.tearDown(); | |
44 | felixHost.stop(); | |
45 | } | |
46 | ||
47 | public void testSmoke() { | |
48 | System.out.println("===========" + new File(".").getAbsolutePath()); | |
49 | mbl.dumpAll(); | |
50 | // check that the bundle was installed | |
51 | assertTrue(mbl.exists("iBundle")); | |
52 | if (fel.errorList.size() != 0) { | |
53 | fel.dumpAll(); | |
54 | } | |
55 | // check that no errors occured | |
56 | assertEquals(0, fel.errorList.size()); | |
57 | } | |
58 | } |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j.test_osgi; | |
25 | ||
26 | import java.util.ArrayList; | |
27 | import java.util.List; | |
28 | ||
29 | import org.osgi.framework.Bundle; | |
30 | import org.osgi.framework.BundleEvent; | |
31 | import org.osgi.framework.BundleListener; | |
32 | ||
33 | public class CheckingBundleListener implements BundleListener { | |
34 | ||
35 | List<BundleEvent> eventList = new ArrayList<BundleEvent>(); | |
36 | ||
37 | public void bundleChanged(BundleEvent be) { | |
38 | eventList.add(be); | |
39 | } | |
40 | ||
41 | private void dump(BundleEvent be) { | |
42 | System.out.println("BE:" + ", source " + be.getSource() + ", bundle=" + be.getBundle() + ", type=" + be.getType()); | |
43 | ||
44 | } | |
45 | ||
46 | public void dumpAll() { | |
47 | for (int i = 0; i < eventList.size(); i++) { | |
48 | BundleEvent fe = (BundleEvent) eventList.get(i); | |
49 | dump(fe); | |
50 | } | |
51 | } | |
52 | ||
53 | boolean exists(String bundleName) { | |
54 | for (int i = 0; i < eventList.size(); i++) { | |
55 | BundleEvent fe = (BundleEvent) eventList.get(i); | |
56 | Bundle b = fe.getBundle(); | |
57 | System.out.println("===[" + b + "]"); | |
58 | if (bundleName.equals(b.getSymbolicName())) { | |
59 | return true; | |
60 | } | |
61 | } | |
62 | return false; | |
63 | } | |
64 | ||
65 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j.test_osgi; | |
25 | ||
26 | import java.util.ArrayList; | |
27 | import java.util.List; | |
28 | ||
29 | import org.osgi.framework.Bundle; | |
30 | import org.osgi.framework.BundleEvent; | |
31 | import org.osgi.framework.BundleListener; | |
32 | ||
33 | public class CheckingBundleListener implements BundleListener { | |
34 | ||
35 | List<BundleEvent> eventList = new ArrayList<BundleEvent>(); | |
36 | ||
37 | public void bundleChanged(BundleEvent be) { | |
38 | eventList.add(be); | |
39 | } | |
40 | ||
41 | private void dump(BundleEvent be) { | |
42 | System.out.println("BE:" + ", source " + be.getSource() + ", bundle=" + be.getBundle() + ", type=" + be.getType()); | |
43 | ||
44 | } | |
45 | ||
46 | public void dumpAll() { | |
47 | for (int i = 0; i < eventList.size(); i++) { | |
48 | BundleEvent fe = (BundleEvent) eventList.get(i); | |
49 | dump(fe); | |
50 | } | |
51 | } | |
52 | ||
53 | boolean exists(String bundleName) { | |
54 | for (int i = 0; i < eventList.size(); i++) { | |
55 | BundleEvent fe = (BundleEvent) eventList.get(i); | |
56 | Bundle b = fe.getBundle(); | |
57 | System.out.println("===[" + b + "]"); | |
58 | if (bundleName.equals(b.getSymbolicName())) { | |
59 | return true; | |
60 | } | |
61 | } | |
62 | return false; | |
63 | } | |
64 | ||
65 | } |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j.test_osgi; | |
25 | ||
26 | import java.util.ArrayList; | |
27 | import java.util.List; | |
28 | import java.util.Properties; | |
29 | ||
30 | import org.apache.felix.framework.Felix; | |
31 | import org.apache.felix.framework.util.FelixConstants; | |
32 | import org.apache.felix.framework.util.StringMap; | |
33 | import org.apache.felix.main.AutoProcessor; | |
34 | import org.osgi.framework.Bundle; | |
35 | import org.osgi.framework.BundleContext; | |
36 | import org.osgi.framework.BundleException; | |
37 | import org.osgi.framework.Constants; | |
38 | ||
39 | /** | |
40 | * Runs a hosted version of Felix for testing purposes. Any bundle errors are | |
41 | * reported via the FrameworkListener passed to the constructor. | |
42 | * | |
43 | * @author Ceki Gülcü | |
44 | */ | |
45 | public class FelixHost { | |
46 | ||
47 | private Felix felix = null; | |
48 | ||
49 | Properties otherProps = new Properties(); | |
50 | ||
51 | final FrameworkErrorListener frameworkErrorListener; | |
52 | final CheckingBundleListener myBundleListener; | |
53 | ||
54 | public FelixHost(FrameworkErrorListener frameworkErrorListener, CheckingBundleListener myBundleListener) { | |
55 | this.frameworkErrorListener = frameworkErrorListener; | |
56 | this.myBundleListener = myBundleListener; | |
57 | } | |
58 | ||
59 | public void doLaunch() { | |
60 | // Create a case-insensitive configuration property map. | |
61 | StringMap configMap = new StringMap(); | |
62 | // Configure the Felix instance to be embedded. | |
63 | // configMap.put(FelixConstants.EMBEDDED_EXECUTION_PROP, "true"); | |
64 | // Add core OSGi packages to be exported from the class path | |
65 | // via the system bundle. | |
66 | configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES, "org.osgi.framework; version=1.3.0," + "org.osgi.service.packageadmin; version=1.2.0," | |
67 | + "org.osgi.service.startlevel; version=1.0.0," + "org.osgi.service.url; version=1.0.0"); | |
68 | ||
69 | configMap.put(Constants.FRAMEWORK_STORAGE_CLEAN, Constants.FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT); | |
70 | ||
71 | // Explicitly specify the directory to use for caching bundles. | |
72 | // configMap.put(BundleCache.CACHE_PROFILE_DIR_PROP, "cache"); | |
73 | ||
74 | try { | |
75 | // Create host activator; | |
76 | ||
77 | List<Object> list = new ArrayList<Object>(); | |
78 | ||
79 | // list.add(new HostActivator()); | |
80 | configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, "org.xml.sax, org.xml.sax.helpers, javax.xml.parsers, javax.naming"); | |
81 | configMap.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, list); | |
82 | configMap.put("felix.log.level", "4"); | |
83 | ||
84 | // Now create an instance of the framework with | |
85 | // our configuration properties and activator. | |
86 | felix = new Felix(configMap); | |
87 | felix.init(); | |
88 | ||
89 | // otherProps.put(Constants.FRAMEWORK_STORAGE, "bundles"); | |
90 | ||
91 | otherProps.put(AutoProcessor.AUTO_DEPLOY_DIR_PROPERTY, AutoProcessor.AUTO_DEPLOY_DIR_VALUE); | |
92 | otherProps.put(AutoProcessor.AUTO_DEPLOY_ACTION_PROPERTY, AutoProcessor.AUTO_DEPLOY_START_VALUE + "," + AutoProcessor.AUTO_DEPLOY_INSTALL_VALUE); | |
93 | ||
94 | BundleContext felixBudleContext = felix.getBundleContext(); | |
95 | ||
96 | AutoProcessor.process(otherProps, felixBudleContext); | |
97 | // listen to errors | |
98 | felixBudleContext.addFrameworkListener(frameworkErrorListener); | |
99 | felixBudleContext.addBundleListener(myBundleListener); | |
100 | // Now start Felix instance. | |
101 | felix.start(); | |
102 | System.out.println("felix started"); | |
103 | ||
104 | } catch (Exception ex) { | |
105 | ex.printStackTrace(); | |
106 | } | |
107 | } | |
108 | ||
109 | public void stop() throws BundleException { | |
110 | felix.stop(); | |
111 | } | |
112 | ||
113 | public Bundle[] getInstalledBundles() { | |
114 | // Use the system bundle activator to gain external | |
115 | // access to the set of installed bundles. | |
116 | return null;// m_activator.getBundles(); | |
117 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j.test_osgi; | |
25 | ||
26 | import java.util.ArrayList; | |
27 | import java.util.List; | |
28 | import java.util.Properties; | |
29 | ||
30 | import org.apache.felix.framework.Felix; | |
31 | import org.apache.felix.framework.util.FelixConstants; | |
32 | import org.apache.felix.framework.util.StringMap; | |
33 | import org.apache.felix.main.AutoProcessor; | |
34 | import org.osgi.framework.Bundle; | |
35 | import org.osgi.framework.BundleContext; | |
36 | import org.osgi.framework.BundleException; | |
37 | import org.osgi.framework.Constants; | |
38 | ||
39 | /** | |
40 | * Runs a hosted version of Felix for testing purposes. Any bundle errors are | |
41 | * reported via the FrameworkListener passed to the constructor. | |
42 | * | |
43 | * @author Ceki Gülcü | |
44 | */ | |
45 | public class FelixHost { | |
46 | ||
47 | private Felix felix = null; | |
48 | ||
49 | Properties otherProps = new Properties(); | |
50 | ||
51 | final FrameworkErrorListener frameworkErrorListener; | |
52 | final CheckingBundleListener myBundleListener; | |
53 | ||
54 | public FelixHost(FrameworkErrorListener frameworkErrorListener, CheckingBundleListener myBundleListener) { | |
55 | this.frameworkErrorListener = frameworkErrorListener; | |
56 | this.myBundleListener = myBundleListener; | |
57 | } | |
58 | ||
59 | public void doLaunch() { | |
60 | // Create a case-insensitive configuration property map. | |
61 | StringMap configMap = new StringMap(); | |
62 | // Configure the Felix instance to be embedded. | |
63 | // configMap.put(FelixConstants.EMBEDDED_EXECUTION_PROP, "true"); | |
64 | // Add core OSGi packages to be exported from the class path | |
65 | // via the system bundle. | |
66 | configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES, "org.osgi.framework; version=1.3.0," + "org.osgi.service.packageadmin; version=1.2.0," | |
67 | + "org.osgi.service.startlevel; version=1.0.0," + "org.osgi.service.url; version=1.0.0"); | |
68 | ||
69 | configMap.put(Constants.FRAMEWORK_STORAGE_CLEAN, Constants.FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT); | |
70 | ||
71 | // Explicitly specify the directory to use for caching bundles. | |
72 | // configMap.put(BundleCache.CACHE_PROFILE_DIR_PROP, "cache"); | |
73 | ||
74 | try { | |
75 | // Create host activator; | |
76 | ||
77 | List<Object> list = new ArrayList<Object>(); | |
78 | ||
79 | // list.add(new HostActivator()); | |
80 | configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, "org.xml.sax, org.xml.sax.helpers, javax.xml.parsers, javax.naming"); | |
81 | configMap.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, list); | |
82 | configMap.put("felix.log.level", "4"); | |
83 | ||
84 | // Now create an instance of the framework with | |
85 | // our configuration properties and activator. | |
86 | felix = new Felix(configMap); | |
87 | felix.init(); | |
88 | ||
89 | // otherProps.put(Constants.FRAMEWORK_STORAGE, "bundles"); | |
90 | ||
91 | otherProps.put(AutoProcessor.AUTO_DEPLOY_DIR_PROPERTY, AutoProcessor.AUTO_DEPLOY_DIR_VALUE); | |
92 | otherProps.put(AutoProcessor.AUTO_DEPLOY_ACTION_PROPERTY, AutoProcessor.AUTO_DEPLOY_START_VALUE + "," + AutoProcessor.AUTO_DEPLOY_INSTALL_VALUE); | |
93 | ||
94 | BundleContext felixBudleContext = felix.getBundleContext(); | |
95 | ||
96 | AutoProcessor.process(otherProps, felixBudleContext); | |
97 | // listen to errors | |
98 | felixBudleContext.addFrameworkListener(frameworkErrorListener); | |
99 | felixBudleContext.addBundleListener(myBundleListener); | |
100 | // Now start Felix instance. | |
101 | felix.start(); | |
102 | System.out.println("felix started"); | |
103 | ||
104 | } catch (Exception ex) { | |
105 | ex.printStackTrace(); | |
106 | } | |
107 | } | |
108 | ||
109 | public void stop() throws BundleException { | |
110 | felix.stop(); | |
111 | } | |
112 | ||
113 | public Bundle[] getInstalledBundles() { | |
114 | // Use the system bundle activator to gain external | |
115 | // access to the set of installed bundles. | |
116 | return null;// m_activator.getBundles(); | |
117 | } | |
118 | 118 | }⏎ |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j.test_osgi; | |
25 | ||
26 | import java.util.ArrayList; | |
27 | import java.util.List; | |
28 | ||
29 | import org.osgi.framework.FrameworkEvent; | |
30 | import org.osgi.framework.FrameworkListener; | |
31 | ||
32 | public class FrameworkErrorListener implements FrameworkListener { | |
33 | ||
34 | public List<FrameworkEvent> errorList = new ArrayList<FrameworkEvent>(); | |
35 | ||
36 | public void frameworkEvent(FrameworkEvent fe) { | |
37 | if (fe.getType() == FrameworkEvent.ERROR) { | |
38 | errorList.add(fe); | |
39 | ||
40 | } | |
41 | } | |
42 | ||
43 | private void dump(FrameworkEvent fe) { | |
44 | Throwable t = fe.getThrowable(); | |
45 | String tString = null; | |
46 | if (t != null) { | |
47 | tString = t.toString(); | |
48 | } | |
49 | System.out.println("Framework ERROR:" + ", source " + fe.getSource() + ", bundle=" + fe.getBundle() + ", ex=" + tString); | |
50 | if (t != null) { | |
51 | t.printStackTrace(); | |
52 | } | |
53 | } | |
54 | ||
55 | public void dumpAll() { | |
56 | for (int i = 0; i < errorList.size(); i++) { | |
57 | FrameworkEvent fe = (FrameworkEvent) errorList.get(i); | |
58 | dump(fe); | |
59 | } | |
60 | } | |
61 | } | |
0 | /** | |
1 | * Copyright (c) 2004-2011 QOS.ch | |
2 | * All rights reserved. | |
3 | * | |
4 | * Permission is hereby granted, free of charge, to any person obtaining | |
5 | * a copy of this software and associated documentation files (the | |
6 | * "Software"), to deal in the Software without restriction, including | |
7 | * without limitation the rights to use, copy, modify, merge, publish, | |
8 | * distribute, sublicense, and/or sell copies of the Software, and to | |
9 | * permit persons to whom the Software is furnished to do so, subject to | |
10 | * the following conditions: | |
11 | * | |
12 | * The above copyright notice and this permission notice shall be | |
13 | * included in all copies or substantial portions of the Software. | |
14 | * | |
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
22 | * | |
23 | */ | |
24 | package org.slf4j.test_osgi; | |
25 | ||
26 | import java.util.ArrayList; | |
27 | import java.util.List; | |
28 | ||
29 | import org.osgi.framework.FrameworkEvent; | |
30 | import org.osgi.framework.FrameworkListener; | |
31 | ||
32 | public class FrameworkErrorListener implements FrameworkListener { | |
33 | ||
34 | public List<FrameworkEvent> errorList = new ArrayList<FrameworkEvent>(); | |
35 | ||
36 | public void frameworkEvent(FrameworkEvent fe) { | |
37 | if (fe.getType() == FrameworkEvent.ERROR) { | |
38 | errorList.add(fe); | |
39 | ||
40 | } | |
41 | } | |
42 | ||
43 | private void dump(FrameworkEvent fe) { | |
44 | Throwable t = fe.getThrowable(); | |
45 | String tString = null; | |
46 | if (t != null) { | |
47 | tString = t.toString(); | |
48 | } | |
49 | System.out.println("Framework ERROR:" + ", source " + fe.getSource() + ", bundle=" + fe.getBundle() + ", ex=" + tString); | |
50 | if (t != null) { | |
51 | t.printStackTrace(); | |
52 | } | |
53 | } | |
54 | ||
55 | public void dumpAll() { | |
56 | for (int i = 0; i < errorList.size(); i++) { | |
57 | FrameworkEvent fe = (FrameworkEvent) errorList.get(i); | |
58 | dump(fe); | |
59 | } | |
60 | } | |
61 | } |
0 | Apache License | |
1 | Version 2.0, January 2004 | |
2 | http://www.apache.org/licenses/ | |
3 | ||
4 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
5 | ||
6 | 1. Definitions. | |
7 | ||
8 | "License" shall mean the terms and conditions for use, reproduction, | |
9 | and distribution as defined by Sections 1 through 9 of this document. | |
10 | ||
11 | "Licensor" shall mean the copyright owner or entity authorized by | |
12 | the copyright owner that is granting the License. | |
13 | ||
14 | "Legal Entity" shall mean the union of the acting entity and all | |
15 | other entities that control, are controlled by, or are under common | |
16 | control with that entity. For the purposes of this definition, | |
17 | "control" means (i) the power, direct or indirect, to cause the | |
18 | direction or management of such entity, whether by contract or | |
19 | otherwise, or (ii) ownership of fifty percent (50%) or more of the | |
20 | outstanding shares, or (iii) beneficial ownership of such entity. | |
21 | ||
22 | "You" (or "Your") shall mean an individual or Legal Entity | |
23 | exercising permissions granted by this License. | |
24 | ||
25 | "Source" form shall mean the preferred form for making modifications, | |
26 | including but not limited to software source code, documentation | |
27 | source, and configuration files. | |
28 | ||
29 | "Object" form shall mean any form resulting from mechanical | |
30 | transformation or translation of a Source form, including but | |
31 | not limited to compiled object code, generated documentation, | |
32 | and conversions to other media types. | |
33 | ||
34 | "Work" shall mean the work of authorship, whether in Source or | |
35 | Object form, made available under the License, as indicated by a | |
36 | copyright notice that is included in or attached to the work | |
37 | (an example is provided in the Appendix below). | |
38 | ||
39 | "Derivative Works" shall mean any work, whether in Source or Object | |
40 | form, that is based on (or derived from) the Work and for which the | |
41 | editorial revisions, annotations, elaborations, or other modifications | |
42 | represent, as a whole, an original work of authorship. For the purposes | |
43 | of this License, Derivative Works shall not include works that remain | |
44 | separable from, or merely link (or bind by name) to the interfaces of, | |
45 | the Work and Derivative Works thereof. | |
46 | ||
47 | "Contribution" shall mean any work of authorship, including | |
48 | the original version of the Work and any modifications or additions | |
49 | to that Work or Derivative Works thereof, that is intentionally | |
50 | submitted to Licensor for inclusion in the Work by the copyright owner | |
51 | or by an individual or Legal Entity authorized to submit on behalf of | |
52 | the copyright owner. For the purposes of this definition, "submitted" | |
53 | means any form of electronic, verbal, or written communication sent | |
54 | to the Licensor or its representatives, including but not limited to | |
55 | communication on electronic mailing lists, source code control systems, | |
56 | and issue tracking systems that are managed by, or on behalf of, the | |
57 | Licensor for the purpose of discussing and improving the Work, but | |
58 | excluding communication that is conspicuously marked or otherwise | |
59 | designated in writing by the copyright owner as "Not a Contribution." | |
60 | ||
61 | "Contributor" shall mean Licensor and any individual or Legal Entity | |
62 | on behalf of whom a Contribution has been received by Licensor and | |
63 | subsequently incorporated within the Work. | |
64 | ||
65 | 2. Grant of Copyright License. Subject to the terms and conditions of | |
66 | this License, each Contributor hereby grants to You a perpetual, | |
67 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable | |
68 | copyright license to reproduce, prepare Derivative Works of, | |
69 | publicly display, publicly perform, sublicense, and distribute the | |
70 | Work and such Derivative Works in Source or Object form. | |
71 | ||
72 | 3. Grant of Patent License. Subject to the terms and conditions of | |
73 | this License, each Contributor hereby grants to You a perpetual, | |
74 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable | |
75 | (except as stated in this section) patent license to make, have made, | |
76 | use, offer to sell, sell, import, and otherwise transfer the Work, | |
77 | where such license applies only to those patent claims licensable | |
78 | by such Contributor that are necessarily infringed by their | |
79 | Contribution(s) alone or by combination of their Contribution(s) | |
80 | with the Work to which such Contribution(s) was submitted. If You | |
81 | institute patent litigation against any entity (including a | |
82 | cross-claim or counterclaim in a lawsuit) alleging that the Work | |
83 | or a Contribution incorporated within the Work constitutes direct | |
84 | or contributory patent infringement, then any patent licenses | |
85 | granted to You under this License for that Work shall terminate | |
86 | as of the date such litigation is filed. | |
87 | ||
88 | 4. Redistribution. You may reproduce and distribute copies of the | |
89 | Work or Derivative Works thereof in any medium, with or without | |
90 | modifications, and in Source or Object form, provided that You | |
91 | meet the following conditions: | |
92 | ||
93 | (a) You must give any other recipients of the Work or | |
94 | Derivative Works a copy of this License; and | |
95 | ||
96 | (b) You must cause any modified files to carry prominent notices | |
97 | stating that You changed the files; and | |
98 | ||
99 | (c) You must retain, in the Source form of any Derivative Works | |
100 | that You distribute, all copyright, patent, trademark, and | |
101 | attribution notices from the Source form of the Work, | |
102 | excluding those notices that do not pertain to any part of | |
103 | the Derivative Works; and | |
104 | ||
105 | (d) If the Work includes a "NOTICE" text file as part of its | |
106 | distribution, then any Derivative Works that You distribute must | |
107 | include a readable copy of the attribution notices contained | |
108 | within such NOTICE file, excluding those notices that do not | |
109 | pertain to any part of the Derivative Works, in at least one | |
110 | of the following places: within a NOTICE text file distributed | |
111 | as part of the Derivative Works; within the Source form or | |
112 | documentation, if provided along with the Derivative Works; or, | |
113 | within a display generated by the Derivative Works, if and | |
114 | wherever such third-party notices n |