|
||||
|
CC's Build System Other Information
|
Maven Definitions(see Maven's Glossary):A goal is a task in Maven
terminology.
Usually, goals are specified as an argument to Maven on the command
line, but there are some default goals that may be called by other
goals. Goals are typically available from installed plugins as well as
from scripting in a maven.xml file. Plugins
themselves may have several goals within them. Use the 'maven -g' command to see all goals
available from installed plugins. To see a list of released plugins and
their associated goals and properties, go here.
${project.home} This is the notation for maven
variables. Project.home is the directory where the project.xml file is
and where any project paths are relative to.
project.xml
The project.xml file is the main
build
file that is absolutely necessary to run any maven goals. This file can
be very minimal, using default values when possible. It can inherit
values (extend) of other xml files.
project.properties
The project.properties file is
used to
set required or non-default properties for the project. There is
a hierarchy for properties processing as multiple property files can be
used to override previously set values. The settings in the Maven
User
Guide describe the processing order as:
default values (if any)
${project.home}/project.properties ${project.home}/build.properties ${user.home}/build.properties Command-line options The last existing property
settings
wins. I have also found that when extending a project.xml file, if
there is a project.properties in the same directory as the xml file
that is being inherited, the properties in that project.properties file
will be set after any default values, as long as ther is no
${project.home}/project.properties file.
maven.xml
The maven.xml file is used to
create
customized goals and pre/post goals for ones that already exist. This
file uses Jelly
scripting language to create goals. A maven.xml file in the same
directory as an inherited project.xml file will be used by a project
regardless if there is a ${project.home}/maven.xml file. They both will
be used.
Jelly
Jelly is the xml scripting
language
used by Maven. It is rather easy to use, but the lack of documentation
makes it rather confusing. There are some quirks that make it rather
annoying, such as no if-else branching, rather only choose-when (there
is if statements). Also, many properties are 'dotted', like
${project.home} rather than ${project_home}, but in some cases, the
'dot' syntax will not work, so for internal jelly variables, always try
to avoid any 'dotted' variables. The best way to learn how to program
Jelly scripts is to grab some from the Maven repository and learn by
example.
|
|||
All Contents Copyright
© 2005, The Concord Consortium.
All Rights Reserved. Privacy Policy
Last modified: Tuesday, 07-Jun-2005 14:41:28 EDT