user2924127
user2924127

Reputation: 6240

How do you update a maven managed dependency?

How do I update a maven managed dependency?

I downloaded a dependcy that was in milestone 4 (a few months ago), but now there is milestone 5 available. How do I update this in netbeans?

<properties>
    <vertx.version>3.0.0-milestone4</vertx.version>
</properties>
<dependencies>
    <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-core</artifactId>
        <version>${vertx.version}</version>
    </dependency>
    <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-apex</artifactId>
        <version>${vertx.version}</version>
    </dependency>
</dependencies>

Upvotes: 1

Views: 8247

Answers (2)

Multiverse
Multiverse

Reputation: 1

Assuming you are having a Project configured in Netbeans and want to update its dependency to latest one. This is logically possible, but Netbeans does not have any such feature. Below is the logical raeson, why this is not a good approach to automate:

  1. As Netbeans and even developer(sometimes) does not have any idea of impact of new version of dependency on your project. Weather it break some of its earlier implementation, or need more XML based definition or it can be anything.
  2. Which type of release you want to get update in your maven POM? That need to be identify, while you are building your project. I recommend you to use PROD based general release of any dependency, which solve many unknown problems of your project.

Now, how to solve this:

  1. You can build your Netbeans plugin for this type of very specific requirement, with all possible configuration required.

  2. You can build windows/unix script that will check with main repository and update your Maven POM accordingly based on you specific configuration.

Let me know, if above response is not suffice.

Upvotes: 0

Elliott Frisch
Elliott Frisch

Reputation: 201447

If I understand your question, change

<vertx.version>3.0.0-milestone4</vertx.version>

to

<vertx.version>3.0.0-milestone5</vertx.version>

when you save your pom.xml I would expect that maven would update your dependencies.

Upvotes: 4

Related Questions