Commit Graph

51 Commits

Author SHA1 Message Date
Kenney Westerhof d396f24642 o Put all m2 core dependencies (plexus-container-default and plexus-utils)
under dependencyManagement of m2 and maven-plugins, and removed
  versions in all poms having either as a parent.
  Used version 1.0.2-SNAPSHOT for plexus-utils as that was used in maven-core
  and is not overridable.

o Bumped maven-archiver version to 2.0-beta-1-SNAPSHOT for maven-ear-plugin


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@227084 13f79535-47bb-0310-9956-ffa450edef68
2005-08-02 21:34:54 +00:00
John Dennis Casey 9d6ba0d633 Working on MNG-250...
Resolving MNG-488

o Brought the metadata tags for marmalade mojos up to snuff with the java-mojo annotations
o Added @aggregator annotation ( <aggregator>true</aggregator> in marmalade) for mojos
o Added support for aggregator flag throughout plugin-descriptor, generator, and builder.

More commits to follow...


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@226329 13f79535-47bb-0310-9956-ffa450edef68
2005-07-29 03:04:38 +00:00
John Dennis Casey 701ef520a3 Working on MNG-607
o Changed MavenMetadataSource to a component, to avoid having to lookup artifactFactory and projectBuilder in order to 
  construct it.

o Added add(..) method to ScmBean in the release plugin to allow addition of release-pom.xml

o Changed the PrepareReleaseMojo to resolve ONLY version and parent-version for the normal pom.xml, and fully resolve all
  artifacts used in the release-pom.xml, including version, parent-version, dependency closure (given by project.getArtifacts()), plugins, and reports. It will then add the release-pom.xml, and (attempt to) delete it before performing the final commit for next development version.

o Added some mapping methods to ArtifactUtils, to key by artifact.getId, and to create an Artifact.getId()-compatible string from parameters.

o Added TestProjectBuilder to remove the requirement in ProjectClasspathTest to modify the fields of the project builder directly.

o Cleaned up the AbstractReleaseMojo and PrepareReleaseMojo to avoid container lookups...they're now mojo parameters with the 'component.' prefix.

NOTE: Next step is to figure out how to use maven-scm to remove an SCM resource, to enable the prepare mojo to take the release-pom.xml back out of HEAD after the tag is complete.



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@224413 13f79535-47bb-0310-9956-ffa450edef68
2005-07-22 22:07:28 +00:00
Brett Leslie Porter a4343cf767 PR: MNG-625
allow a plugin to specify the minimum Maven version (will apply for both building and its execution - this should be separated later).

If you are running an older version then it will not prompt to update when found, and will fail if it is encountered with a hardcoded version.



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@220239 13f79535-47bb-0310-9956-ffa450edef68
2005-07-22 05:07:47 +00:00
Brett Leslie Porter 511af3d3e2 PR: MNG-596
add XSD definition to m2 poms and archetypes



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@220079 13f79535-47bb-0310-9956-ffa450edef68
2005-07-21 13:58:42 +00:00
Brett Leslie Porter 810d4a3276 PR: MNG-505
artifact refactoring to facilitate version ranges



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219616 13f79535-47bb-0310-9956-ffa450edef68
2005-07-19 05:04:39 +00:00
John Dennis Casey 2c80da6ba4 Resolving: MNG-482
To use the new artifact map for either the project or the current plugin from your mojo, simply use one of the following expressions:

  ${plugin.artifactMap}
  ${project.artifactMap}

