简体   繁体   中英

How to build Apache Maven from source without Maven installed? Or how to bootstrap the Maven build?

How do I build Apache Maven 3+ from source without already having Maven installed?

Looking at the Apache site they mention bootstrapping Maven, but I'm having a hard time finding details on this process.

http://maven.apache.org/guides/development/guide-building-maven.html

Note, that you don't need to bootstrap Maven for day to day use, or to develop plugins. While we encourage getting involved and fixing bugs that you find, for day to day use we recommend using the latest release.

I also found this resource which mentions bootstrapping Maven, but it only seems to describe how to clone the various source repositories.

https://github.com/apache/maven-sources/

Bootstrapping Basics

mkdir maven

cd maven

repo init -u https://gitbox.apache.org/repos/asf/maven-sources.git

repo sync repo start master --all

Then simply use the cloned content with normal git commands.

There must be some way to build Maven without having Maven already installed.

Four years later, and I had the same question. In my case, I had a fundamental misunderstanding of the Maven binary distribution (which seems silly in retrospect) - that it's Java byte code so there shouldn't be platform issues involved.

Anyway, to answer your question: use the.bin distribution of Maven if you have a need to build from source. You'll still have that original.bin as a dependency, but you can then customize your source build for your intended target system if you so desire.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM