Commit Graph

80 Commits

Author SHA1 Message Date
Guillaume Nodet d62ecadb35
[MNG-8348] Fix typos in deprecation warning message (#1844) 2024-10-24 13:51:57 +02:00
Guillaume Nodet 69c6a3f95b
[MNG-8342] Add command line and terminal information when verbose (#1840) 2024-10-24 13:50:30 +02:00
Guillaume Nodet 3425b4dd08
[MNG-8334] Fix output redirection (#1826) 2024-10-22 16:53:58 +02:00
Tamas Cservenak 3753743ee6
[MNG-8335] The mvnenc command is busted (#1825)
Fixing the 3 new script params.

---

https://issues.apache.org/jira/browse/MNG-8335
2024-10-21 10:03:39 +02:00
Tamas Cservenak 4b9e350985 [maven-release-plugin] prepare for next development iteration 2024-10-19 20:11:20 +02:00
Tamas Cservenak 6e78fcf6f5 [maven-release-plugin] prepare release maven-4.0.0-beta-5 2024-10-19 20:10:56 +02:00
Tamas Cservenak 3ecf9124ca Revert "[maven-release-plugin] prepare release maven-4.0.0-beta-5"
This reverts commit d82ef1a372.
2024-10-19 20:08:03 +02:00
Tamas Cservenak 87912b6554 Revert "[maven-release-plugin] prepare for next development iteration"
This reverts commit f4eeca2472.
2024-10-19 20:07:37 +02:00
Tamas Cservenak f4eeca2472 [maven-release-plugin] prepare for next development iteration 2024-10-18 17:54:38 +02:00
Tamas Cservenak d82ef1a372 [maven-release-plugin] prepare release maven-4.0.0-beta-5 2024-10-18 17:54:23 +02:00
Tamas Cservenak 076c4dfeb7 Revert "[maven-release-plugin] prepare release maven-4.0.0-beta-5"
This reverts commit 2bcd571b56.
2024-10-18 17:05:06 +02:00
Tamas Cservenak ec2a8054c1 Revert "[maven-release-plugin] prepare for next development iteration"
This reverts commit 1813f06f86.
2024-10-18 17:04:56 +02:00
Tamas Cservenak 1813f06f86 [maven-release-plugin] prepare for next development iteration 2024-10-18 16:34:31 +02:00
Tamas Cservenak 2bcd571b56 [maven-release-plugin] prepare release maven-4.0.0-beta-5 2024-10-18 16:34:04 +02:00
Guillaume Nodet 69b34f4f3c
[MNG-8322] Use the new ToolchainsBuilder and SettingsBuilder (#1778) 2024-10-17 11:25:53 +02:00
Tamas Cservenak 95e59f2437
[MNG-8302] Warn when appropriate (#1810)
First, `rootDirectory` is nullable, CLIng code was not assuming this, fixed.
Second, emit the "no root found" warning ONLY when appropriate (when we have a POM in picture).

---

https://issues.apache.org/jira/browse/MNG-8302
2024-10-17 10:06:47 +02:00
dan1st 9b9f720181
[MNG-8311] empty but existing <localRepository/> in settings.xml (#1801)
Use default when empty as well

---

https://issues.apache.org/jira/browse/MNG-8311
2024-10-16 16:20:30 +02:00
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