o Added @requiresDirectInvocation (was: @cliOnly, but this implies m2 is run from CLI...counter-intuitive for embedding)
o Added handling for new @requiresDirectInvocation (generation/parsing, MojoDescriptor support, etc.)
o Added check in DefaultLifecycleExecutor to throw a LifecycleExecutionException if a mojo specified in a lifecycle binding is marked as direct-invocation only.
o Added MavenProjectHelper/DefaultMavenProjectHelper to provide convenience methods for manipulating MavenProject instances (for example, attaching artifacts or adding resources)
o Removed maven-artifact dependency from maven-source-plugin, and added dependency on maven-plugin-api (should've been there)
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@233021 13f79535-47bb-0310-9956-ffa450edef68
Fixing profile application to separate profiles discovered in and around POM from those in settings.xml, and apply them separately in the order:
for-each-project-in-inheritance:{POM, profiles.xml}, settings.xml
Added common interface for accumulating, explicitly activating and deactivating, and retrieving profiles to be applied to a given project. This manager interface (ProfileManager) is general enough to be applicable to both the project-level and settings-level profiles.
Added 'performRelease'-keyed profile to super-POM which will be used by the release plugin and anyone using a parallel process, and which will enable '-DupdateReleaseInfo=true' for the deploy mojo, along with enabling the source attachment for the project.
Added 'attach' parameter to JarSourceMojo to allow local POM to turn off source attachments, overriding release profile in super-pom.
Updated the release:perform mojo to use '-DperformRelease=true' for switching on the new release profile, rather than just using '-DupdateReleaseInfo=true'...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@233013 13f79535-47bb-0310-9956-ffa450edef68
ear"
Committing on behalf of Stephane Nicoll.
Provides two new flags to customize ear modules:
* excluded ; if set the module is not bundle in the EAR file
* library ; if set the java module is considered as a 3rd party library and no
entry is generated in the application.xml
The patch also update the documentation.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@232833 13f79535-47bb-0310-9956-ffa450edef68
o Improving error messages for ResourceDoesNotExistException in the transformations
o Adding specificity to the dependency validation stuff, to output which dependency is offending...
o Added it1013 to show off the new dependency validation stuff.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@232399 13f79535-47bb-0310-9956-ffa450edef68
Fixed a merge problem where only direct children of <configuration> in the POM
appeared in the merged configuration.
(like maven-antrun-plugin, the 'tasks' configuration tag didn't have any
value, but has children. After the merge, the children were gone,
and it was marked as having no value, and hence the field was not updated.)
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@232281 13f79535-47bb-0310-9956-ffa450edef68
PluginParameterExpressionEvaluator now has two static final Maps - BANNED_EXPRESSIONS and DEPRECATED_EXPRESSIONS, each of which contain mappings of restricted expressions to the preferred alternative.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@232200 13f79535-47bb-0310-9956-ffa450edef68
o Reverted the logic of the DefaultProfileInjector to merge-and-override the model, with the profile being dominant
o Added merging for distributionManagement and modules (conditionally, based on flag) in the modelBase merge
o Refactored the override logic into a couple of methods in ModelUtils to make it easier to understand what's going on here.
o Verified that both the build and the model itself are being merged correctly during profile injection, with profile dominance, but persistence of changes to the model.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@231481 13f79535-47bb-0310-9956-ffa450edef68
and it was obvious: merge code didn't merge the Modules section, and possibly
other sections aswell. Also putting all normal model build info in a profile and
then copying profile data back to the model seemed odd to me. Now only
data from profiles that actually get merged is merged.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@231470 13f79535-47bb-0310-9956-ffa450edef68
sees the plugin and marks it as 'installed' (it's in a hashtable somewhere).
The official way is to go through verifyPlugin. That gets called later on
for that plugin, which only calls addPlugin (that registers, resolves,
and, most importantly, creates a childContainer for that plugin!) IF
the plugin is NOT yet registered.
Since it is registered in the hashtable, but no childRealm was made there,
addPlugin doesn't get called. Added a simple check to ALSO call 'addPlugin'
if it was added to the hashtable. Side effect is that the version that
was normally going to be used is now used and overrides the other version.
This really needs a cleanup!
Committing anyway:
01:26<trygvis> right now I think we're allowed to push over old ladies and
steal candy from small children to get this to work
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@231353 13f79535-47bb-0310-9956-ffa450edef68
o Split profile injection out into its own component away from the defaults assembler
o Moved code common to the defaults assembler and the profile injector into ModelUtils
o Removed the profile-related method from ModelIntheritanceAssembler
o added it0048 to test that profile values will override POM values.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@231294 13f79535-47bb-0310-9956-ffa450edef68
Enjoy! :-)
TODO:
o make <echo>...</echo> output visible.
o devise a way to pass on maven2 properties to <ant/>-called build.xml files.
The ant code just copies all properties from the default PropertyHandler,
however with m2 that's not possible since they are resolved/evaluated at
runtime.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@231230 13f79535-47bb-0310-9956-ffa450edef68
o Modified the PluginMappingDeployMojo in maven-plugin-plugin to always deploy the plugins.xml regardless. This may be a bit heavy, but it avoids the snag with the plugins.xml being detected in the local repository after the install phase runs...plugin mappings weren't making it to the repository during deploy.
o Added a new series of IT: it2xxx which will be tests that require more than a single maven invocation, and will be run via shell script, at least for now. This one builds and deploys a plugin, then attempts to use the plugin by referencing the prefix mapping in the (non-central) remote repository.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@231058 13f79535-47bb-0310-9956-ffa450edef68
Use MavenProject.addResource(..) and .addTestResource(..) to perform this function. I've built a BuildOverlay to insulate the interpolated, initialized Model's Build instance from runtime changes to these, in a similar fashion to addCompileSourceRoots(..), because I wanted to preserve some compat with plugins using ${project.build.resources}.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@230920 13f79535-47bb-0310-9956-ffa450edef68
o Added a check in MavenProject.getArtifacts() to never return null,
but an empty Set, since there's almost no checking.
o Added requiresDependencyResolution test to SurefirePlugin.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@230827 13f79535-47bb-0310-9956-ffa450edef68