| File was renamed from opendj-config-maven-plugin/src/main/java/org/forgerock/opendj/maven/GenerateConfigMojo.java |
| | |
| | | */ |
| | | package org.forgerock.opendj.maven; |
| | | |
| | | import static org.apache.maven.plugins.annotations.LifecyclePhase.*; |
| | | import static org.apache.maven.plugins.annotations.ResolutionScope.*; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileFilter; |
| | | import java.io.FileOutputStream; |
| | |
| | | |
| | | import org.apache.maven.plugin.AbstractMojo; |
| | | import org.apache.maven.plugin.MojoExecutionException; |
| | | import org.apache.maven.plugins.annotations.Mojo; |
| | | import org.apache.maven.plugins.annotations.Parameter; |
| | | import org.apache.maven.project.MavenProject; |
| | | |
| | | /** |
| | |
| | | * config.AbstractManagedObjectDefinition</td> |
| | | * </tr> |
| | | * </table> |
| | | * |
| | | * @Checkstyle:ignoreFor 3 |
| | | * @goal generate |
| | | * @phase generate-sources |
| | | * @requiresDependencyResolution compile+runtime |
| | | */ |
| | | @Mojo(name = "generate-config", defaultPhase = GENERATE_SOURCES, requiresDependencyResolution = COMPILE_PLUS_RUNTIME) |
| | | public final class GenerateConfigMojo extends AbstractMojo { |
| | | private interface StreamSourceFactory { |
| | | StreamSource newStreamSource() throws IOException; |
| | |
| | | |
| | | /** |
| | | * The Maven Project. |
| | | * |
| | | * @parameter property="project" |
| | | * @required |
| | | * @readonly |
| | | */ |
| | | @Parameter(required = true, readonly = true, property = "project") |
| | | private MavenProject project; |
| | | |
| | | /** |
| | |
| | | * <p> |
| | | * This relative path is used to locate xml definition files and to locate |
| | | * generated artifacts. |
| | | * |
| | | * @parameter |
| | | * @required |
| | | */ |
| | | @Parameter(required = true) |
| | | private String packageName; |
| | | |
| | | /** |
| | |
| | | * <p> |
| | | * This relative path is used to locate xml definition files and to locate |
| | | * generated artifacts. |
| | | * |
| | | * @parameter default-value="true" |
| | | * @required |
| | | */ |
| | | @Parameter(required = true, defaultValue = "true") |
| | | private Boolean isExtension; |
| | | |
| | | private final Map<String, StreamSourceFactory> componentDescriptors = |