0
votes

I'm using play 2.2 framework, I'm developing the module and defined it as snapshot. I have published the snapshot to nexus but when I try to deploy the same without changing version or appname redeploy fails with below error:

[info] Done packaging. java.io.IOException: Access to URL http://mycompany.com/nexus/content/repositories/snapshots/com/mymodule/1.0.1-SNAPSHOT/mymodule-1.0.1-SNAPSHOT.pom was refused by the server: Forbidden at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:79 at org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:231) at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150) at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84) at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130) at org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:234) at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)

I know the reason for this failure, Nexus is denying the deploy due to the fact that the previous snapshot is also exactly same w/o timestamp. Question is how to attach timestamp in Build.scala or any configuration in play framework that enable to redeploy of snapshots multiple times to Nexus. This is obviously is not a problem in maven project, but somehow evident in play framework projects.

Thanks in advance.

Thanks Aravind

1

1 Answers

0
votes

Use the aether deploy instead of the sbt/ivy publish. This should create the metadata on the server correctly.

https://github.com/arktekk/sbt-aether-deploy