The artifacts in these maps are keyed using org.apache.maven.artifact.ArtifactUtils.versionlessKey( String groupId, String artifactId ) (found in the maven-artifact project).



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219234 13f79535-47bb-0310-9956-ffa450edef68
2005-07-15 19:04:20 +00:00
Emmanuel Venisse cfc55f7a52 Fix bad test.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@208710 13f79535-47bb-0310-9956-ffa450edef68
2005-07-01 04:53:10 +00:00
Emmanuel Venisse b44ec86d40 [MNG-541]. Fix NullPointerException when mojo doesn't have parameters.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@202502 13f79535-47bb-0310-9956-ffa450edef68
2005-06-30 07:53:20 +00:00
Emmanuel Venisse a029d766ce Update all versions to beta-1-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@202001 13f79535-47bb-0310-9956-ffa450edef68
2005-06-27 15:29:14 +00:00
John Dennis Casey fcbc5e7d6f Resolving: MNG-495
o Pressing [ENTER] at a plugin update prompt should result in the plugin being registered, as indicated by the prompt.
o Use CLI switch '--no-plugin-updates' to suppress usage of the plugin registry
o Use CLI switch '--update-plugins' to force updated/resolved plugin versions to be registered
o Neither of these has a short CLI option, since we're starting to run out of sensible char options for these types of things.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@193082 13f79535-47bb-0310-9956-ffa450edef68
2005-06-23 06:03:10 +00:00
John Dennis Casey 6100b37321 Updating non-maven, non-modello deps to get rid of snapshots. Also removed marmalade stuff from mboot.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@193052 13f79535-47bb-0310-9956-ffa450edef68
2005-06-23 02:31:28 +00:00
Brett Leslie Porter 26d36d8959 PR: MNG-140
split artifact impl from api so that dep resolution can be used independently of wagon
only the first step in making maven-artifact more useful as a public api - more changes to be made


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191634 13f79535-47bb-0310-9956-ffa450edef68
2005-06-21 06:49:49 +00:00
Brett Leslie Porter 8dec28247b PR: MNG-471
implemented cloned lifecycle, project and tests. update mojos accordingly


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191476 13f79535-47bb-0310-9956-ffa450edef68
2005-06-20 14:42:56 +00:00
Brett Leslie Porter 543189e2fd PR: MNG-471
- correct the lifecycle instantiation
- read/write executeLifecycle in the plugin descriptor


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191416 13f79535-47bb-0310-9956-ffa450edef68
2005-06-20 08:00:53 +00:00
Brett Leslie Porter dbcdd0b526 PR: MNG-471
add @execute phase|lifecycle doclet tag for java and beanshell
not sure how this would be configured for marmalade - will leave this for a once over of marmalade wrt the mojo api later


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191385 13f79535-47bb-0310-9956-ffa450edef68
2005-06-20 03:39:42 +00:00
Brett Leslie Porter 4e42fdf78e PR: MNG-471
add lifecycle mapping model


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191380 13f79535-47bb-0310-9956-ffa450edef68
2005-06-20 03:17:43 +00:00
Brett Leslie Porter a9f174c834 Clean up of the lifecycle executor, simplify configuration and push back into the plugin manager.
This fixed a couple of bugs along the way.

One change that this has brought to bear from the document is you now must specify a goal for it to be bound to the LC
(see it0008)


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191285 13f79535-47bb-0310-9956-ffa450edef68
2005-06-18 13:01:26 +00:00
John Dennis Casey a55fd04696 o Adding ${plugin.*} expression support for mojos. Specifically, added support for ${plugin.artifacts} to retrieve the plugin's classpath artifacts. NOTE: There may be artifacts which are FILTERED by the resolution process, since they are provided in the maven distro. NOT SURE HOW BEST TO RESOLVE THAT...but it'll cause problems with people forking certain mojos, undoubtedly.
May resolve: MNG-455



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@190413 13f79535-47bb-0310-9956-ffa450edef68
2005-06-13 14:49:49 +00:00
John Dennis Casey d2e1f3c975 o Adding support for <executions/>, which means multiple runs of the same goal/set-of-goals with different configs.
o Adding @phase declarations for those mojos that seem to be part of the main build, just for completeness
o Added two ITs, to test that <executions/> doesn't mess up the normal operation, and to test multi-execution for a goal.

