public class MyDeployingVerticle extends AbstractVerticle {
public static void main(String[] args) {
Runner.runExample(MyDeployingVerticle.class);
}
@Override
public void start(Future<Void> future) throws Exception {
System.setProperty("vertx.maven.localRepo", "/Users/zzy/Documents/work/maven/repository");
// The `my-verticle` is deployed using the following convention:
// `maven:` + groupId + `:` + artifactId + `:` + version + `::` + verticle name
vertx.deployVerticle("maven:io.vertx:maven-service-factory-verticle:3.2.1::my-verticle", ar -> {
if (ar.succeeded()) {
future.complete();
} else {
future.fail(ar.cause());
}
});
}
}
and i run mvn clean package install the project "maven-service-factory-verticle".
and run above the java code main. and throw an exception.
三月 21, 2016 3:52:09 下午 vertx-stack-resolver
信息: Resolving io.vertx:maven-service-factory-verticle:jar:3.2.1
三月 21, 2016 3:52:44 下午 io.vertx.core.Starter
严重: Failed in deploying verticle
java.lang.IllegalArgumentException: Cannot resolve artifact io.vertx:maven-service-factory-verticle:jar:3.2.1 in maven repositories: Could not find artifact io.vertx:maven-service-factory-verticle:jar:3.2.1 in repo0 (https://repo.maven.apache.org/maven2/)
at io.vertx.maven.resolver.ResolverImpl.resolve(ResolverImpl.java:276)
at io.vertx.maven.resolver.ResolverImpl.resolve(ResolverImpl.java:312)
at io.vertx.maven.MavenVerticleFactory.lambda$resolve$1(MavenVerticleFactory.java:113)
at io.vertx.maven.MavenVerticleFactory$$Lambda$7/1364767791.handle(Unknown Source)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$17(ContextImpl.java:296)
at io.vertx.core.impl.ContextImpl$$Lambda$9/1199673596.run(Unknown Source)
at io.vertx.core.impl.OrderedExecutorFactory$OrderedExecutor.lambda$new$265(OrderedExecutorFactory.java:91)
at io.vertx.core.impl.OrderedExecutorFactory$OrderedExecutor$$Lambda$6/1549725679.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
any one can help me?
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/4cf2558b-1f09-425d-8196-03f85176c60c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<02B3C440-0112-4FF8-B94F-5E0A85AE8EE8.png>
三月 21, 2016 5:03:09 下午 io.vertx.core.Starter
严重: Failed in deploying verticle
java.lang.ClassNotFoundException: io.vertx:maven-service-factory-verticle:3.2.1::my-verticle
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at io.vertx.core.impl.JavaVerticleFactory.createVerticle(JavaVerticleFactory.java:42)
at io.vertx.core.impl.DeploymentManager.createVerticles(DeploymentManager.java:186)
at io.vertx.core.impl.DeploymentManager.lambda$doDeployVerticle$157(DeploymentManager.java:159)
at io.vertx.core.impl.DeploymentManager$$Lambda$6/1418385211.handle(Unknown Source)
at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:158)
at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100)
at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:132)
at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:104)
at io.vertx.core.impl.DeploymentManager.deployVerticle(DeploymentManager.java:92)
at io.vertx.core.impl.VertxImpl.deployVerticle(VertxImpl.java:546)
at io.vertx.core.impl.VertxImpl.deployVerticle(VertxImpl.java:510)
at io.vertx.examples.MyDeployingVerticle.start(MyDeployingVerticle.java:17)
at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$163(DeploymentManager.java:429)
at io.vertx.core.impl.DeploymentManager$$Lambda$7/282432134.handle(Unknown Source)
at io.vertx.core.impl.ContextImpl.lambda$wrapTask$18(ContextImpl.java:335)
at io.vertx.core.impl.ContextImpl$$Lambda$8/615634843.run(Unknown Source)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:745)
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/8a489e7f-6237-4f2e-abb8-51e89b15a935%40googlegroups.com.
yes i run mvn clean install
[INFO] --- maven-install-plugin:2.4:install (default-install) @ maven-service-factory-verticle ---
[INFO] Installing /Users/zzy/Documents/work/workspaces/vertx-examples/maven-service-factory-examples/maven-service-factory-verticle/target/maven-service-factory-verticle-3.2.1.jar to /Users/zzy/Documents/work/maven/repository/io/vertx/maven-service-factory-verticle/3.2.1/maven-service-factory-verticle-3.2.1.jar
[INFO] Installing /Users/zzy/Documents/work/workspaces/vertx-examples/maven-service-factory-examples/maven-service-factory-verticle/pom.xml to /Users/zzy/Documents/work/maven/repository/io/vertx/maven-service-factory-verticle/3.2.1/maven-service-factory-verticle-3.2.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
public class MyDeployingVerticle extends AbstractVerticle {
@Override
public void start(Future<Void> future) throws Exception {
System.setProperty("vertx.maven.localRepo", "/Users/zzy/Documents/work/maven/repository");
// The `my-verticle` is deployed using the following convention:
// `maven:` + groupId + `:` + artifactId + `:` + version + `::` + verticle name
vertx.deployVerticle("maven:io.vertx:maven-service-factory-verticle:3.2.1::my-verticle", ar -> {
if (ar.succeeded()) {
future.complete();
} else {
future.fail(ar.cause());
}
});
}
}
but the error still。
三月 21, 2016 5:14:31 下午 io.vertx.core.Starter
On 21 mars 2016, at 11:04, 振亚张 <zhhz...@gmail.com> wrote:
Who once ran this example?
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/60c3a4b8-dfd3-465e-a63f-a676dc4b43a4%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/9b0b00bd-828d-4066-96a5-5bd3c72a4904%40googlegroups.com.