Commit Graph

324 Commits

Author SHA1 Message Date
Brett Leslie Porter ee15019eb8 refactor maven-artifact: first pass, reduce the usage of setPath()
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163681 13f79535-47bb-0310-9956-ffa450edef68
2005-03-24 05:01:06 +00:00
Brett Leslie Porter d0e15a1f37 remove unused class
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163680 13f79535-47bb-0310-9956-ffa450edef68
2005-03-24 04:44:41 +00:00
Brett Leslie Porter 9532b897aa make abstract - contains no tests
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163679 13f79535-47bb-0310-9956-ffa450edef68
2005-03-24 04:44:12 +00:00
Brett Leslie Porter 5e2caf89c7 o put all of the path functions back into the artifact handler manager - that class likely needs a rename.
o Removed AbstractArtifactComponent as it was simply delegating to the class and prevented other inheritence for the resolver which seems more appropriate.
o fixed test failure in ProjectClasspathTest due to incorrectly constructed component - using plexus even though still working around the problem with a hack


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163675 13f79535-47bb-0310-9956-ffa450edef68
2005-03-23 08:42:57 +00:00
Brett Leslie Porter 14bb2c805a change the maven group ID
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163670 13f79535-47bb-0310-9956-ffa450edef68
2005-03-23 06:52:55 +00:00
Brett Leslie Porter 1468ecbbad reformat
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163667 13f79535-47bb-0310-9956-ffa450edef68
2005-03-23 01:16:49 +00:00
Brett Leslie Porter b84d4bc35e revert <includes> and <excludes> in MDO to old format
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163666 13f79535-47bb-0310-9956-ffa450edef68
2005-03-22 14:26:28 +00:00
Brett Leslie Porter 32416cf540 check super classes for fields to set
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163655 13f79535-47bb-0310-9956-ffa450edef68
2005-03-22 12:28:36 +00:00
Brett Leslie Porter d9a6576761 don't aggregate plugins
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163654 13f79535-47bb-0310-9956-ffa450edef68
2005-03-22 11:42:23 +00:00
Brett Leslie Porter 3a1e4f0199 clean up plugin configuration handling
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163653 13f79535-47bb-0310-9956-ffa450edef68
2005-03-22 11:29:55 +00:00
Brett Leslie Porter e0e405fe68 clean up plugin configuration handling
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163652 13f79535-47bb-0310-9956-ffa450edef68
2005-03-22 10:46:55 +00:00
Brett Leslie Porter 336fa855be close file handle
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163651 13f79535-47bb-0310-9956-ffa450edef68
2005-03-22 10:07:01 +00:00
Brett Leslie Porter 297f542553 remove extension from artifact - it is the sole reponsibility of the artifact handler. This prevents the error of plugins getting the extension "maven-plugin"
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163647 13f79535-47bb-0310-9956-ffa450edef68
2005-03-22 07:23:17 +00:00
John Dennis Casey 590e952f02 CHANGES
------------------------

o Factored the layout for a repository into a separate set of components in o.a.m.a.repository.layout

o Added new DefaultRepositoryLayout that uses the repo layout in http://docs.codehaus.org/pages/viewpage.action?pageId=22230 (it is not used by default until we get the repo1 conversion done)

o Added command-line switches to force legacy local-repo or new format (-a/-A, I know, but try to find something that makes more sense!)

o Added path formatting to the repository itself, which is now constructed with a ArtifactRepositoryLayout instance (since layout should be tied to the repository)

o Removed path formatting altogether from the DefaultArtifactHandlerManager.

o Changed the AbstractArtifactBasedComponent (or whatever it's called) to use the repository formatting in the path() and localPath() methods.

o Moved the plugin repo construction (still intact as a hard-coded singleton list) into the DefaultMavenProjectBuilder, where it will eventually build from POM info.

o Added a new method to build an artifact repository for a <distributionManagement/> section, if possible. This reduced the strain on mojos to construct an ArtifactRepository on demand.

o Refactored all *DeployMojo to use #project.distributionManagementArtifactRepository instead of the #settings, #component..ArtifactRepositoryFactory, ... that it used to require. This is a big simplifying step.

o Removed remote artifact repository construction from DefaultMaven, and changed the MavenSession to delegate to MavenProject for remoteArtifactRepositories, just as it does for pluginRepositories.

o Added remoteArtifactRepositories, pluginArtifactRepositories, distributionManagementArtifactRepository to MavenProject as a cache for the higher-level repos used throughout the system. This is project info, so it belongs here.

o Fixed all the tests in maven-core and maven-artifact which I broke. :)

