Package org.apache.maven.archetype.model
Class ArchetypeModel
java.lang.Object
org.apache.maven.archetype.model.ArchetypeModel
- All Implemented Interfaces:
java.io.Serializable
public class ArchetypeModel
extends java.lang.Object
implements java.io.Serializable
Describes the assembly layout and packaging.
- Version:
- $Revision$ $Date$
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Setting this option totrue
makes it possible to run thearchetype:create
even on existing projects.private java.lang.String
The value should be the same as the artifactId in the archetypepom.xml
.private java.lang.String
Field modelEncoding.private java.util.List<Resource>
Field resources.private java.util.List<Resource>
Field siteResources.private java.util.List<Source>
Field sources.private java.util.List<Resource>
Field testResources.private java.util.List<Source>
Field testSources. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResource
(Resource resource) Method addResource.void
addSiteResource
(Resource resource) Method addSiteResource.void
Method addSource.void
addTestResource
(Resource resource) Method addTestResource.void
addTestSource
(Source source) Method addTestSource.java.lang.String
getId()
Get the value should be the same as the artifactId in the archetypepom.xml
.java.lang.String
Get the modelEncoding field.java.util.List<Resource>
Method getResources.java.util.List<Resource>
Method getSiteResources.java.util.List<Source>
Method getSources.java.util.List<Resource>
Method getTestResources.java.util.List<Source>
Method getTestSources.boolean
Get setting this option totrue
makes it possible to run thearchetype:create
even on existing projects.void
removeResource
(Resource resource) Method removeResource.void
removeSiteResource
(Resource resource) Method removeSiteResource.void
removeSource
(Source source) Method removeSource.void
removeTestResource
(Resource resource) Method removeTestResource.void
removeTestSource
(Source source) Method removeTestSource.void
setAllowPartial
(boolean allowPartial) Set setting this option totrue
makes it possible to run thearchetype:create
even on existing projects.void
setId
(java.lang.String id) Set the value should be the same as the artifactId in the archetypepom.xml
.void
setModelEncoding
(java.lang.String modelEncoding) Set the modelEncoding field.void
setResources
(java.util.List<Resource> resources) Set files that will go intosrc/main/resources
.void
setSiteResources
(java.util.List<Resource> siteResources) Set files that will go intosrc/site
.void
setSources
(java.util.List<Source> sources) Set files that will go intosrc/main/java
.void
setTestResources
(java.util.List<Resource> testResources) Set files that will go intosrc/test/resources
.void
setTestSources
(java.util.List<Source> testSources) Set files that will go intosrc/test/java
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
id
private java.lang.String idThe value should be the same as the artifactId in the archetypepom.xml
. -
allowPartial
private boolean allowPartialSetting this option totrue
makes it possible to run thearchetype:create
even on existing projects. -
sources
Field sources. -
resources
Field resources. -
testSources
Field testSources. -
testResources
Field testResources. -
siteResources
Field siteResources. -
modelEncoding
private java.lang.String modelEncodingField modelEncoding.
-
-
Constructor Details
-
ArchetypeModel
public ArchetypeModel()
-
-
Method Details
-
addResource
Method addResource.- Parameters:
resource
-
-
addSiteResource
Method addSiteResource.- Parameters:
resource
-
-
addSource
Method addSource.- Parameters:
source
-
-
addTestResource
Method addTestResource.- Parameters:
resource
-
-
addTestSource
Method addTestSource.- Parameters:
source
-
-
getId
public java.lang.String getId()Get the value should be the same as the artifactId in the archetypepom.xml
.- Returns:
- String
-
getModelEncoding
public java.lang.String getModelEncoding()Get the modelEncoding field.- Returns:
- String
-
getResources
Method getResources.- Returns:
- List
-
getSiteResources
Method getSiteResources.- Returns:
- List
-
getSources
Method getSources.- Returns:
- List
-
getTestResources
Method getTestResources.- Returns:
- List
-
getTestSources
Method getTestSources.- Returns:
- List
-
isAllowPartial
public boolean isAllowPartial()Get setting this option totrue
makes it possible to run thearchetype:create
even on existing projects.- Returns:
- boolean
-
removeResource
Method removeResource.- Parameters:
resource
-
-
removeSiteResource
Method removeSiteResource.- Parameters:
resource
-
-
removeSource
Method removeSource.- Parameters:
source
-
-
removeTestResource
Method removeTestResource.- Parameters:
resource
-
-
removeTestSource
Method removeTestSource.- Parameters:
source
-
-
setAllowPartial
public void setAllowPartial(boolean allowPartial) Set setting this option totrue
makes it possible to run thearchetype:create
even on existing projects.- Parameters:
allowPartial
-
-
setId
public void setId(java.lang.String id) Set the value should be the same as the artifactId in the archetypepom.xml
.- Parameters:
id
-
-
setModelEncoding
public void setModelEncoding(java.lang.String modelEncoding) Set the modelEncoding field.- Parameters:
modelEncoding
-
-
setResources
Set files that will go intosrc/main/resources
.- Parameters:
resources
-
-
setSiteResources
Set files that will go intosrc/site
.- Parameters:
siteResources
-
-
setSources
Set files that will go intosrc/main/java
.- Parameters:
sources
-
-
setTestResources
Set files that will go intosrc/test/resources
.- Parameters:
testResources
-
-
setTestSources
Set files that will go intosrc/test/java
.- Parameters:
testSources
-
-