mesonbuild / mesonbuild/meson

Support jar dependencies via maven

Open
#348 6 comments 0 reactions 0 assignees View on GitHub
dependencies enhancement language:java OS:android
Dominant language
Python
Stars
6.6k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
33

Description

Disclaimer: A JarDependency doesnt exist here yet either but this issue is specifically about maven dependencies.

So what I was thinking is a very straighforward implementation: Simply add another Dependency called MvnDependency and during it's constructor it will check in the local ~/.m2 whether it already exists and if not, downloads it to the build folder (well first it would always download to .m2, we just need to decide when we want those deps to be inside the build output.)

So I found this project which creates an executable .jar that can download maven deps:
https://github.com/pgr0ss/bazel-deps

_Edit:_ seems like mvn can do this by default, so we only need the user to have maven installed and then he can use mvn deps in meson too!
http://stackoverflow.com/questions/1776496/a-simple-command-line-to-download-a-remote-maven2-artifact-to-the-local-reposito

So just call that from within meson during the MvnDependency constructor, the config would look like this:

dep = Dependency("org.mongodb:mongodb-driver:3.1.0", isMaven = true)

I think the principle of calling an external program to pull some dependency or do some work isnt even so bad, that's exactly what pkgconfig does too. So I think this solution is very good but I look forward to hearing your arguments, my main issue is where to put the dependencies and when.

Bazel is similar and they have an extra stage called "fetch" where they pull deps.

Contributor guide

Open the contributing guide

Research direction

Start by locating Meson's Dependency constructor and reviewing how existing external dependency resolution works. Check the proposed Maven CLI flow and the handling of the local ~/.m2 repository. Done means the issue's open decisions about resolution timing, dependency placement, and the Dependency interface are settled and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.