<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>

	<parent>
		<groupId>dev.gould</groupId>
		<artifactId>lingo</artifactId>
		<version>1.0</version>
	</parent>

	<artifactId>lingo-server</artifactId>
	<name>Lingo :: Server</name>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<version>${project.version}</version>
			<artifactId>lingo-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-websocket</artifactId>
		</dependency>
	</dependencies>

	<build>
		<finalName>lingo</finalName>
		<plugins>
			<!-- Repackage as executable JAR (java -jar) -->
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<!-- Enable hot refreshing of resources -->
					<addResources>true</addResources>
					<image>
						<name>docker.io/charego/lingo</name>
					</image>
				</configuration>
			</plugin>
			<!-- How to build image directly to Docker daemon: -->
			<!--     $ mvn jib:dockerBuild -->
			<!-- How to build image and publish to Docker registry: -->
			<!--     $ mvn jib:build -->
			<plugin>
				<groupId>com.google.cloud.tools</groupId>
				<artifactId>jib-maven-plugin</artifactId>
				<version>3.3.1</version>
				<configuration>
					<!-- Enable this setting to allow pushes to local Docker registry -->
					<!--<allowInsecureRegistries>true</allowInsecureRegistries>-->
					<from>
						<image>eclipse-temurin:19-jre</image>
					</from>
					<to>
						<image>docker.io/charego/lingo</image>
					</to>
					<container>
						<mainClass>dev.gould.lingo.server.LingoServer</mainClass>
						<ports>
							<port>8080</port>
						</ports>
					</container>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>
