Can't get 5.0.0-alpha5 from Maven

I'm having trouble getting the x-pack plugin 5.0.0-alpha5 from Maven to download using SBT. I added the Maven repository ( "elasticsearch-releases" at "https://maven.elasticsearch.org/releases"), but still no luck. Here is the output from SBT.

Error:Error while importing SBT project:
[info] Resolving org.ow2.asm#asm;4.1 ...
[info] Resolving org.ow2.asm#asm-tree;4.1 ...
[info] Resolving org.ow2.asm#asm-analysis;4.1 ...
[info] Resolving org.ow2.asm#asm-util;4.1 ...
[info] Resolving jline#jline;2.12.1 ...
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: org.elasticsearch.plugin#transport-netty4-client-client;5.0.0-alpha5: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn] 	Note: Unresolved dependencies path:
[warn] 		org.elasticsearch.plugin:transport-netty4-client-client:5.0.0-alpha5
[warn] 		  +- org.elasticsearch.plugin:x-pack:5.0.0-alpha5 (/Users/robert-blankenship/my-project/build.sbt#L6-12)
[warn] 		  +- com.personal:my-project_2.11:0.1
[trace] Stack trace suppressed: run 'last ec2-tools/*:update' for the full output.
[trace] Stack trace suppressed: run 'last ec2-tools/*:ssExtractDependencies' for the full output.
[error] (my-project/*:update) sbt.ResolveException: unresolved dependency: org.elasticsearch.plugin#transport-netty4-client-client;5.0.0-alpha5: not found
[error] (my-project/*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.elasticsearch.plugin#transport-netty4-client-client;5.0.0-alpha5: not found
[error] Total time: 5 s, completed Aug 23, 2016 10:58:48 AM

The 5.0.0-alpha4 dependency downloads just fine, but I can't find the XPackTransportClient class in it. I'm following the XPack documentation at https://www.elastic.co/guide/en/x-pack/v5.0.0-alpha5-docs/java-clients.html

Hi Robert,

The XPackTransportClient is new in alpha 5. It looks like there is a bug in the generated pom file for alpha5:

<dependency>
  <groupId>org.elasticsearch.plugin</groupId>
  <artifactId>transport-netty4-client-client</artifactId>
  <version>5.0.0-alpha5</version>
  <scope>compile</scope>
</dependency>

That dependency should just be transport-netty4-client, which is published to maven central. In your build, can you manually exclude the bad dependency and add one for the correct one, which would be (for maven):

<dependency>
  <groupId>org.elasticsearch.plugin</groupId>
  <artifactId>transport-netty4-client</artifactId>
  <version>5.0.0-alpha5</version>
  <scope>compile</scope>
</dependency>

Hey Jaymode,

I'm using Scala; here is my build.sbt file:

resolvers += "elasticsearch-releases" at "https://maven.elasticsearch.org/releases"

libraryDependencies ++= Seq(
  "com.amazonaws" % "aws-java-sdk" % "1.9.8",
  "com.jcraft" % "jsch" % "0.1.53",
  "org.elasticsearch.plugin" % "transport-netty4-client" % "5.0.0-alpha5",
  "org.elasticsearch.plugin" % "x-pack" % "5.0.0-alpha5",
  "org.elasticsearch.client" % "transport" % "5.0.0-alpha5"
)

I still meet the same error. Is there a way to ignore a sub-dependency then? Or can we update the .pom file?

maybe try swapping the x-pack dependency line with:

"org.elasticsearch.plugin" % "x-pack" % "5.0.0-alpha5" exclude("org.elasticsearch.plugin", "transport-netty4-client-client")