Add javadoc and sources generation

This commit is contained in:
Eric Bottard
2017-08-10 12:19:32 +02:00
parent 8753aa96b1
commit a4ff679e76
4 changed files with 41 additions and 2 deletions

29
pom.xml
View File

@@ -107,6 +107,35 @@
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<executions>
<execution>
<id>javadoc</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<quiet>true</quiet>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>

View File

@@ -42,6 +42,7 @@ public @interface ShellComponent {
/**
* Used to indicate a suggestion for a logical name for the component.
* @return the suggested component name, if any
*/
String value() default "";
}

View File

@@ -36,17 +36,20 @@ public @interface ShellMethod {
/**
* The name(s) by which this method can be invoked via Spring Shell. If not specified, the actual method name
* will be used (turning camelCase humps into "-").
* @return explicit command name(s) to use
*/
String[] key() default {};
/**
* A description for the command. Should not contain any formatting (e.g. html) characters and would typically
* start with a capital letter and end with a dot.
* @return short description of what the command does
*/
String value() default "";
/**
* The prefix to use for assigning parameters by name.
* @return prefix to use when not specified as part of the parameter annotation
*/
String prefix() default "--";

View File

@@ -43,24 +43,29 @@ public @interface ShellOption {
int ARITY_USE_HEURISTICS = -1;
/**
* The key(s) (without the {@link ShellMethod#prefix()}) by which this parameter can be referenced
* when using named parameters. If none is specified, the actual method parameter name will be used.
* The key(s) by which this parameter can be referenced
* when using named parameters. If none is specified, the actual method parameter name will be used, prefixed by the
* method {@link ShellMethod#prefix()}.
* @return explicit key(s) to use to pass a value for this parameter
*/
String[] value() default {};
/**
* Return the number of input "words" this parameter consumes. Default is 1, except when parameter type is boolean,
* in which case it is 0.
* @return the number of words to map to this parameter
*/
int arity() default ARITY_USE_HEURISTICS;
/**
* The textual (pre-conversion) value to assign to this parameter if no value is provided by the user.
* @return the default value for this parameter
*/
String defaultValue() default NONE;
/**
* Return a short description of the parameter.
* @return description of the parameter
*/
String help() default "";
@@ -71,6 +76,7 @@ public @interface ShellOption {
* {@link StandardParameterResolver}. This is useful if several implementations of
* {@link org.springframework.shell.ParameterResolver} are present, given that the standard one can work with no
* annotation at all.
* @return true to indicate that the {@link StandardParameterResolver} should not be used for this parameter
*/
boolean optOut() default false;