[英]Akka missing Config Properties Akka.Version Akka.Stream
Packaging Akka
application. 包装
Akka
应用程序。
Hi I am trying to package my application into an executable Jar
. 嗨,我正在尝试将我的应用程序打包到可执行的
Jar
。 Below is my Pom.xml
以下是我的
Pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.personalProjects</groupId>
<artifactId>MyAkkaProject</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>allinone</shadedClassifierName>
<artifactSet>
<includes>
<include>*:*</include>
</includes>
</artifactSet>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>reference.conf</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>akka.Main</Main-Class>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-stream_2.12</artifactId>
<version>2.5.18</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-stream-kafka_2.12</artifactId>
<version>1.0-M1</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.1</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.4.3</version>
</dependency>
</dependencies>
</project>
I can't seem to get the Jar
to work, it states missing akka.streams
config. 我似乎无法使
Jar
正常工作,它指出缺少akka.streams
配置。
I went through the official doc here but it doesn't seem to work. 我在这里浏览了官方文档,但似乎没有用。
If I copy all Jar
to output directory everything works just fine but the issue seems to be when I try to create a big fat jar
with all the dependencies in it. 如果我将所有
Jar
复制到输出目录,则一切正常,但问题似乎出在我尝试创建一个包含所有依赖项的big fat jar
时。
my MANIFEST.INF
is below: 我的
MANIFEST.INF
如下:
Manifest-Version: 1.0
Main-Class: MyAkkaProject.App
where App
is the class with psvm
and MyAkkaProject` is the package name 其中
App
是psvm
的类,而MyAkkaProject`是软件包的名称
我解决了问题,当我运行他的项目甚至构建它时,问题就是我的IDE
,它没有使用Maven Lifecycle
命令,因此未触发该插件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.