Tamas Cservenak
60ae468a2e
[MNG-8283] More mvnd related changes ( #1775 )
...
Changes:
* there is only one parser for "just maven", no need for 3
* aligned scopes (public) of local context for simplicity, we can fix visibility later
* allow custom guice modules (unused, may undo this)
* split logging setup in two steps: config and activate
---
https://issues.apache.org/jira/browse/MNG-8283
2024-10-04 17:33:25 +02:00
Tamas Cservenak
533790bb4a
[MNG-8283] Maven CLIng smaller bugfixes and improvements ( #1772 )
...
This PR adopts CLIng for use in mvnd, and adds several improvements to CLIng overall.
Major topics:
* ability to pass in per-request Lookup for customization
* makes parser request creation a bit friendlier
* removes a log of redundancy (same stuff copied over)
* ability to alter rootDirectory detection in parsers
* resident invoker bugfix
* adds UTs for 3 invoker implementations
---
https://issues.apache.org/jira/browse/MNG-8283
2024-10-04 14:23:10 +02:00
Tamas Cservenak
2f75465397
Touch up post merge
...
One dangling method and TODO
2024-10-03 19:58:19 +02:00
Tamas Cservenak
ef9aea6b9c
[MNG-8283] Maven CLIng ( #1750 )
...
New CLI for Maven. Goals are reusability, extensibility and easier embeddability (a la mvnd). If you build this branch, you will end up with Maven distro that uses "new" `maven-cli:org.apache.maven.cling.MavenCling` class as entry point instead of "old" `maven-embedder:org.apache.maven.cli.MavenCli`.
First step is to make "pretty much equivalent" capable CLI as compared to "old", with some exceptions:
* "encryption" ops are gone, those should be in separate tool anyway
* "deprecated and unsupported" CLI options like `-llr` present ONLY to make Maven fail are gone (now Arg parser will fail).
Current state of affairs is messy, MavenCli mixes everything it can, contains interleaved logic for bootstrapping, arg parsing, default logic and executing Maven. First goal is to clean this up.
Commons CLI are also hidden in this PR, so is ClassWorlds. This basically opens up way to have "alternative" CLI arguments parsers as well.
Currently the "local" (CLI) flow is this:
```
arg[] -> localParser -> Request -> localInvoker -> maven runs (in situ)
```
But the point is if you "come up" somehow with a Request instance, one can also do just:
```
Request -> invoker -> maven runs (somewhere)
```
Local parser:
* parses CLI args
* infers the defaults
* creates Request object that contains all information needed to run Maven
* can be reused outside of CLI as well
* does NOT fiddle with Plexus, logging, etc.
Local invoker:
* accepts Request object
* deals with configuring env (logging, etc), creating DI container, and running Maven ONLY
There are some experiments ongoing as well, like `ForkedInvoker` is, but also `MavenTool`.
---
https://issues.apache.org/jira/browse/MNG-8283
2024-10-03 18:03:55 +02:00
Jason van Zyl
62a09335a0
o i have wrapped everything up into the embedder module, for the extra 60k it adds who cares and it lets me operate on the whole
...
set of maven classes so that I can scramble the innards and have it work correctly and consistly for embedded uses and the CLI
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@514295 13f79535-47bb-0310-9956-ffa450edef68
2007-03-04 00:47:12 +00:00
Jason van Zyl
ca96b63834
updating license headers
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@513026 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 22:48:13 +00:00
Jason van Zyl
548d57661b
o use constants from the embedder. these are CLI constants but we have so many people wanting to mimic
...
the behavior of the cli that we will put them there so that embedder users don't have to pull in the cli
just for those constants.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@512893 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 18:23:55 +00:00
Jason van Zyl
fb03e03672
o optimizing imports, trying to clean up settings use so i can track them down and purge them
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@512775 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 14:47:51 +00:00
Jason van Zyl
e8f5f0cbfd
o adjust to package changes in the embedder
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@512563 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 02:12:32 +00:00
Jason van Zyl
8491a179f6
o adding a way to set the local repository using a -D option
...
o make the cli handle things that are CLI specific like:
- the $m2_home/conf/settings.xml file and the standard ~/.m2/settings.xml file, i am still falling back
to this as people using the embedder have become used to this. but this has the effect of greatly
simplifying settings handling because it is up to the client code to define where settings are
and how they should be processed
o use an embedder configuration for things like settings and the local repository which generally remain constant, another
push toward a single source for session and request configuration information
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@512542 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 01:18:01 +00:00
John Dennis Casey
f4b3eedc8a
Fixing some lingering dependency ordering problems from artifact resolution, and adding settings-builder advice to the CLI.
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@512339 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 17:47:30 +00:00
Joakim Erdfelt
33f23db7de
* Migrating to wagon-manager 1.0-beta-3-SNAPSHOT
...
* Created org.apache.maven.artifact.manager.ArtifactManager
* Deprecated org.apache.maven.artifact.manager.WagonManager in favor of new ArtifactManager
* Updated the rest of maven to utilize this new ArtifactManager.
* The default wagon providers list is now managed from within wagon-manager's dependency list.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@505520 13f79535-47bb-0310-9956-ffa450edef68
2007-02-09 21:53:27 +00:00
Carlos Sanchez Gonzalez
6b39882779
m2.bat no longer exists
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@496588 13f79535-47bb-0310-9956-ffa450edef68
2007-01-16 05:04:25 +00:00
Jason van Zyl
09f3b3fbba
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@496493 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 21:10:57 +00:00
Jason van Zyl
313307f5cd
o updating notices
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@495718 13f79535-47bb-0310-9956-ffa450edef68
2007-01-12 20:19:19 +00:00
Jason van Zyl
4e42694618
o remove the old scripts
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@495702 13f79535-47bb-0310-9956-ffa450edef68
2007-01-12 19:36:37 +00:00
Jason van Zyl
e3280af112
o fix license headers
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@495699 13f79535-47bb-0310-9956-ffa450edef68
2007-01-12 19:33:59 +00:00
Jason van Zyl
9bb807d3f7
o make sure the assembly gets attached as part of the normal process
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@495608 13f79535-47bb-0310-9956-ffa450edef68
2007-01-12 15:34:07 +00:00
Brett Leslie Porter
51c6fefb31
[MNG-2692] fix mvn.bat on windows after classworlds was renamed
...
Submitted by: Mike Henry
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@492063 13f79535-47bb-0310-9956-ffa450edef68
2007-01-03 07:17:17 +00:00
Jason van Zyl
774972e7ec
MNG-1385 You can now activate a profile using the embedder.
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@491529 13f79535-47bb-0310-9956-ffa450edef68
2007-01-01 04:08:06 +00:00
Jason van Zyl
e07b4f0970
o making the baseDirectory properties the same
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@491525 13f79535-47bb-0310-9956-ffa450edef68
2007-01-01 02:54:23 +00:00
Jason van Zyl
8f4a420c8d
MNG-2728 return a MavenExecutionResult from Maven.execute( request )
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@491512 13f79535-47bb-0310-9956-ffa450edef68
2007-01-01 00:18:12 +00:00
Jason van Zyl
87b3775025
MNG-2722 Create a strategy for providing sane default values in the MavenExecutionRequest
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@491468 13f79535-47bb-0310-9956-ffa450edef68
2006-12-31 19:20:44 +00:00
Jason van Zyl
8e51bbe8ec
o Remove the MavenEmbedderConfiguration as this is not used in any of the IDE integration. The MavenEmbedRequest is what is being used as the session level configuration.
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@491363 13f79535-47bb-0310-9956-ffa450edef68
2006-12-31 02:13:58 +00:00
Kenney Westerhof
c15aadbe04
use descriptors/descriptors instead of deprecated descriptor for asm plugin
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@488158 13f79535-47bb-0310-9956-ffa450edef68
2006-12-18 09:01:43 +00:00
Jason van Zyl
9d2bd7b7e3
o making sure the plugin registry is not used, it's turned off in 2.0.4. it causes too many problems.
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@485728 13f79535-47bb-0310-9956-ffa450edef68
2006-12-11 15:55:03 +00:00
Jason van Zyl
f9d660817e
o flipping back to 1.0-beta-1 of wagon for the time being
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@485721 13f79535-47bb-0310-9956-ffa450edef68
2006-12-11 15:47:09 +00:00
Jason van Zyl
4406cda6d0
o turn of reactor scanning option off by mistake as I renamed it in my branch. back alive. visual results
...
of ITs are coming.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@485460 13f79535-47bb-0310-9956-ffa450edef68
2006-12-11 01:43:19 +00:00
Brett Leslie Porter
7f65892418
[MNG-2681] Add cli flag to set all snapshot repos to updatePolicy = never
...
Submitted by: Jason Dillon
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@483809 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 03:35:45 +00:00
Jason van Zyl
7136b01f88
o merging in my changes from the refactored embedder branch
...
milos, this has some stuff that we worked on so i've tried to unify everythign in trunk
now
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@483655 13f79535-47bb-0310-9956-ffa450edef68
2006-12-07 20:53:33 +00:00
Jason van Zyl
bff3e1d987
o fix version of assembly plugin
...
o get rid of IDEA files
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@483498 13f79535-47bb-0310-9956-ffa450edef68
2006-12-07 15:37:09 +00:00
Andrew Williams
44ae99fc2d
Merge maven.new for latest plexus classworlds and container APIs
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@483302 13f79535-47bb-0310-9956-ffa450edef68
2006-12-07 00:17:53 +00:00
Vincent Siveton
a2f2d993d7
o Merged from 2.0.x branch revision r472890, MNG-2413
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@472891 13f79535-47bb-0310-9956-ffa450edef68
2006-11-09 13:34:14 +00:00
Vincent Siveton
c1f1c371c0
o modified as Brett suggested. Thanks Brett!
...
http://mail-archives.apache.org/mod_mbox/maven-dev/200611.mbox/%3c6744A665-111C-4178-9A1C-B5E95AA5B740@apache.org%3e
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@471723 13f79535-47bb-0310-9956-ffa450edef68
2006-11-06 13:24:12 +00:00
Vincent Siveton
26ae29b892
MNG-2393: documentation of -U on CLI usage help is incorrect
...
Submitted by: Maria Odea Ching
Reviewed by: Vincent Siveton
o applied Thanks!
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@471217 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 15:33:57 +00:00
Kenney Westerhof
27598febd0
PR: MNG-2341. Merge from 2.0.x branch revision 470421
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@470423 13f79535-47bb-0310-9956-ffa450edef68
2006-11-02 17:19:42 +00:00
Jason van Zyl
9f8c68e04a
o dan's fix to the main method
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@462706 13f79535-47bb-0310-9956-ffa450edef68
2006-10-11 06:22:59 +00:00
Jason van Zyl
40aacad4f0
o Add a method that can be used with booting with a ClassWorld, we will just create one when the standard main method is invoked. Work required for Dan's new rework of the bootstrap to make it dead simple to understand.
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@454770 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 15:03:15 +00:00
Jason van Zyl
2bdcc4f862
MNG-1827 making bash script work on mingw
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@450702 13f79535-47bb-0310-9956-ffa450edef68
2006-09-28 05:37:08 +00:00
Brett Leslie Porter
0dc9d8eaf2
correct inconsistency in the description and the function
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@430229 13f79535-47bb-0310-9956-ffa450edef68
2006-08-10 03:39:12 +00:00
Brett Leslie Porter
87e9191936
fix the logging issues - bad merge
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@429932 13f79535-47bb-0310-9956-ffa450edef68
2006-08-09 02:51:09 +00:00
Brett Leslie Porter
52f6e19961
port r429917 from branch - add a quiet option for the CLI
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@429921 13f79535-47bb-0310-9956-ffa450edef68
2006-08-09 01:46:31 +00:00
Carlos Sanchez Gonzalez
98807ea02d
Finally merged into branch
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@425436 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 16:01:00 +00:00
Carlos Sanchez Gonzalez
ecd0a00bb2
Fixed @since version as it doesn't exist on the branch
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@425128 13f79535-47bb-0310-9956-ffa450edef68
2006-07-24 17:30:56 +00:00
Carlos Sanchez Gonzalez
20b7d33b07
Added AbstractConsoleDownloadMonitor to avoid code duplication
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@425102 13f79535-47bb-0310-9956-ffa450edef68
2006-07-24 16:01:07 +00:00
Carlos Sanchez Gonzalez
f7a33ca068
POM cleanup, remove inherited fields, added license and xsd
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@419880 13f79535-47bb-0310-9956-ffa450edef68
2006-07-07 12:23:28 +00:00
Trygve Laugstol
2e564a009c
o Making the mvn script Solaris sh compatible.
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@408737 13f79535-47bb-0310-9956-ffa450edef68
2006-05-22 20:05:49 +00:00
Milos Kleint
c3addfbe1a
2 projects had the same name, changing the name for CLI.
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@400258 13f79535-47bb-0310-9956-ffa450edef68
2006-05-06 07:35:46 +00:00
Jason van Zyl
55e7c9a005
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@394314 13f79535-47bb-0310-9956-ffa450edef68
2006-04-15 15:52:10 +00:00
Jason van Zyl
5e5be884cc
svn:ignore
...
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@394313 13f79535-47bb-0310-9956-ffa450edef68
2006-04-15 15:51:51 +00:00