Class GenerateDescriptorMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.karaf.tooling.utils.MojoSupport
-
- org.apache.karaf.tooling.features.GenerateDescriptorMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="features-generate-descriptor", defaultPhase=COMPILE, requiresDependencyResolution=RUNTIME, threadSafe=true) public class GenerateDescriptorMojo extends MojoSupportGenerates the features XML file starting with an optional source feature.xml and adding project dependencies as bundles and feature/car dependencies. NB this requires a recent maven-install-plugin such as 2.3.1
-
-
Field Summary
Fields Modifier and Type Field Description protected DependencyHelperdependencyHelperprotected StringencodingThe character encoding scheme to be applied when filtering resources.protected StringescapeStringExpression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}protected Collection<LocalDependency>localDependenciesprotected org.apache.maven.shared.filtering.MavenFileFiltermavenFileFilterprotected org.apache.maven.shared.filtering.MavenResourcesFilteringmavenResourcesFilteringprotected Map<String,String>systemPropertiesSystem properties.protected StringtreeListing-
Fields inherited from class org.apache.karaf.tooling.utils.MojoSupport
artifactMetadataSource, artifactResolver, factory, localRepo, mavenSession, project, projectBuilder, projectHelper, remoteRepos, workDirectory
-
-
Constructor Summary
Constructors Constructor Description GenerateDescriptorMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()protected voidfilter(File sourceFile, File targetFile)org.apache.maven.plugin.logging.LoggetLog()protected voidsaveDependencyChanges(Collection<org.apache.karaf.features.internal.model.Bundle> addedBundles, Collection<org.apache.karaf.features.internal.model.Bundle> removedBundles, Collection<org.apache.karaf.features.internal.model.Dependency> addedDependencys, Collection<org.apache.karaf.features.internal.model.Dependency> removedDependencys, org.apache.karaf.features.internal.model.ObjectFactory objectFactory)protected StringsaveTreeListing()voidsetLog(org.apache.maven.plugin.logging.Log log)-
Methods inherited from class org.apache.karaf.tooling.utils.MojoSupport
copy, createManagedVersionMap, getLocalRepoUrl, getProject, getProjectHelper, getWorkDirectory, resourceToArtifact, setMavenSession, translateFromMaven
-
-
-
-
Field Detail
-
mavenResourcesFiltering
@Component protected org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering
-
mavenFileFilter
@Component protected org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter
-
localDependencies
protected Collection<LocalDependency> localDependencies
-
treeListing
protected String treeListing
-
dependencyHelper
protected DependencyHelper dependencyHelper
-
encoding
@Parameter(defaultValue="${project.build.sourceEncoding}") protected String encodingThe character encoding scheme to be applied when filtering resources.
-
escapeString
@Parameter(defaultValue="${maven.resources.escapeString}") protected String escapeStringExpression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
setLog
public void setLog(org.apache.maven.plugin.logging.Log log)
- Specified by:
setLogin interfaceorg.apache.maven.plugin.Mojo- Overrides:
setLogin classorg.apache.maven.plugin.AbstractMojo
-
getLog
public org.apache.maven.plugin.logging.Log getLog()
- Specified by:
getLogin interfaceorg.apache.maven.plugin.Mojo- Overrides:
getLogin classorg.apache.maven.plugin.AbstractMojo
-
saveDependencyChanges
protected void saveDependencyChanges(Collection<org.apache.karaf.features.internal.model.Bundle> addedBundles, Collection<org.apache.karaf.features.internal.model.Bundle> removedBundles, Collection<org.apache.karaf.features.internal.model.Dependency> addedDependencys, Collection<org.apache.karaf.features.internal.model.Dependency> removedDependencys, org.apache.karaf.features.internal.model.ObjectFactory objectFactory) throws Exception
- Throws:
Exception
-
filter
protected void filter(File sourceFile, File targetFile) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
saveTreeListing
protected String saveTreeListing() throws IOException
- Throws:
IOException
-
-