Merge pull request #1327 from querydsl/mavenplugin-javadocs

Improve javadocs for querydsl-maven-plugin
This commit is contained in:
Timo Westkämper 2015-05-06 18:31:12 +03:00
commit 89edae0648
12 changed files with 75 additions and 16 deletions

View File

@ -33,35 +33,45 @@ import com.querydsl.codegen.Serializer;
import com.querydsl.codegen.TypeMappings;
/**
* AbstractExporterMojo calls the {@link GenericExporter} tool using the
* classpath of the module the plugin is invoked in.
* {@code AbstractExporterMojo} calls {@link GenericExporter} using the
* classpath of the module in which the plugin is invoked.
*
*/
public abstract class AbstractExporterMojo extends AbstractMojo {
/**
* target folder for sources
*
* @parameter
* @required
*/
private File targetFolder;
/**
* switch for scala source generation
*
* @parameter default-value=false
*/
private boolean scala;
/**
* packages to be exported
*
* @parameter
* @required
*/
private String[] packages;
/**
* switch for inspecting fields
*
* @parameter default-value=true
*/
private boolean handleFields = true;
/**
* switch for inspecting getters
*
* @parameter default-value=true
*/
private boolean handleMethods = true;
@ -73,11 +83,15 @@ public abstract class AbstractExporterMojo extends AbstractMojo {
private MavenProject project;
/**
* source file encoding
*
* @parameter
*/
private String sourceEncoding;
/**
* test classpath usage switch
*
* @parameter default-value=false
*/
private boolean testClasspath;
@ -96,8 +110,8 @@ public abstract class AbstractExporterMojo extends AbstractMojo {
project.addCompileSourceRoot(targetFolder.getAbsolutePath());
}
if (!hasSourceChanges()) {
// Only run if something has changed on the source dirs. This will
// avoid m2e entering on a infinite build.
// Only run if something has changed in the source directories. This will
// prevent m2e from entering an infinite build cycle.
return;
}

View File

@ -32,7 +32,7 @@ import com.querydsl.sql.codegen.*;
import com.querydsl.sql.types.Type;
/**
* MetaDataExportMojo is a goal for MetaDataExporter usage
* {@code AbstractMetaDataExportMojo} is the base class for {@link MetaDataExporter} usage
*
* @author tiwe
*/
@ -139,11 +139,15 @@ public class AbstractMetaDataExportMojo extends AbstractMojo{
private String namingStrategyClass;
/**
* name for bean serializer class
*
* @parameter
*/
private String beanSerializerClass;
/**
* name for serializer class
*
* @parameter
*/
private String serializerClass;
@ -156,21 +160,29 @@ public class AbstractMetaDataExportMojo extends AbstractMojo{
private boolean exportBeans;
/**
* additional interfaces to be implemented by beans
*
* @parameter
*/
private String[] beanInterfaces;
/**
* switch for {@code toString} addition
*
* @parameter default-value=false
*/
private boolean beanAddToString;
/**
* switch for full constructor addition
*
* @parameter default-value=false
*/
private boolean beanAddFullConstructor;
/**
* switch to print supertype content
*
* @parameter default-value=false
*/
private boolean beanPrintSupertype;
@ -197,61 +209,86 @@ public class AbstractMetaDataExportMojo extends AbstractMojo{
private boolean columnAnnotations;
/**
* custom type classnames to use
*
* @parameter
*/
private String[] customTypes;
/**
* custom type mappings to use
*
* @parameter
*/
private TypeMapping[] typeMappings;
/**
* custom numeric mappings
*
* @parameter
*/
private NumericMapping[] numericMappings;
/**
* custom rename mappings
*
* @parameter
*/
private RenameMapping[] renameMappings;
/**
* switch for generating scala sources
*
* @parameter default-value=false
*/
private boolean createScalaSources;
/**
* switch for using schema as suffix in package generation, full package name will be
* {@code ${packageName}.${schema}}
*
* @parameter default-value=false
*/
private boolean schemaToPackage;
/**
* switch to normalize schema, table and column names to lowercase
*
* @parameter default-value=false
*/
private boolean lowerCase;
/**
* switch to export tables
*
* @parameter default-value=true
*/
private boolean exportTables;
/**
* switch to export views
*
* @parameter default-value=true
*/
private boolean exportViews;
/**
* switch to export all types
*
* @parameter default-value=false
*/
private boolean exportAll;
/**
* switch to export primary keys
*
* @parameter default-value=true
*/
private boolean exportPrimaryKeys;
/**
* switch to export foreign keys
*
* @parameter default-value=true
*/
private boolean exportForeignKeys;
@ -264,6 +301,8 @@ public class AbstractMetaDataExportMojo extends AbstractMojo{
private String columnComparatorClass;
/**
* switch to enable spatial type support
*
* @parameter default-value=false
*/
private boolean spatial;

View File

@ -36,7 +36,7 @@ import org.codehaus.plexus.util.Scanner;
import org.sonatype.plexus.build.incremental.BuildContext;
/**
* CompilerMojo compiles the sources generated in the other tasks
* {@code CompileMojo} compiles the sources generated by other tasks
*
* @goal compile
* @requiresDependencyResolution test

View File

@ -13,8 +13,10 @@
*/
package com.querydsl.maven;
import com.querydsl.codegen.GenericExporter;
/**
* GenericExporterMojo calls the GenericExporter tool using the classpath of the module
* {@code GenericExporterMojo} calls {@link GenericExporter} using the classpath of the module
*
* @goal generic-export
* @requiresDependencyResolution test

View File

@ -21,7 +21,7 @@ import javax.persistence.Embedded;
import com.querydsl.codegen.GenericExporter;
/**
* JDOExporterMojo calls the GenericExporter tool using the classpath of the module
* {@code JDOExporterMojo} calls {@link GenericExporter} using the classpath of the module
*
* @goal jdo-export
* @requiresDependencyResolution test

View File

@ -22,8 +22,7 @@ import javax.persistence.Transient;
import com.querydsl.codegen.GenericExporter;
/**
* JPAExporterMojo calls the GenericExporter tool using the classpath of the
* module
* {@code JPAExporterMojo} calls {@link GenericExporter} using the classpath of the module
*
* @goal jpa-export
* @requiresDependencyResolution test

View File

@ -19,7 +19,7 @@ import java.lang.annotation.Annotation;
import javax.persistence.Temporal;
/**
* A {@link AnnotationHelper} that handles JPA {@link Temporal} annotation.
* An {@link AnnotationHelper} that handles JPA {@link Temporal} annotation.
*
* @author dyorgio
*/

View File

@ -13,8 +13,11 @@
*/
package com.querydsl.maven;
import com.querydsl.sql.codegen.MetaDataExporter;
/**
* MetadataExportMojo is a goal for MetaDataExporter usage and is bound to the generate-sources phased
* {@code MetadataExportMojo} is a goal for {@link MetaDataExporter} execution.
* It is executed by default in the {@code generate-sources} phase.
*
* @phase generate-sources
* @goal export

View File

@ -16,7 +16,7 @@ package com.querydsl.maven;
import com.querydsl.sql.Configuration;
/**
* {@linkplain NumericMapping} is used to customize mappings of various numeric precisions to data types.
* {@code NumericMapping} customizes mappings of various numeric precisions to data types.
*
* @author tiwe
*

View File

@ -17,7 +17,7 @@ import com.google.common.collect.ImmutableList;
import com.querydsl.sql.Configuration;
/**
* {@linkplain RenameMapping} is used to override schemas, tables, columns and combinations of the three.
* {@code RenameMapping} overrides schemas, tables, columns and combinations of the three.
*
* @author tiwe
*/

View File

@ -13,8 +13,10 @@
*/
package com.querydsl.maven;
import com.querydsl.sql.codegen.MetaDataExporter;
/**
* TestMetadataExportMojo is a goal for MetaDataExporter usage and is bound to the generated-sources phase
* {@code TestMetadataExportMojo} is a goal for {@link MetaDataExporter} usage and is bound to the generated-sources phase
*
* @phase generate-sources
* @goal test-export

View File

@ -17,7 +17,7 @@ import com.querydsl.sql.Configuration;
import com.querydsl.sql.types.Type;
/**
* {@linkplain TypeMapping} is used to customize the mapping from table + column to a type.
* {@code TypeMapping} customizes the mapping from table + column to a type.
*
* @author tiwe
*