Browse Source

乐教通

zouxuan 1 year ago
parent
commit
564cade986
3 changed files with 38 additions and 24 deletions
  1. 6 1
      audio-analysis/pom.xml
  2. 0 23
      cms/pom.xml
  3. 32 0
      pom.xml

+ 6 - 1
audio-analysis/pom.xml

@@ -129,13 +129,18 @@
 			<version>4.1.68.Final</version>
 		</dependency>
 	</dependencies>
-	
+
 	<build>
 		<plugins>
 			<plugin>
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
 			</plugin>
+			<plugin>
+				<groupId>com.spotify</groupId>
+				<artifactId>docker-maven-plugin</artifactId>
+				<version>1.2.2</version>
+			</plugin>
 		</plugins>
 	</build>
 </project>

+ 0 - 23
cms/pom.xml

@@ -79,7 +79,6 @@
 			<artifactId>dynamic-datasource</artifactId>
 		</dependency>
 	</dependencies>
-	
 	<build>
 		<plugins>
 			<plugin>
@@ -90,28 +89,6 @@
 				<groupId>com.spotify</groupId>
 				<artifactId>docker-maven-plugin</artifactId>
 				<version>1.2.2</version>
-				<executions>
-					<execution>
-						<id>build-image</id>
-						<phase>package</phase>
-						<goals>
-							<goal>build</goal>
-						</goals>
-					</execution>
-				</executions>
-				<configuration>
-					<imageName>mec/${project.artifactId}:${project.version}</imageName>
-					<dockerHost>http://82.156.200.45:5000</dockerHost>
-					<baseImage>java:8</baseImage>
-					<entryPoint>["nohup", "java", "-jar", "-Dspring.profiles.active=dev", "-Xms256m", "-Xmx512m", "-XX:PermSize=128M", "-XX:MaxPermSize=256m", "/${project.name}.jar"]</entryPoint>
-					<resources>
-						<resource>
-							<targetPath>/</targetPath>
-							<directory>${project.build.directory}</directory>
-							<include>${project.name}.jar</include>
-						</resource>
-					</resources>
-				</configuration>
 			</plugin>
 		</plugins>
 	</build>

+ 32 - 0
pom.xml

@@ -22,6 +22,9 @@
 		<google.zxing.version>3.4.0</google.zxing.version>
 		<redisson.version>3.11.5</redisson.version>
 		<maven.test.skip>true</maven.test.skip>
+		<docker.host>http://82.156.200.45:2375</docker.host>
+		<docker.registry.repository>82.156.200.45:5000</docker.registry.repository>
+		<docker.maven.plugin.version>1.2.2</docker.maven.plugin.version>
 	</properties>
 
 	<dependencyManagement>
@@ -388,6 +391,35 @@
 						</execution>
 					</executions>
 				</plugin>
+				<plugin>
+					<groupId>com.spotify</groupId>
+					<artifactId>docker-maven-plugin</artifactId>
+					<version>${docker.maven.plugin.version}</version>
+					<executions>
+						<execution>
+							<id>build-image</id>
+							<phase>package</phase>
+							<goals>
+								<goal>build</goal>
+								<goal>push</goal>
+							</goals>
+						</execution>
+					</executions>
+					<configuration>
+						<imageName>${docker.registry.repository}/${project.artifactId}:${project.version}</imageName>
+						<dockerHost>${docker.host}</dockerHost>
+						<baseImage>java:8</baseImage>
+						<entryPoint>["java", "-jar","-Dspring.profiles.active=dev","/${project.build.finalName}.jar"]
+						</entryPoint>
+						<resources>
+							<resource>
+								<targetPath>/</targetPath>
+								<directory>${project.build.directory}</directory>
+								<include>${project.build.finalName}.jar</include>
+							</resource>
+						</resources>
+					</configuration>
+				</plugin>
 			</plugins>
 		</pluginManagement>
 		<plugins>