Skip to content

Commit

Permalink
Added Vault dependency in POM
Browse files Browse the repository at this point in the history
  • Loading branch information
Poslovitch committed Dec 30, 2018
1 parent 090e1cc commit 44d20a2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
<id>codemc-repo</id>
<url>https://repo.codemc.org/repository/maven-public/</url>
</repository>
<repository>
<id>vault-repo</id>
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
</repository>
</repositories>

<dependencies>
Expand Down Expand Up @@ -94,6 +98,12 @@
<artifactId>level</artifactId>
<version>0.3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down

6 comments on commit 44d20a2

@BONNe
Copy link
Member

@BONNe BONNe commented on 44d20a2 Dec 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have question about this one.

So VaultAPI is necessary for all addons that want to use its functionality, but main hook is in BentoBox plugin.

Wouldn't it be much better to change scope from provided to compile in BenoBox plugin instead of adding provided to all addons?

@Poslovitch
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I don't know what the scope actually means... so any info about that would be great :slight_smile:

@BONNe
Copy link
Member

@BONNe BONNe commented on 44d20a2 Dec 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compile
This is the default scope, used if none is specified. Compile dependencies are available in all classpaths of a project. Furthermore, those dependencies are propagated to dependent projects.

provided
This is much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive.

Basically -> compile is transitive, provided not.

@Poslovitch
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I get it, thanks. Then we'd need to run through all of the POMs and to update that...

@tastybento
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, you just need to put ‘compile’ as the scope on Bentobox and then the addons do not need to reference Vault in their POMs?

@BONNe
Copy link
Member

@BONNe BONNe commented on 44d20a2 Dec 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as long as they have BentoBox as dependency.

Please sign in to comment.