org.ops4j.pax.construct.clone
Class ArchetypeFragment

java.lang.Object
  extended by org.ops4j.pax.construct.clone.ArchetypeFragment

public class ArchetypeFragment
extends java.lang.Object

Support creation of simple archetype fragments


Constructor Summary
ArchetypeFragment(java.io.File tempDir, java.lang.String namespace, boolean unify)
          Create a new archetype fragment
 
Method Summary
 void addPom(java.io.File projectDir, PomUtils.Pom pom)
          Add primary Maven project POM
 void addResources(java.io.File projectDir, java.lang.String path, boolean isTest)
          Add collection of resource files
 void addResources(java.io.File projectDir, java.lang.String path, java.util.List includes, java.util.List excludes, boolean isTest)
          Add collection of resource files
 void addSources(java.io.File projectDir, java.lang.String path, boolean isTest)
          Add collection of source files
 void createArchive(java.lang.String fragmentId, org.codehaus.plexus.archiver.Archiver archiver)
          Create archive of archetype fragment
 java.util.List getIncludedFiles()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchetypeFragment

public ArchetypeFragment(java.io.File tempDir,
                         java.lang.String namespace,
                         boolean unify)
Create a new archetype fragment

Parameters:
tempDir - some temporary directory
namespace - primary namespace, may be null
unify - set true when unifying Maven projects
Method Detail

addPom

public void addPom(java.io.File projectDir,
                   PomUtils.Pom pom)
Add primary Maven project POM

Parameters:
projectDir - project directory
pom - customized Maven project model

addSources

public void addSources(java.io.File projectDir,
                       java.lang.String path,
                       boolean isTest)
Add collection of source files

Parameters:
projectDir - project directory
path - source location
isTest - true if these are test sources, otherwise false

addResources

public void addResources(java.io.File projectDir,
                         java.lang.String path,
                         boolean isTest)
Add collection of resource files

Parameters:
projectDir - project directory
path - resource location
isTest - true if these are test resources, otherwise false

addResources

public void addResources(java.io.File projectDir,
                         java.lang.String path,
                         java.util.List includes,
                         java.util.List excludes,
                         boolean isTest)
Add collection of resource files

Parameters:
projectDir - project directory
path - resource location
includes - list of included names
excludes - list of excluded names
isTest - true if these are test resources, otherwise false

createArchive

public void createArchive(java.lang.String fragmentId,
                          org.codehaus.plexus.archiver.Archiver archiver)
                   throws org.apache.maven.plugin.MojoExecutionException
Create archive of archetype fragment

Parameters:
fragmentId - unique archetype identifier
archiver - Jar archiver
Throws:
org.apache.maven.plugin.MojoExecutionException

getIncludedFiles

public java.util.List getIncludedFiles()
Returns:
list of filenames included in this fragment


Copyright © 2007-2008 OPS4J. All Rights Reserved.