Should resolve: MNG-172.



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@190335 13f79535-47bb-0310-9956-ffa450edef68
2005-06-13 02:47:57 +00:00
Brett Leslie Porter a48cfef4eb PR: MNG-423
move default value into configuration, rather than relying on Java. More convenient for other languages, and allows us to validate/document it. Cleaned up the plugin manager handling. More should be pushed into plexus proper.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@188647 13f79535-47bb-0310-9956-ffa450edef68
2005-06-07 01:13:52 +00:00
John Dennis Casey a96a03d0a0 o Removed dependency on plexus-container-artifact, using nested DefaultPlexusContainer instances instead for plugin isolation.
o Moved marmalade support dependencies out of maven-core, since they can be supported on demand now
o changed the ordering of the ant and assembly plugins, to show that the classloader (plugin param) bug is fixed.
o added a method in PluginDescriptor which is similar to o.a.m.model.Plugin.getId() (I think that's the method; it's the one that results in a key of 'g:a')
o moved wagon-ssh dependency into maven-core, since there is a new issue related to nested containers and wagons which are introduced as plugin dependencies. This should be solved using a mechanism similar to plugin-manager for wagon-manager impl in future anyway

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@187639 13f79535-47bb-0310-9956-ffa450edef68
2005-06-07 00:37:01 +00:00
John Dennis Casey 6ea3096434 added back processing of isolatedRealm
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@179464 13f79535-47bb-0310-9956-ffa450edef68
2005-06-01 23:53:06 +00:00
John Dennis Casey 3d003af361 o Removed the isolatedRealm attribute of PluginDescriptor...it's a duplication of the superClass isolatedRealm field.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@179456 13f79535-47bb-0310-9956-ffa450edef68
2005-06-01 23:17:43 +00:00
Emmanuel Venisse 4e6b33d359 o upgrade plexus-container to alpha-4-SNAPSHOT
o upgrade plexus-utils to alpha-3 until xpp stuff is fix in 1.0.0

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@179122 13f79535-47bb-0310-9956-ffa450edef68
2005-05-30 18:24:32 +00:00
John Dennis Casey fda1ed95c9 o changed the inheritanceApplied flag to be set by default, and unset if the plugin is merged to the child without <inherit/> being specified...this makes it work with isolated POMs.
o changed the semantics of when the unsetInheritanceApplied() method is called...it's now only when <inherit/> is NOT set.
o changed the default inheritByDefault attribute on MojoDescriptor to be true
o added inheritByDefault to PluginDescriptor (even though we don't have tools supporting it yet), with semantics identical to MojoDescriptor
o added generator/builder support for the inheritByDefault attribute of PluginDescriptor
o added calculation of inheritanceApplied || inheritByDefault to lifecycle executor before allowing plugins/mojos to bind.
o Everything builds, but we need some sort of IT to test the finer points.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@178836 13f79535-47bb-0310-9956-ffa450edef68
2005-05-27 23:05:09 +00:00
John Dennis Casey 239439bb04 o Added inherited field to the Plugin and Goal classes in maven.mdo
o Added annotation inheritedByDefault (looks like: @inheritedByDefault true|false) for java mojos
o Added support for inheritedByDefault to MojoDescriptor, descriptor generator and builder
o Factored the plugin combinatorial logic into ModelUtils in o.a.m.project, for later reuse in a plugin-aware model inheritance builder
o Refactored the DefaultModelDefaultsInjector to use the new ModelUtils for plugin merging (this is factored into a utility for reuse in inheritance assembly)


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@178733 13f79535-47bb-0310-9956-ffa450edef68
2005-05-27 03:27:55 +00:00
Brett Leslie Porter 7ed8a746d3 update to released versions
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169961 13f79535-47bb-0310-9956-ffa450edef68
2005-05-13 07:01:57 +00:00
Brett Leslie Porter 640ee60806 remove more deprecated stuff, improve plugin xdoc generation
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169734 13f79535-47bb-0310-9956-ffa450edef68
2005-05-12 00:06:54 +00:00
John Dennis Casey 7eda955b1d o Cleaned up a couple of things in repoclean that broke with the last update.
o Added concept of ErrorDiagnoser to help interpret errors and provide user feedback
o Added PluginParameterException to provide richer information than simply PluginConfigurationException (it's derived from PluginConfigurationException)
o Added implementations of ErrorDiagnoser for artifact resolution and plugin configuration handling.
o Modified DefaultMaven's logFailure(..) method to use errorDiagnosers Map (injected via Plexus)

I approached the plugin parameter expression/name feedback in this way, as it seems like a general pattern for interpreting errors without embedding this logic deep within the app itself. Feel free to rollback if this causes issues.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169379 13f79535-47bb-0310-9956-ffa450edef68
2005-05-09 23:30:01 +00:00
Brett Leslie Porter 05affa0a65 PR: MNG-192
Add "RELEASE" notation so that plugins without a version can be discovered

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169303 13f79535-47bb-0310-9956-ffa450edef68
2005-05-09 12:30:10 +00:00
Brett Leslie Porter 46e32b8b90 PR: MNG-371
Submitted by: Kenney Westerhof
Reviewed by:  Brett Porter
give the location of the plugin descriptor

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169201 13f79535-47bb-0310-9956-ffa450edef68
2005-05-09 00:21:33 +00:00
John Dennis Casey 76c4ceda28 o Added duplicate check for mojo descriptor Parameters
o changed the exception(s) throws during mojo descriptor extraction to be derivatives of InvalidPluginDescriptorException
o changed PluginConfigurationException in plugin.descriptor to InvalidPluginDescriptorException
o changed all "true".equals(something) to Boolean.valueOf(something).booleanValue()
o added validation of 'modelVersion' back to [Default]ModelValidator
o Fixed/added tests for new 'modelVersion' validation
o changed all requiresXXX in MojoDescriptor to XXXRequired, and getRequiresXXX():boolean to isXXXRequired():boolean to help maintain bean-ness for future use




git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168630 13f79535-47bb-0310-9956-ffa450edef68
2005-05-06 17:41:03 +00:00
Brett Leslie Porter d17b250fec - allow multiple versions of a plugin to operate concurrently.
- allow specification of a mojo as groupId:artifactId:version:goal
- general removal of more hard coding

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168543 13f79535-47bb-0310-9956-ffa450edef68
2005-05-06 07:03:14 +00:00
John Dennis Casey 5877385df1 Final pass on cleaning up the mojo api...collapsed MavenPluginDescriptor and PluginDescriptor in the same way as MavenMojoDescriptor/MojoDescriptor had been; eliminated the need for plugin.descriptor.Dependency and MavenPluginDependency (using ComponentDependencies instead); adjusted the MojoExtractors (name?) to return Lists instead of Sets; added duplicate checking to a new addMojo(MojoDescriptor) method on PluginDescriptor, so we catch it on all sides; changed the Generators to use execute(outputDirectory, pluginDescriptor) rather than the myriad pluginDescriptor-derived values; added an IT for checking that the build for a plugin will fail if multiple mojos are detected with the same goal; and, added a special case to PluginDescriptor.getGoalPrefixFromArtifactId() to handle maven-plugin-plugin. That should be about it. I'm not sure that I've gotten the IT for that failure test added to svn yet, so that may follow.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168481 13f79535-47bb-0310-9956-ffa450edef68
2005-05-06 00:32:08 +00:00
John Dennis Casey e095874576 Cleaned up plugin descriptor generation/reading to be more consistent, and to include some things that were being left out. Removed more deprecated behavior from annotations support and expression support. Wrote up the first pass on the mojo api and annotations spec. Fixed the mmld-mojo suppport to accommodate the new expression syntax and collisions with the default expression evaluator for mmld. Added an exception to plugin configuration in DefaultPluginManager to not look for a Field when the configurator == map-oriented.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168233 13f79535-47bb-0310-9956-ffa450edef68
2005-05-05 01:33:42 +00:00
Brett Leslie Porter 7f7a1049e6 improve the artifact ID parsing - any maven or plugin is removed to get the default prefix. If you want something different, use the configuration for plugin:descriptor
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168141 13f79535-47bb-0310-9956-ffa450edef68
2005-05-04 16:23:42 +00:00
Brett Leslie Porter 24c6328ad3 declare the desired "prefix" inside the plugin descriptor instead of pulling apart the artifact ID (though that is how the default is created).
Currently, the reverse is not handled in anyway, so a non-default prefix may not work, but this makes the code easier to isolate.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168099 13f79535-47bb-0310-9956-ffa450edef68
2005-05-04 08:17:39 +00:00
John Dennis Casey 690bc67fb9 Added marmalade support back in...it's currently still using the libraries-shovelled-into-core method, but it now uses the new mojo mechanism that uses plexus ComponentConfigurators...had to make the lookup for configurators dynamic for the DefaultPluginManager, too.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168064 13f79535-47bb-0310-9956-ffa450edef68
2005-05-04 03:28:41 +00:00
Brett Leslie Porter b5670bdcaa start to clean up the plugin vs. goal name handling so the hardcoding can be reduced, and eventually removed
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168040 13f79535-47bb-0310-9956-ffa450edef68
2005-05-04 01:20:49 +00:00
John Dennis Casey 3966104e9c Removed the need for MavenMojoDescriptor (collapsed to just MojoDescriptor)...also partially setup the possibility for container-injected configurations, provided we enhance as described in getting-to-container-configured-mojos.apt.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@165378 13f79535-47bb-0310-9956-ffa450edef68
2005-04-30 03:50:47 +00:00
John Dennis Casey 235fb09cb9 Cleaning up sysout from debugging.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@165228 13f79535-47bb-0310-9956-ffa450edef68
2005-04-28 23:14:23 +00:00
John Dennis Casey ab91b7f4c2 o Cleaned up field-level annotation support (especially descriptor extraction, generation, and building)
o Converted all "core" plugins (including maven-core-it-plugin) to use field-level annotations
o Removed generation of parameter descriptors for ${/#component.* param specifications.
o Added @readonly for parameters that cannot be overridden by user configuration (List override was dangerous here)
o Added validation against pom-derived configuration for @readonly parameters
o Fixed @parameter alias="" support...now configuration of the mojo instance actually will work with either the real param name or the alias. Would be nice to support multiple aliases, but that might require @alias annotations...
o Added [temporary?] support for null editable attributes for parameters, to support pre-built mojos from the repo.

Annotation support should be just about ready to go...


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@165224 13f79535-47bb-0310-9956-ffa450edef68
2005-04-28 23:05:01 +00:00
Brett Leslie Porter 3760f873a1 PR: MNG-167
Add the ability for a mojo to "fork" a phase execution, in a separate iteration of the lifecycle.
Add @executePhase generate-sources to idea:idea


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@164930 13f79535-47bb-0310-9956-ffa450edef68
2005-04-27 01:16:06 +00:00
John Dennis Casey d8d2e34dca Resolving MNG-221, simplify qdox with field-level mojo parameter annotations
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@164872 13f79535-47bb-0310-9956-ffa450edef68
2005-04-26 20:30:21 +00:00
Brett Leslie Porter ab2070d797 add deprecated parameter feature
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163983 13f79535-47bb-0310-9956-ffa450edef68
2005-04-20 16:49:01 +00:00
John Dennis Casey 61406495be o Refactored the MavenSettings code into the settings.mdo/Settings class.
o Added code to cache the active proxy and profile inside the Settings instance for quicker lookup.

o Added a method to initialize a new active profile for a Settings instance in the event one didn't exist.

o Started adding offline mode. So far, I've implemented:

  - Warning when a mojo declares a requirement for connectivity, but we're offline.

  - INFO message stating when maven is running in offline mode.

  - Addition to the Profile class in o.a.m.settings package to allow specification of offline mode by declaring: <offline>true</offline>


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163969 13f79535-47bb-0310-9956-ffa450edef68
2005-04-18 21:50:55 +00:00
Brett Leslie Porter b2e4433615 utilise the container for populating all mojo configuration, including expressions
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163947 13f79535-47bb-0310-9956-ffa450edef68
2005-04-15 04:52:31 +00:00
Brett Leslie Porter 378cc229a3 convert #component expressions to <requirements/>
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163942 13f79535-47bb-0310-9956-ffa450edef68
2005-04-14 03:27:35 +00:00
Brett Leslie Porter 85cc412a5f PR: MNG-225
use both groupId and artifactId in mojo descriptor


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163937 13f79535-47bb-0310-9956-ffa450edef68
2005-04-13 11:34:09 +00:00