|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MavenPom
Is used for generating a Maven pom file and customizing the generation. To learn about the Maven pom see: http://maven.apache.org/pom.html
Method Summary | |
---|---|
String |
getArtifactId()
Returns the artifact id for this POM. |
ConfigurationContainer |
getConfigurations()
Returns the configuration container used for mapping configurations to maven scopes. |
List<Dependency> |
getDependencies()
Returns the dependencies for this POM. |
MavenPom |
getEffectivePom()
Returns a pom with the generated dependencies and the whenConfigured(org.gradle.api.Action) actions applied. |
String |
getGroupId()
Returns the group id for this POM. |
Model |
getModel()
Returns the underlying native Maven Model object. |
String |
getPackaging()
Returns the packaging for this POM. |
Conf2ScopeMappingContainer |
getScopeMappings()
Returns the scope mappings used for generating this pom. |
String |
getVersion()
Returns the version for this POM. |
MavenPom |
project(Closure pom)
Provides a builder for the Maven pom for adding or modifying properties of the Maven getModel() . |
MavenPom |
setArtifactId(String artifactId)
Sets the artifact id for this POM. |
MavenPom |
setConfigurations(ConfigurationContainer configurations)
Sets the configuration container used for mapping configurations to maven scopes. |
MavenPom |
setDependencies(List<Dependency> dependencies)
Sets the dependencies for this POM. |
MavenPom |
setGroupId(String groupId)
Sets the group id for this POM. |
MavenPom |
setModel(Model model)
Sets the underlying native Maven Model object. |
MavenPom |
setPackaging(String packaging)
Sets the packaging for this POM. |
MavenPom |
setVersion(String version)
Sets the version for this POM. |
MavenPom |
whenConfigured(Action<MavenPom> action)
Adds an action to be called when the pom has been configured. |
MavenPom |
whenConfigured(Closure closure)
Adds a closure to be called when the pom has been configured. |
MavenPom |
withXml(Action<XmlProvider> action)
Adds an action to be called when the POM XML has been created. |
MavenPom |
withXml(Closure closure)
Adds a closure to be called when the POM XML has been created. |
MavenPom |
writeTo(Object path)
Writes the getEffectivePom() xml to a file while applying the withXml(org.gradle.api.Action) actions. |
MavenPom |
writeTo(Writer writer)
Writes the getEffectivePom() xml to a writer while applying the withXml(org.gradle.api.Action) actions. |
Method Detail |
---|
Conf2ScopeMappingContainer getScopeMappings()
MavenPom project(Closure pom)
getModel()
.
The syntax is exactly the same as used by polyglot Maven. For example:
pom.project { inceptionYear '2008' licenses { license { name 'The Apache Software License, Version 2.0' url 'http://www.apache.org/licenses/LICENSE-2.0.txt' distribution 'repo' } } }
pom
-
String getGroupId()
Model.setGroupId(String)
MavenPom setGroupId(String groupId)
Model.getGroupId()
String getArtifactId()
Model.getArtifactId()
MavenPom setArtifactId(String artifactId)
Model.setArtifactId(String)
String getVersion()
Model.getVersion()
MavenPom setVersion(String version)
Model.setVersion(String)
String getPackaging()
Model.getPackaging()
MavenPom setPackaging(String packaging)
Model.setPackaging(String)
MavenPom setDependencies(List<Dependency> dependencies)
ModelBase.setDependencies(java.util.List)
List<Dependency> getDependencies()
ModelBase.getDependencies()
Model getModel()
Model
object. The MavenPom object
delegates all the configuration information to this object. There Gradle MavenPom objects provides
delegation methods just for setting the groupId, artifactId, version and packaging. For all other
elements, either use the model object or project(groovy.lang.Closure)
.
MavenPom setModel(Model model)
Model
object.
model
-
getModel()
MavenPom writeTo(Writer writer)
getEffectivePom()
xml to a writer while applying the withXml(org.gradle.api.Action)
actions.
writer
- The writer to write the pom xml.
MavenPom writeTo(Object path)
getEffectivePom()
xml to a file while applying the withXml(org.gradle.api.Action)
actions.
The path is resolved as defined by Project.files(Object...)
path
- The path of the file to write the pom xml into.
MavenPom whenConfigured(Closure closure)
Adds a closure to be called when the pom has been configured. The pom is passed to the closure as a parameter.
closure
- The closure to execute when the pom has been configured.
MavenPom whenConfigured(Action<MavenPom> action)
Adds an action to be called when the pom has been configured. The pom is passed to the action as a parameter.
action
- The action to execute when the pom has been configured.
MavenPom withXml(Closure closure)
Adds a closure to be called when the POM XML has been created. The XML is passed to the closure as a
parameter in form of a XmlProvider
. The action can modify the XML.
closure
- The closure to execute when the POM XML has been created.
MavenPom withXml(Action<XmlProvider> action)
Adds an action to be called when the POM XML has been created. The XML is passed to the action as a
parameter in form of a XmlProvider
. The action can modify the XML.
action
- The action to execute when the POM XML has been created.
ConfigurationContainer getConfigurations()
MavenPom setConfigurations(ConfigurationContainer configurations)
MavenPom getEffectivePom()
whenConfigured(org.gradle.api.Action)
actions applied.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |