I've got my nifty tycho / maven build system running now to do a cross platform build. As part of this I have some rootfiles defined for my different platforms. Some of the root files are text files that I'm actually expecting to be at the current working directory when the user launches my application with an os-specific script that I include.
My problem arises on OSX; OSX has the different structure namely myapplication.app/Contents/MacOS/myapplication is the actual application. My rootfiles get placed NOT inside that directory, instead they are placed at the top level (parallel to myapplication.app). My script launches this by calling open –a myapplication.app. Current working directory when I run this myapplication.app/Contents/MacOS/.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>package</id>
<phase>package</phase>
<configuration>
<!-- this is the bit I don't know how to constrain -->
<environments>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
<target>
<tasks>
<echo message="moving configuration files for osx"/>
<move todir="${basedir}/target/products/mypluginname/macosx/cocoa/x86_64/STWorkbench.app/Contents/MacOS">
<fileset dir="${basedir}/target/products/mypluginname/macosx/cocoa/x86_64">
<include name="**/file1"/>
<include name="**/file2"/>
</fileset>
</move>
</tasks>
</target>
<goals>
<goal>run</goal>
</goals>
</configuration>
</execution>
</executions>
</plugin>
Thanks!
Tamar