diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..67bd5155b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +.gradle +*.sw? +.#* +*# +/build +.classpath +.project +.settings +bin +build +target diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..d7d0dce8b3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: java + +install: mvn -U install --quiet -DskipTests=true +script: mvn clean test + diff --git a/README.md b/README.md index e69de29bb2..f508a7bb97 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,111 @@ +# Spring Bootstrap +Experimental work based on discussions at SpringOne2GX 2012. See also the 'bootstrap' branch of Spring. + + +## Elevator Pitch +Opinionated view of the Spring family so that new users can quickly get to the 'meat and potatoes'. Assumes no knowledge of the Java development ecosystem. Absolutely no code generation and no XML. + + +## Installing +You need to build from source for now, but when it's done instructions will look like this: + +1) Get Java +Download and install the Java SDK from www.java.com + +2) Get Spring +`curl -s try.springsource.org | bash` or use the Windows installer + +3) Get to Work! +spr run yoursourcefile.groovy + + +## What? It's Groovy then? or like Grails? or another Roo? +There is a command line tool that uses Groovy underneath so that we can present simple snippets that can just run: + + @Controller + class ThisWillActuallyRun { + + @RequestMapping("/") + @ResponseBody + String home() { + return "Hello World!" + } + } + +By inspecting the code for well known annotations we can `@Grab` appropriate dependencies and also dynamically add `import` statements. Groovy makes this really easy. + +If you don't want to use the command line tool, and you would rather work using Java and an IDE you can. Just add a `main()` method that calls `SpringApplication` and add `@EnableAutoConfiguration`: + + import org.springframework.bootstrap.*; + import org.springframework.context.annotation.*; + + @Configuration + @EnableAutoConfiguration + @ComponentScan + public class MyApplication { + + public static void main(String[] args) throws Exception { + SpringApplication.run(MyApplication.class, args); + } + + } + + + import org.springframework.beans.factory.annotation.*; + import org.springframework.stereotype.*; + import org.springframework.web.bind.annotation.*; + + @Controller + public class SampleController { + + @RequestMapping("/") + @ResponseBody + String home() { + return "Hello World!" + } +} + +## Under the hood +There are a number of disparate parts of Bootstrap. Here are the important classes: + +### The Spring CLI +The 'spr' command line application compiles and runs Groovy source, adding `import` statements and `@Grab` annotations. The application can also watch files, automatically recompiling and restarting when they change. + +### SpringApplication +The `SpringApplication` class provides the main entry point for a standalone Spring Application. Its sole job is to create and refresh an appropriate Spring `ApplicationContext`. Any contained beans that implements `CommandLineRunner` will be executed after the context has started. A `SpringApplication` can load beans from a number of different sources, including classes, packages (scanned) or XML files. By default a `AnnotationConfigApplicationContext` or `AnnotationConfigEmbeddedWebApplicationContext` depending on your classpath. + +### EmbeddedWebApplicationContext +The `EmbeddedWebApplicationContext` will probably be part of Spring 4.0. It provides a Spring 'WebApplicationContext' that can bootstrap itself and start and embedded servlet container. Support is provided for Tomcat and Jetty. + +### @EnableAutoConfigure +The `@EnableAutoConfigure` can be used on a `@Configuration` class to trigger auto-configuration of the Spring context. Auto-configuration attempts to guess what beans a user might want based on their classpath. For example, If a 'HSQLDB' is on the classpath the user probably wants an in-memory database to be defined. Auto-configuration will back away as the user starts to define their own beans. + +### @Conditional +The `@Conditional` annotation will probably be part of Spring 4.0. It provides allows `@Configuration` classes to be skipped depending on conditions. Bootstrap provides `@ConditionalOnBean`, `@ConditionalOnMissingBean` and `@ConditionalOnClass` annotations are used when defining auto-configuration classes. + +## Building the code +Use maven to build the source code. + + mvn clean install + +## Importing into eclipse +You can use m2e or `maven eclipse:eclipse`. + +Project specific settings are configured for source formatting. If you are using m2e please follow these steps to install eclipse support: + +* Select `Install new software` from the `help` menu +* Click `Add...` to add a new repository +* Click the `Archive...` button +* Select `org.eclipse.m2e.maveneclipse.site-0.0.1-SNAPSHOT-site.zip` from the `eclipse` folder in this checkout +* Install "Maven Integration for the maven-eclipse-plugin" + +If you prefer you can import settings manually from the `/eclipse` folder. + +## Samples +The following samples are included. To run use `java -jar -full.jar` + +* spring-bootstrap-simple-sample - A simple command line application +* spring-bootstrap-jetty-sample - Embedded Jetty +* spring-bootstrap-tomcat-sample - Embedded Tomcat +* spring-bootstrap-data-sample - Spring Data JPA + Hibernate + HSQLDB + diff --git a/eclipse/eclipse-code-formatter.xml b/eclipse/eclipse-code-formatter.xml new file mode 100644 index 0000000000..8f4b3eb5f3 --- /dev/null +++ b/eclipse/eclipse-code-formatter.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipse/org.eclipse.jdt.core.prefs b/eclipse/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f544b17104 --- /dev/null +++ b/eclipse/org.eclipse.jdt.core.prefs @@ -0,0 +1,385 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=default +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=ignore +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=90 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=8 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=90 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/eclipse/org.eclipse.jdt.ui.prefs b/eclipse/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..ed909fa6ba --- /dev/null +++ b/eclipse/org.eclipse.jdt.ui.prefs @@ -0,0 +1,66 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_Spring Java Conventions +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=false +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com;\#; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=9999 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=9999 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=false +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=true +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=false +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=false +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/eclipse/org.eclipse.m2e.maveneclipse.site-0.0.1-SNAPSHOT-site.zip b/eclipse/org.eclipse.m2e.maveneclipse.site-0.0.1-SNAPSHOT-site.zip new file mode 100644 index 0000000000..b70672321c Binary files /dev/null and b/eclipse/org.eclipse.m2e.maveneclipse.site-0.0.1-SNAPSHOT-site.zip differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000..e62b82e8ec --- /dev/null +++ b/pom.xml @@ -0,0 +1,398 @@ + + + 4.0.0 + org.springframework.bootstrap + spring-bootstrap-parent + 0.0.1-SNAPSHOT + pom + + 3.0.0 + + + spring-bootstrap + spring-bootstrap-service + spring-bootstrap-applications + spring-bootstrap-launcher + spring-bootstrap-samples + spring-bootstrap-cli + + + 1.6 + UTF-8 + 4.0.0.BOOTSTRAP-SNAPSHOT + 1.0.0.CI-SNAPSHOT + ${project.basedir} + + + + spring-snapshots + Spring Snapshots + http://maven.springframework.org/snapshot + + true + + + + + + + + maven-assembly-plugin + 2.4 + + + maven-clean-plugin + 2.5 + + + maven-compiler-plugin + 3.0 + + + maven-deploy-plugin + 2.7 + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + maven-eclipse-plugin + 2.9 + + + maven-failsafe-plugin + 2.13 + + + maven-install-plugin + 2.4 + + + maven-jar-plugin + 2.4 + + + maven-resources-plugin + 2.6 + + + maven-shade-plugin + 2.0 + + + maven-surefire-plugin + 2.13 + + + maven-site-plugin + 3.2 + + + maven-source-plugin + 2.2.1 + + + maven-javadoc-plugin + 2.9 + + + + + + maven-compiler-plugin + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-eclipse-plugin + + false + + + .settings/org.eclipse.jdt.ui.prefs + ${main.basedir}/eclipse/org.eclipse.jdt.ui.prefs + + + .settings/org.eclipse.jdt.core.prefs + ${main.basedir}/eclipse/org.eclipse.jdt.core.prefs + + + + + + maven-javadoc-plugin + + + attach-javadocs + verify + + jar + + + + + + maven-source-plugin + + + attach-sources + verify + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*Tests.java + + + **/Abstract*.java + + junit:junit + + file:/dev/./urandom + + + + + org.codehaus.mojo + versions-maven-plugin + 2.0 + + + + + + + commons-httpclient + commons-httpclient + 3.1 + + + javax.servlet + javax.servlet-api + 3.0.1 + + + javax.persistence + persistence-api + 1.0.2 + + + junit + junit + 4.11 + + + org.slf4j + jcl-over-slf4j + 1.7.2 + + + org.slf4j + slf4j-api + 1.7.2 + + + org.slf4j + slf4j-log4j12 + 1.7.2 + + + org.slf4j + slf4j-jdk14 + 1.7.2 + + + log4j + log4j + 1.2.17 + + + ch.qos.logback + logback-classic + 1.0.7 + + + com.fasterxml.jackson.core + jackson-databind + 2.1.4 + + + com.fasterxml.jackson.core + jackson-core + 2.1.4 + + + org.apache.tomcat.embed + tomcat-embed-core + 7.0.39 + + + org.apache.tomcat.embed + tomcat-embed-logging-juli + 7.0.39 + + + org.apache.tomcat.embed + tomcat-embed-jasper + 7.0.39 + + + org.codehaus.groovy + groovy + 2.1.2 + + + org.eclipse.jetty + jetty-webapp + 8.1.9.v20130131 + + + javax.servlet + org.eclipse.jetty.orbit + + + + + org.eclipse.jetty + jetty-util + 8.1.9.v20130131 + + + org.eclipse.jetty + jetty-jsp + 8.1.9.v20130131 + + + org.hamcrest + hamcrest-library + 1.3 + + + org.hibernate + hibernate-entitymanager + 4.1.9.Final + + + org.hsqldb + hsqldb + 2.2.9 + + + org.mockito + mockito-core + 1.9.5 + + + org.springframework.security + spring-security-javaconfig + ${dependency.security.javaconfig.version} + + + org.springframework + spring-aop + ${dependency.springframework.version} + + + org.springframework + spring-expression + ${dependency.springframework.version} + + + org.springframework + spring-core + ${dependency.springframework.version} + + + commons-logging + commons-logging + + + + + org.springframework + spring-context + ${dependency.springframework.version} + + + org.springframework + spring-web + ${dependency.springframework.version} + + + org.springframework + spring-webmvc + ${dependency.springframework.version} + + + org.springframework + spring-jdbc + ${dependency.springframework.version} + + + org.springframework + spring-orm + ${dependency.springframework.version} + + + org.springframework + spring-test + ${dependency.springframework.version} + + + org.springframework + spring-tx + ${dependency.springframework.version} + + + org.springframework.data + spring-data-jpa + 1.3.0.RELEASE + + + org.springframework + spring-jdbc + + + org.springframework + spring-orm + + + + + org.yaml + snakeyaml + 1.12 + + + + + + junit + junit + test + + + org.mockito + mockito-core + test + + + org.hamcrest + hamcrest-library + test + + + diff --git a/spring-bootstrap-applications/pom.xml b/spring-bootstrap-applications/pom.xml new file mode 100644 index 0000000000..aa7edccbdd --- /dev/null +++ b/spring-bootstrap-applications/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + org.springframework.bootstrap + spring-bootstrap-parent + 0.0.1-SNAPSHOT + + spring-bootstrap-applications + pom + + ${project.basedir}/.. + + + spring-bootstrap-application + spring-bootstrap-batch-application + spring-bootstrap-integration-application + spring-bootstrap-jpa-application + spring-bootstrap-web-application + + diff --git a/spring-bootstrap-applications/spring-bootstrap-application/pom.xml b/spring-bootstrap-applications/spring-bootstrap-application/pom.xml new file mode 100644 index 0000000000..4b3f15c92e --- /dev/null +++ b/spring-bootstrap-applications/spring-bootstrap-application/pom.xml @@ -0,0 +1,28 @@ + + + 4.0.0 + + org.springframework.bootstrap + spring-bootstrap-applications + 0.0.1-SNAPSHOT + + spring-bootstrap-application + jar + + ${project.basedir}/../.. + + + + ${project.groupId} + spring-bootstrap + ${project.version} + runtime + + + org.slf4j + slf4j-jdk14 + runtime + + + diff --git a/spring-bootstrap-applications/spring-bootstrap-batch-application/pom.xml b/spring-bootstrap-applications/spring-bootstrap-batch-application/pom.xml new file mode 100644 index 0000000000..d928b43c37 --- /dev/null +++ b/spring-bootstrap-applications/spring-bootstrap-batch-application/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + org.springframework.bootstrap + spring-bootstrap-applications + 0.0.1-SNAPSHOT + + spring-bootstrap-batch-application + pom + + ${project.basedir}/../.. + + + + ${project.groupId} + spring-bootstrap-application + ${project.version} + pom + + + diff --git a/spring-bootstrap-applications/spring-bootstrap-integration-application/pom.xml b/spring-bootstrap-applications/spring-bootstrap-integration-application/pom.xml new file mode 100644 index 0000000000..b1c3ed41e6 --- /dev/null +++ b/spring-bootstrap-applications/spring-bootstrap-integration-application/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + org.springframework.bootstrap + spring-bootstrap-applications + 0.0.1-SNAPSHOT + + spring-bootstrap-integration-application + pom + + ${project.basedir}/../.. + + + + ${project.groupId} + spring-bootstrap-application + ${project.version} + + + diff --git a/spring-bootstrap-applications/spring-bootstrap-jpa-application/pom.xml b/spring-bootstrap-applications/spring-bootstrap-jpa-application/pom.xml new file mode 100644 index 0000000000..7d45568e47 --- /dev/null +++ b/spring-bootstrap-applications/spring-bootstrap-jpa-application/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + org.springframework.bootstrap + spring-bootstrap-applications + 0.0.1-SNAPSHOT + + spring-bootstrap-jpa-application + pom + + ${project.basedir}/../.. + + + + ${project.groupId} + spring-bootstrap-application + ${project.version} + + + diff --git a/spring-bootstrap-applications/spring-bootstrap-web-application/pom.xml b/spring-bootstrap-applications/spring-bootstrap-web-application/pom.xml new file mode 100644 index 0000000000..0d212d8a7f --- /dev/null +++ b/spring-bootstrap-applications/spring-bootstrap-web-application/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + org.springframework.bootstrap + spring-bootstrap-applications + 0.0.1-SNAPSHOT + + spring-bootstrap-web-application + jar + + ${project.basedir}/../.. + + + + ${project.groupId} + spring-bootstrap-application + ${project.version} + + + org.eclipse.jetty + jetty-webapp + + + org.eclipse.jetty + jetty-util + + + org.springframework + spring-webmvc + + + commons-logging + commons-logging + + + + + javax.servlet + javax.servlet-api + + + diff --git a/spring-bootstrap-cli/dependency-reduced-pom.xml b/spring-bootstrap-cli/dependency-reduced-pom.xml new file mode 100644 index 0000000000..22577eb5a7 --- /dev/null +++ b/spring-bootstrap-cli/dependency-reduced-pom.xml @@ -0,0 +1,127 @@ + + + + spring-bootstrap-parent + org.springframework.bootstrap + 0.0.1-SNAPSHOT + + 4.0.0 + spring-bootstrap-cli + + + + maven-shade-plugin + + + package + + shade + + + + + META-INF/spring.handlers + + + META-INF/spring.factories + + + META-INF/spring.schemas + + + + ${start-class} + + + + + + + + ${project.groupId} + spring-bootstrap + ${project.version} + + + + true + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + maven-assembly-plugin + + + make-distribution + install + + single + + + + false + + + src/main/assembly/descriptor.xml + + + + + + + + junit + junit + 4.11 + test + + + hamcrest-core + org.hamcrest + + + + + org.mockito + mockito-core + 1.9.5 + test + + + objenesis + org.objenesis + + + hamcrest-core + org.hamcrest + + + + + org.hamcrest + hamcrest-library + 1.3 + test + + + hamcrest-core + org.hamcrest + + + + + + ${project.basedir}/.. + org.springframework.bootstrap.cli.SpringBootstrapCli + + + diff --git a/spring-bootstrap-cli/pom.xml b/spring-bootstrap-cli/pom.xml new file mode 100644 index 0000000000..d153b35172 --- /dev/null +++ b/spring-bootstrap-cli/pom.xml @@ -0,0 +1,107 @@ + + + 4.0.0 + + org.springframework.bootstrap + spring-bootstrap-parent + 0.0.1-SNAPSHOT + + spring-bootstrap-cli + jar + + ${project.basedir}/.. + org.springframework.bootstrap.cli.SpringBootstrapCli + + + + + maven-shade-plugin + + + ${project.groupId} + spring-bootstrap + ${project.version} + + + + true + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + package + + shade + + + + + META-INF/spring.handlers + + + META-INF/spring.factories + + + META-INF/spring.schemas + + + + ${start-class} + + + + + + + + maven-assembly-plugin + false + + + src/main/assembly/descriptor.xml + + + + + make-distribution + install + + single + + + + + + + + + org.codehaus.groovy + groovy + + + org.apache.ivy + ivy + 2.3.0 + + + net.sf.jopt-simple + jopt-simple + 4.4 + + + diff --git a/spring-bootstrap-cli/samples/app.groovy b/spring-bootstrap-cli/samples/app.groovy new file mode 100644 index 0000000000..9d2864a4d6 --- /dev/null +++ b/spring-bootstrap-cli/samples/app.groovy @@ -0,0 +1,29 @@ +package org.test + +@GrabResolver(name='spring-milestone', root='http://repo.springframework.org/milestone') +@GrabResolver(name='spring-snapshot', root='http://repo.springframework.org/snapshot') +@Grab("org.springframework.bootstrap:spring-bootstrap:0.0.1-SNAPSHOT") +@Grab("org.springframework:spring-context:4.0.0.BOOTSTRAP-SNAPSHOT") + +@org.springframework.bootstrap.context.annotation.EnableAutoConfiguration +@org.springframework.stereotype.Component +class Example implements org.springframework.bootstrap.CommandLineRunner { + + @org.springframework.beans.factory.annotation.Autowired + private MyService myService; + + public void run(String... args) { + print "Hello " + this.myService.sayWorld(); + } +} + + +@org.springframework.stereotype.Service +class MyService { + + public String sayWorld() { + return "World!"; + } +} + + diff --git a/spring-bootstrap-cli/samples/web.groovy b/spring-bootstrap-cli/samples/web.groovy new file mode 100644 index 0000000000..041e5f60f0 --- /dev/null +++ b/spring-bootstrap-cli/samples/web.groovy @@ -0,0 +1,24 @@ +@org.springframework.bootstrap.context.annotation.EnableAutoConfiguration +@Controller +class Example { + + @Autowired + private MyService myService; + + @RequestMapping("/") + @ResponseBody + public String helloWorld() { + return myService.sayWorld(); + } + +} + +@Service +class MyService { + + public String sayWorld() { + return "World!"; + } +} + + diff --git a/spring-bootstrap-cli/src/main/assembly/descriptor.xml b/spring-bootstrap-cli/src/main/assembly/descriptor.xml new file mode 100644 index 0000000000..e186aba31d --- /dev/null +++ b/spring-bootstrap-cli/src/main/assembly/descriptor.xml @@ -0,0 +1,30 @@ + + dist + + zip + dir + + spring-${project.version} + true + + + src/main/scripts + bin + true + + + src/main/resources + bin + true + true + + + + + + org.springframework.bootstrap:spring-bootstrap-cli:jar:* + + lib + + + diff --git a/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/AbstractCommand.java b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/AbstractCommand.java new file mode 100644 index 0000000000..945b01aff5 --- /dev/null +++ b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/AbstractCommand.java @@ -0,0 +1,81 @@ +/* + * Copyright 2012-2013 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.bootstrap.cli; + +import java.io.IOException; +import java.io.PrintStream; + +/** + * Abstract {@link Command} implementation. + * + * @author Phillip Webb + */ +public abstract class AbstractCommand implements Command { + + private String name; + + private boolean optionCommand; + + private String description; + + /** + * Create a new {@link AbstractCommand} instance. + * @param name the name of the command + * @param description the command description + */ + public AbstractCommand(String name, String description) { + this(name, description, false); + } + + /** + * Create a new {@link AbstractCommand} instance. + * @param name the name of the command + * @param description the command description + * @param optionCommand if this command is an option command (see + * {@link Command#isOptionCommand()} + */ + public AbstractCommand(String name, String description, boolean optionCommand) { + this.name = name; + this.description = description; + this.optionCommand = optionCommand; + } + + @Override + public String getName() { + return this.name; + } + + @Override + public String getDescription() { + return this.description; + } + + @Override + public boolean isOptionCommand() { + return this.optionCommand; + } + + @Override + public String getUsageHelp() { + return null; + } + + @Override + public void printHelp(PrintStream out) throws IOException { + } + +} diff --git a/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/BootstrapCliException.java b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/BootstrapCliException.java new file mode 100644 index 0000000000..f8e59e3194 --- /dev/null +++ b/spring-bootstrap-cli/src/main/java/org/springframework/bootstrap/cli/BootstrapCliException.java @@ -0,0 +1,96 @@ +/* + * Copyright 2012-2013 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.bootstrap.cli; + +import java.util.Arrays; +import java.util.Collections; +import java.util.EnumSet; +import java.util.Set; + +/** + * Runtime exception wrapper that defines additional {@link Option}s that are understood + * by the {@link SpringBootstrapCli}. + * + * @author Phillip Webb + */ +public class BootstrapCliException extends RuntimeException { + + private static final long serialVersionUID = 0L; + + private final EnumSet