Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven vertx http服务工厂在fat jar中不工作_Maven_Vert.x - Fatal编程技术网

Maven vertx http服务工厂在fat jar中不工作

Maven vertx http服务工厂在fat jar中不工作,maven,vert.x,Maven,Vert.x,为了从HTTP部署verticle,我在pom.xml文件中添加了插件Vertex HTTP服务工厂: <dependency> <groupId>io.vertx</groupId> <artifactId>vertx-http-service-factory</artifactId> <version>3.2.1</version> </dependency> 当我从Ec

为了从HTTP部署verticle,我在
pom.xml
文件中添加了插件
Vertex HTTP服务工厂

<dependency>
    <groupId>io.vertx</groupId>
    <artifactId>vertx-http-service-factory</artifactId>
    <version>3.2.1</version>
</dependency>
当我从Eclipse启动它时,我可以工作,但是当我从胖罐子启动它时,我有以下错误:

ava.lang.ClassNotFoundException: //bintray.com/artifact/download/vietj/testgenrepo/helloworld.zip::helloworld
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at io.vertx.core.impl.JavaVerticleFactory.createVerticle(JavaVerticleFactory.java:42)
   at io.vertx.core.impl.DeploymentManager.lambda$doDeployVerticle$163(DeploymentManager.java:142)
   at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:135)
   at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100)
   at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:131)
   at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:103)
   at io.vertx.core.impl.DeploymentManager.deployVerticle(DeploymentManager.java:91)
   at io.vertx.core.impl.VertxImpl.deployVerticle(VertxImpl.java:534)
   at io.vertx.core.impl.VertxImpl.deployVerticle(VertxImpl.java:521)
   at Scheduler.start(Scheduler.java:22)
   at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:111)
   at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$169(DeploymentManager.java:407)
   at io.vertx.core.impl.ContextImpl.lambda$wrapTask$15(ContextImpl.java:314)
   at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)
   at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
   at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
   at java.lang.Thread.run(Unknown Source)
似乎fat jar中没有加载
vertxttp服务工厂

pom.xml文件中可能有需要修改的内容,但我不知道是什么。有什么想法吗?

如果我注册了HttpSecureServiceFactory,它就会起作用:

vertx.registerVerticleFactory(new HttpSecureServiceFactory());
然后,您可以从fat JAR部署http verticle:

vertx.registerVerticleFactory(new HttpSecureServiceFactory());
vertx.deployVerticle("https://bintray.com/artifact/download/vietj/testgenrepo/helloworld.zip::helloworld");