开发者

Maven is trying to update glassfish plugin from maven.ocean.net.au

We cannot deploy our app as Maven is trying to upd开发者_StackOverflowate glassfish plugin from maven.ocean.net.au repository, although no such repository was defined in our pom. The problem is maven.ocean.net.au isn't online and therefor our build fails. Has this happened to anybody else?


The dependency resolution will only fail if no other repository being used has the version of the glassfish plugin you are attempting to use.

Make sure your maven setup has several other plugin repositories (best is a local repository which proxies requests to remote servers, to build up a huge local cache of Maven artifacts) so that resolution won't fail when a single repo can't be reached.


I have the same problem. However, using the java.net Maven2 Repository cannot solve it, since this is the place where the reference to ocean.net.au repository comes from: http://download.java.net/maven/2/org/glassfish/maven/plugin/maven-glassfish-plugin/2.1/maven-glassfish-plugin-2.1.pom Maybe they should change their .pom?


I guess you're using org.glassfish.maven.plugin:maven-glassfish-plugin:2.2-SNAPSHOT which declares indeed http://maven.ocean.net.au/snapshot as snapshot repository.

My suggestion would be to use a released version of the plugin e.g. version 2.1 (released versions of this plugin are hosted in the java.net Maven2 Repository) or to patch and deploy a version 2.2 to your internal corporate repository (i.e. don't use a snapshot from the Ocean Maven2 Snapshot Repository).


I have the same problem. The only solution I have found at this time is to delete all repositories (or switch them to enabled=false) from all the dependencies (3).

They should put all these repositories into a profile, this is terrible solution. It would be even alright if there was any response from the server, but it simply hangs. Timeout settings are also ignored.


I resolved this in eclipse by right clicking on the POM and creating a new run configuration in offline mode. Apparently, the saved maven builds ignore the global settings and use their own configuration. Of course if you actually need other updates, you'll be in for a nice long wait, but this has helped me.


This is an problem with the .pom of the Glassfish Maven plugin on it's 3.1 version: there are defined 3 repositories that are offline nowadays, and I believe they serve no purpose since everything is in Central. It's probably some leftover of the snapshot that didn't get removed.

I found a dirty way to get rid of the delay produced until maven timed out the request to those offline servers:

  1. Navigate to your local repository
  2. Enter the folder .m2\repository\org\glassfish\maven\plugin\maven-glassfish-plugin\2.1
  3. Open the file maven-glassfish-plugin-2.1.pom with any text editor
  4. Go to the line 146 (in version 3.1) that reads <repositories> and set all 3 repositories disabled by setting <enabled>false</enabled> for both releases and snapshots
  5. Do the same for <pluginRepositories> in line 202 (in version 3.1)
  6. Delete the files maven-glassfish-plugin-2.1.pom.sha1 and maven-glassfish-plugin-2.1.pom.md5 to prevent Maven from downloading them and overwrite these changes

It's not smart, it's not cool and it's not the best solution by far, but at least you'll save several minutes from redeploying once and again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