Class GenerateCndMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractMetadataPackageMojo
-
- org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractSourceAndMetadataPackageMojo
-
- org.apache.jackrabbit.filevault.maven.packaging.mojo.GenerateCndMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="generate-cnd", defaultPhase=GENERATE_SOURCES, requiresDependencyResolution=COMPILE, threadSafe=true) public class GenerateCndMojo extends AbstractSourceAndMetadataPackageMojo
Generates a CND file containing all used node types and namespaces. It uses the default namespaces and node types and in addition some provided ones as source node type and namespace registry. From those only the ones being really leveraged in the package end up in the generated CND. The generated CND will end up in the package metadata and all contained namespaces and node types are automatically registered during installation (in case they are not yet registered).- Since:
- 1.3.0
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractSourceAndMetadataPackageMojo
addDefaultExcludes, excludes
-
Fields inherited from class org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractMetadataPackageMojo
classifier, outputTimestamp, project
-
-
Constructor Summary
Constructors Constructor Description GenerateCndMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
int
generateCnd(org.apache.jackrabbit.vault.util.StandaloneManagerProvider managerProvider, Path cndOutputFile, Path jcrSourceDirectory)
-
Methods inherited from class org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractSourceAndMetadataPackageMojo
getJcrSourceDirectory, getJcrSourceDirectory
-
Methods inherited from class org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractMetadataPackageMojo
getFirstExistingDirectory, getMetaInfVaultSourceDirectory, getMetaInfVaultSourceDirectory, getProjectRelativeFilePath, getRelativePath, resolveArtifact, setPrefix
-
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
generateCnd
public int generateCnd(org.apache.jackrabbit.vault.util.StandaloneManagerProvider managerProvider, Path cndOutputFile, Path jcrSourceDirectory) throws IOException, javax.jcr.RepositoryException, org.apache.jackrabbit.commons.cnd.ParseException
- Throws:
IOException
javax.jcr.RepositoryException
org.apache.jackrabbit.commons.cnd.ParseException
-
-