简体   繁体   中英

How do I install from Maven Central?

I'm trying to install this but I'm unfamiliar with Maven and I have no idea how to follow the installation instructions: https://github.com/twosigma/flint (it's one of those "so basic nobody bothers to state it on the internet" questions)

According to that link "Scala artifact is published in maven central" - so how do I get that thing installed where Spark (and ultimately pyspark) can use it?

For apt it would just be apt-get install xyz
For pip it would just be pip install xyz

so why isn't mvn install flint working for me?

Add the dependencies to your Maven project's pom.xml (if you have a project):

<dependency>
    <groupId>com.twosigma</groupId>
    <artifactId>flint</artifactId>
    <version>0.6.0</version>
</dependency>

or download the jar (linked from the above link) or from here (click "Browse" or "Downloads").

I don't know Spark or Scala. Maybe there is more convenient way to get it via dependencies.

The point is that you do not install Maven dependencies.

You just add them to your pom.xml (when doing Maven) or the appropriate build file (eg build.gradle ). Then they are downloaded automatically from MavenCentral (or any other configured repository), as soon as you build.

For the "How do I add them", I refer to the answer of @Freddy.

In the corporate world you would need to find your Maven proxy's repository_url , ask for Nexus or Artifactory with the Java developers.

Then know that you can install all kinds of jvm software published in Maven Central and other configured repositories without using Maven, or Java. As long as you know the Maven properties of the application artifacts.

You can use this in an Ansible playbook:

- name: Download application_artifact to the apps directory
  maven_artifact:
    group_id: "{{ app_group_id }}"
    version: "{{ application_artifact.version }}"
    artifact_id: "{{ application_artifact.artifact_id }}"
    repository_url: "{{ repository_url }}"
    extension: "{{ application_artifact.type }}"
    dest: "{{ server_dir }}/apps"
    owner: "{{ app_account }}"
    group: "{{ app_group }}"
    mode: 0755

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