Skip to content
Snippets Groups Projects
Commit 2ee41366 authored by yannick legoc's avatar yannick legoc
Browse files

split deploy part into ploty package

parent 80506110
Branches
No related tags found
No related merge requests found
#!/bin/bash
# Get the arguments.
projectArtifactId=$1
swtPlatform=$2
projectVersion=$3
destDir=$4
# Check if the version is a snapshot
projectVersionWithoutSnapshot=${projectVersion%SNAPSHOT}
projectVersionWithSnapshot=$projectVersionWithoutSnapshot"SNAPSHOT"
jarFile="target/"$projectArtifactId"-"$swtPlatform"-"$projectVersion".jar"
destFile=$destDir"/"$projectArtifactId"-"$swtPlatform".jar"
cp $jarFile $destFile
echo "Copied $jarFile to $destFile"
if [[ "$projectVersionWithSnapshot" == "$projectVersion" ]]
then
echo "This is a snapshot version, deploying the full jar is not performed"
exit
fi
echo "Deploying the full jar"
......@@ -35,12 +35,8 @@
<url>https://maven.ill.fr/content/repositories/snapshots</url>
</repository>
<repository>
<id>maven-eclipse-repo</id>
<url>http://maven-eclipse.github.io/maven</url>
</repository>
<repository>
<id>maven-gluegen</id>
<url>http://matsim.org/m2repo</url>
<id>ill-repo-eclipse</id>
<url>https://maven.ill.fr/content/repositories/eclipse</url>
</repository>
</repositories>
......@@ -174,88 +170,7 @@
</archive>
</configuration>
</plugin>
<!-- Purge the local repository when deploying the artifact.
This is necessary because the assembly plugin aggregates all the dependencies that could be modified locally, e.g. NomadCommandSystem
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>purge-local-dependencies</id>
<phase>deploy</phase>
<goals>
<goal>purge-local-repository</goal>
</goals>
<configuration>
<excludes>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<!-- Assemble a single jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>fr.ill.ics.client.control.MainWindow</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<SCM-Revision>${buildNumber}</SCM-Revision>
</manifestEntries>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}-${swt.platform}-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- We temporarily copy the full library into the local directories -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<configuration>
<target>
<exec executable="${env.NOMADCLIENT_HOME}/../Ploty/deploy.sh">
<arg value="${project.artifactId}" />
<arg value="${swt.platform}" />
<arg value="${project.version}" />
<arg value="${dest.dir}" />
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment