Commit 1b83f6c6 authored by Alexander Diewald's avatar Alexander Diewald

Implement final artifact patching in maven.

Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent 4d3ae388
......@@ -16,17 +16,6 @@
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<includeAllDependencies>true</includeAllDependencies>
<profileProperties>
<macosx-bundled>true</macosx-bundled>
</profileProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
......@@ -34,7 +23,7 @@
<executions>
<execution>
<!-- install the product using the p2 director -->
<id>materialize-products</id>
<id>default-materialize-products</id>
<goals>
<goal>materialize-products</goal>
</goals>
......@@ -42,6 +31,7 @@
<execution>
<!-- create zip file with the installed product -->
<id>archive-products</id>
<phase>verify</phase>
<goals>
<goal>archive-products</goal>
</goals>
......@@ -61,6 +51,41 @@
</products>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>patch-product</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="Final product patching">
<!-- Linux build -->
<echo message="Creating linux launcher script..."/>
<move file="${project.build.directory}/products/org.fortiss.af3.phoenix.product/linux/gtk/x86_64/autofocus3/autofocus3-phoenix" tofile="${project.build.directory}/products/org.fortiss.af3.phoenix.product/linux/gtk/x86_64/autofocus3/autofocus3-phoenix.bin"/>
<move file="${project.build.directory}/products/org.fortiss.af3.phoenix.product/linux/gtk/x86_64/autofocus3/autofocus3-phoenix.ini" tofile="${project.build.directory}/products/org.fortiss.af3.phoenix.product/linux/gtk/x86_64/autofocus3/autofocus3-phoenix.bin.ini"/>
<echo file="${project.build.directory}/products/org.fortiss.af3.phoenix.product/linux/gtk/x86_64/autofocus3/autofocus3-phoenix" append="false">
#!/bin/sh
LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:plugins/com.microsoft.z3_2.14.0.${buildQualifier}/lib/x64 ./autofocus3-phoenix.bin $$*
</echo>
<chmod perm="a+x" file="${project.build.directory}/products/org.fortiss.af3.phoenix.product/linux/gtk/x86_64/autofocus3/autofocus3-phoenix"/>
<!-- MacOS build -->
<echo message="Moving MacOS Z3 lib..."/>
<copy todir="${project.build.directory}/products/org.fortiss.af3.phoenix.product/macosx/cocoa/x86_64/AutoFOCUS3.app/Contents/MacOS/">
<fileset dir="${project.build.directory}/products/org.fortiss.af3.phoenix.product/macosx/cocoa/x86_64/AutoFOCUS3.app/Contents/Eclipse/plugins/com.microsoft.z3_2.14.0.${buildQualifier}/lib/x64/">
<include name="*.dylib"/>
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
......@@ -18,4 +18,21 @@
<!-- Do not skip the deployment here -->
<maven.deploy.skip>false</maven.deploy.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<includeAllDependencies>true</includeAllDependencies>
<profileProperties>
<macosx-bundled>true</macosx-bundled>
</profileProperties>
</configuration>
</plugin>
</plugins>
</build>
</project>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment