Maven 3 and timestamps

2019-02-18 12:07发布

I have various questions regarding Maven 3 and Nexus repository. At our nexus repository I would like to resolve only timestamp dependencies. That is to say I would like to prevent downloading timestapped dependencies to my local repository. And also at my nexus configuration having only latest snapshot jar for a version is totally fine.

My question is regarding timestamped dependencies at nexus and local repository.

  1. Is having only latest Snapshot at repository a good practice? Why or why not?
  2. I have done at my plugin management section of the parent pom of the deploy plugin <uniqueVersion>false</uniqueVersion> but at hudson I still continue to see timestamps at jar like this bundle-service-client-1.0-20110209.145744-25
  3. I have came across a comment at another question,

The timestamped artifacts should never be see inside your local (~/.m2/repository) repository. If they are, something is wrong.

Why?

1条回答
三岁会撩人
2楼-- · 2019-02-18 12:27

Quoting from the relevant section in Maven 3.x Compatibility Notes

The setting false for a distribution repository has no effect in version 3.x, snapshot artifacts will always be deployed using a timestamped version.

Also, look at the comments in this nexus jira bug on a nice explanation to your other questions.

查看更多
登录 后发表回答