63 Commits

Author SHA1 Message Date
Tamas Cservenak
a293822852
Minor fixes: proper help syntax and ability to extend core exports (#1799)
Display proper syntax on help, ability to extend core exports.
2024-10-15 20:03:27 +02:00
Tamas Cservenak
66b7e2c0be
Cleanup after last commit (#1798)
LookupInvoker does terminal stuff now, remove them
from "early" entry classes, also adopt mvnenc
2024-10-15 18:02:29 +02:00
Guillaume Nodet
740100b50c
[MNG-8309] Improve log infrastructure (first step toward multi-threading log view support) (#1792)
Move logging infrastructure to support multi threaded output from mvnd to maven.
Refactor a bit the terminal/log creation done by Cling.
2024-10-15 15:30:39 +02:00
Tamas Cservenak
f5e54ca6fa
[MNG-8285] Implement mvnenc CLI tool (#1793)
Implements the `mvnenc` tool that is on par with Maven3 master password encryption functionality wise, but is _really secure_ unlike Maven3 conterpart. On the other hand, _is backward compatible if legacy config is setup_.

Implemented goals: `init`, `encrypt`, `decrypt`, `diag`. Also provides one extra "master source" based on Maven infra Prompter: console master password prompt.

---

https://issues.apache.org/jira/browse/MNG-8285
2024-10-14 21:57:22 +02:00
Tamas Cservenak
7df5b16f78
[MNG-8305] Fix MER showErrors setting (#1795)
---

https://issues.apache.org/jira/browse/MNG-8305
2024-10-14 19:33:06 +02:00
Guillaume Nodet
b91b4ef1ae Disable ResidentMavenInvoker test 2024-10-11 22:36:34 +02:00
Guillaume Nodet
4c57802a4f Disable LocalMavenInvoker tests 2024-10-11 21:55:33 +02:00
Guillaume Nodet
c96ccce2fc Fix error message displayed when an error occurs during argument parsing 2024-10-09 20:45:29 +02:00
Tamas Cservenak
445236398d
Make rootDirectory mandatory (#1787)
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-10-08 21:45:28 +02:00
Tamas Cservenak
e369ce5782
[MNG-8283] Make resident able to restore state (#1779)
And move all logic out of invoke. Also, parser and other improvements, mostly adding "extension points" in form of overridable protected method.

---

https://issues.apache.org/jira/browse/MNG-8283
2024-10-05 15:57:15 +02:00
Tamas Cservenak
20fe966770
[MNG-8283] Parser must not alter global state (#1776)
Parser must not (esp "partially") alter global state like
setting Java System Properties. If invoker wants, invoker
can set those (and cleanup).

---

https://issues.apache.org/jira/browse/MNG-8283
2024-10-05 09:32:46 +02:00
Tamas Cservenak
1817aaeaad [MNG-8283] Minor: method rename 2024-10-04 18:05:13 +02:00
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