Skip to content
Permalink
Browse files
fix the jar package
  • Loading branch information
空冥 committed Jul 17, 2018
1 parent 5a3d738 commit b1874d20f995eb433750b57e744e009963c27a86
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
@@ -1,9 +1,9 @@
FROM openjdk:8

COPY target/lib /app/lib
COPY target/echo-client-lb-api-1.0-SNAPSHOT.jar /app/echo-client-lb-api.jar
COPY target/kubernetes-demo-consumer-1.0.0-SNAPSHOT.jar /app/kubernetes-demo-consumer-1.0.0-SNAPSHOT.jar

EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app/echo-client-lb-api.jar"]
ENTRYPOINT ["java", "-jar", "/app/kubernetes-demo-consumer-1.0.0-SNAPSHOT.jar"]


@@ -153,10 +153,47 @@
</extensions>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.alibaba.dubbo.demo.consumer.Consumer</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>


<!--指定outputDirectory-->
<outputDirectory>${project.build.directory}/lib</outputDirectory>


<!--
<outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
Alternatively use ${project.build.directory}/classes/lib as OutputDirectory to integrate all jar-files into the main jar, but then you will need to add custom classloading code to load the jars.
-->


<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
@@ -0,0 +1 @@
kubernetes=com.alibaba.dubbo.registry.kubernetes.KubernetesRegistryFactory

0 comments on commit b1874d2

Please sign in to comment.