<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<artifactId>org.springframework.tooling.ls.repository</artifactId>

	<parent>
		<groupId>org.springframework.boot.ide</groupId>
		<artifactId>org.springframework.boot.ide.servers</artifactId>
		<version>4.5.1-SNAPSHOT</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	
	<packaging>eclipse-repository</packaging>
  
	<properties>
		<dist.project>sts4-language-servers</dist.project>
	</properties>  

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<id>upload-repo</id>
						<phase>deploy</phase>
						<configuration>
							<target>

								<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
								<taskdef resource="org/springframework/build/aws/ant/antlib.xml" />

								<property name="site.target.dir" value="${project.build.directory}" />

								<s3 accessKey="${dist.accessKey}" secretKey="${dist.secretKey}">

									<delete bucketName="${dist.bucket}">
										<fileset dir="${dist.path}">
											<include name="site.xml" />
											<include name="content.jar" />
											<include name="artifacts.jar" />
											<include name="plugins/**" />
											<include name="features/**" />
										</fileset>
									</delete>

									<upload bucketName="${dist.bucket}" toDir="${dist.path}" publicRead="true">
										<fileset dir="${site.target.dir}/repository">
											<include name="**/*" />
											<include name="**" />
										</fileset>
									</upload>

								</s3>

							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.springframework.build</groupId>
						<artifactId>org.springframework.build.aws.ant</artifactId>
						<version>3.0.6.RELEASE</version>
					</dependency>
					<dependency>
						<groupId>net.java.dev.jets3t</groupId>
						<artifactId>jets3t</artifactId>
						<version>0.8.1</version>
					</dependency>
					<dependency>
						<groupId>ant-contrib</groupId>
						<artifactId>ant-contrib</artifactId>
						<version>20020829</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>
</project>