o Dropped what is probably a big format-bomb, since the Eclipse formatter doesn't really handle 'throws Exception' wrapping the right way.

o Added MavenProject to the MavenSession constructor, since there should always be a MavenProject associated with a build, even if it's just the super-pom.

TODO:
--------------------------

- Write an integration/unit test to ensure that the new repo format works with $classifier (was: $extra) and $groupId[0]/../$groupId[n]. This is a simple adaptation of the old layout, but still needs testing.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163638 13f79535-47bb-0310-9956-ffa450edef68
2005-03-21 08:18:34 +00:00
Brett Leslie Porter 3bd980bdb1 hack in a dom so we can use plexus configuration. more to do...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163635 13f79535-47bb-0310-9956-ffa450edef68
2005-03-21 07:23:07 +00:00
Brett Leslie Porter 847e6b8852 improve error handling
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163629 13f79535-47bb-0310-9956-ffa450edef68
2005-03-21 04:24:45 +00:00
Brett Leslie Porter f5bd920140 make the detection cleaner to make it easier to clean up later
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163628 13f79535-47bb-0310-9956-ffa450edef68
2005-03-21 04:00:46 +00:00
Brett Leslie Porter dab33490a5 most basic of field based plugins
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163627 13f79535-47bb-0310-9956-ffa450edef68
2005-03-21 03:49:17 +00:00
Brett Leslie Porter e452a9ca52 don't show if empty
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163626 13f79535-47bb-0310-9956-ffa450edef68
2005-03-21 01:48:44 +00:00
Brett Leslie Porter b80f5242b2 setup a simple, backwards compatible mechanism to start implementing the new plugin instantiation
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163624 13f79535-47bb-0310-9956-ffa450edef68
2005-03-21 01:02:36 +00:00
Brett Leslie Porter 5a296f03c8 clean up old tests
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163623 13f79535-47bb-0310-9956-ffa450edef68
2005-03-21 01:01:35 +00:00
Brett Leslie Porter 8e9ec9c892 move log to AbstractPlugin, out of request. Request now contains only parameters (will move to fields) and marmalade context (can move to marmalade mojo wrapper)
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163622 13f79535-47bb-0310-9956-ffa450edef68
2005-03-21 00:07:39 +00:00
Brett Leslie Porter a593e7df88 change the plugin execution response to be an exception instead since it only handled failures.
any returns from success will be conveyed by the request, soon to be converted into fields on the plugin. These will eventually be extracted using OGNL, but this is all post alpha-1 work


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163621 13f79535-47bb-0310-9956-ffa450edef68
2005-03-20 23:22:01 +00:00
Brett Leslie Porter b164176ca9 implement interface change
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163619 13f79535-47bb-0310-9956-ffa450edef68
2005-03-19 03:00:06 +00:00
Brett Leslie Porter f5605e5327 override with goal configuration if it exists
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163618 13f79535-47bb-0310-9956-ffa450edef68
2005-03-19 00:22:28 +00:00
Brett Leslie Porter 2e7b575246 repair formatting mishap
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163617 13f79535-47bb-0310-9956-ffa450edef68
2005-03-18 23:34:44 +00:00
Brett Leslie Porter 49552c8688 make sure paths are processed after plugin configuration is merged
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163616 13f79535-47bb-0310-9956-ffa450edef68
2005-03-18 23:32:37 +00:00
John Dennis Casey 10b55add40 o Created non-abstract base class for DefaultArtifactFactory to extend, called ArtifactConstructionSupport, which provides centralized means for constructing artifacts consistently without all the maven-core specific methods. These maven-core specifics not delegate to the generic methods provided in this new class.
o Adjusted the maven-archetype stuff to work with the new artifact creation/resolution/etc. methods in maven-artifact and maven-core.
o Removed all direct construction of DefaultArtifact and replaced with ArtifactConstructionSupport where it would have involved putting the DefaultArtifactFactory in the plexus.xml, and where the code doesn't need dependency-oriented methods.
o Archetype works now, using the example provided in plexus/plexus-site/src/site/apt/building-plexus-applications.apt


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163615 13f79535-47bb-0310-9956-ffa450edef68
2005-03-18 22:02:09 +00:00
Brett Leslie Porter 7072ba8dac fix parse error that cause continuum grief
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163611 13f79535-47bb-0310-9956-ffa450edef68
2005-03-18 11:32:39 +00:00
Emmanuel Venisse 23b0c1d4fb Fix settings finder for windows.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163595 13f79535-47bb-0310-9956-ffa450edef68
2005-03-17 06:07:46 +00:00
Brett Leslie Porter dbe55b7d83 another issue with re-initialising the phases in the reactor
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163590 13f79535-47bb-0310-9956-ffa450edef68
2005-03-17 02:26:19 +00:00
Brett Leslie Porter 829e2051f6 PR: MNG-207
scope must be considered globally - redefining it weaker must not win.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163589 13f79535-47bb-0310-9956-ffa450edef68
2005-03-17 02:04:35 +00:00
Brett Leslie Porter 08df9d163d PR: MNG-209
re-initialise lifecycle on each execution. Make it threadsafe.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163586 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 23:19:00 +00:00
John Dennis Casey 1cc2abaaa4 o Added duplicate declaration of settings builder and artifact repo factory, to allow embedding of maven inside plexus-based apps that already have a plexus.xml (and therefore cannot use maven's plexus.xml).
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163584 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 19:06:08 +00:00
Brett Leslie Porter 143f33b701 comment on placement issue
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163582 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 07:36:01 +00:00
Brett Leslie Porter fea9f2ac53 project cache repairs - must not cache models that are already interpolated, translated, etc.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163581 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 06:56:03 +00:00
John Dennis Casey e9a9323812 o Changed maven-user-model/UserModel/UserModelBuilder to maven-settings/MavenSettings/MavenSettingsBuilder.
This supports a change to a simpler local configuration file (~/.m2/settings.xml by default), which has the general format of:

<settings>
  <profiles>
    <profile>
      <active>true</active> <!-- not needed if this is the only profile -->
      <localRepository>/path/to/repo</localRepository>
    </profile>
    .
    .
    .
  </profiles>
  <servers>
    <server>
      <id>myserver</id>
      <username>me</username>
      <password>mypass</password>
      <privateKey>/path/to/key</privateKey>
      <passphrase>key-passphrase</passphrase>
    </server>
    .
    .
    .
  </servers>
  <proxies>
    <proxy>
      <active>true</active> <!-- not needed if this is the only proxy -->
      .
      .
      .
    </proxy>
    .
    .
    .
  </proxies>
</settings>

o Added special parameter named '#settings' which simply injects the current MavenSettings from the MavenSession into the request parameters.
o Adjusted the it-verifier and mboot2 accordingly.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163578 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 06:29:35 +00:00
Brett Leslie Porter de262b4236 o refactor usage of build methods
o do not do path resolution for repository POMs
o source poms override repository poms in the cache


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163577 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 05:08:50 +00:00
Brett Leslie Porter c865afbae9 project sorting can be a static method
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163576 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 04:28:34 +00:00
Brett Leslie Porter 64eb3c2ddd project sorting can be a static method
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163575 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 04:21:03 +00:00
Brett Leslie Porter 83c5474b1f super project never has dependencies to resolve
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163574 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 04:18:06 +00:00
Brett Leslie Porter e616a7b1c9 PR: MNG-204
DAG needs to account for the project's inherited parent


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163573 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 03:58:18 +00:00
Brett Leslie Porter ba992be685 PR: MNG-205
Add a non-recursive mode to disable processing of modules


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163572 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 03:48:30 +00:00
Brett Leslie Porter dda9fa50fb cache POMs within the reactor
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163571 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 03:39:54 +00:00
Brett Leslie Porter 38add00ed4 cleanup
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163570 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 01:43:09 +00:00
Brett Leslie Porter b342ded8de complete inheritence of distributionManagement
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163565 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 01:00:32 +00:00
Brett Leslie Porter 88b5c0ee66 PR: MNG-187
add getCollectedProjects to MavenProject for post processing


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163564 13f79535-47bb-0310-9956-ffa450edef68
2005-03-15 23:36:28 +00:00
Brett Leslie Porter e5ab9191bd PR: MNG-191
collect proejcts and modules first, then execute reactor


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163563 13f79535-47bb-0310-9956-ffa450edef68
2005-03-15 23:31:23 +00:00
Brett Leslie Porter 5c1f5b1e57 PR: MNG-52
change type of maven plugins to "maven-plugin" instead of plugin.
This should allow other products to have different plugin types, if necessary.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163562 13f79535-47bb-0310-9956-ffa450edef68
2005-03-15 22:31:54 +00:00
Brett Leslie Porter fae1470d47 fix error reporting
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163560 13f79535-47bb-0310-9956-ffa450edef68
2005-03-15 21:48:55 +00:00