Forgot my win32.xml that is in my src/main/assembly/jar folder: <?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <id>win32</id> <formats> <format>jar</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <unpack>true</unpack> <outputDirectory></outputDirectory> </dependencySet> <dependencySet> <outputDirectory></outputDirectory> <unpack>true</unpack> <scope>provided</scope> <includes> <include>org.eclipse:swt-win32</include> </includes> </dependencySet> </dependencySets> </assembly> On Wed, Aug 27, 2008 at 11:42 AM, Andrew Robinson <[EMAIL PROTECTED]> wrote: > My pom is huge, but here are some snippets: > ... > <properties> > ... > <eclipse-version>3.3.2</eclipse-version> > </properties> > > ... > <dependencies> > ... > <!-- JFace and SWT: --> > <dependency> > <groupId>org.eclipse</groupId> > <artifactId>eclipse-jface</artifactId> > <version>${eclipse-version}</version> > </dependency> > > <dependency> > <groupId>org.eclipse</groupId> > <artifactId>eclipse-equinox-common</artifactId> > <version>${eclipse-version}</version> > </dependency> > > <dependency> > <groupId>org.eclipse</groupId> > <artifactId>eclipse-core-commands</artifactId> > <version>${eclipse-version}</version> > </dependency> > > <dependency> > <groupId>org.eclipse</groupId> > <artifactId>eclipse-osgi</artifactId> > <version>${eclipse-version}</version> > </dependency> > > <dependency> > <groupId>org.eclipse</groupId> > <artifactId>eclipse-ui-workbench</artifactId> > <version>${eclipse-version}</version> > </dependency> > > <!-- native SWT jars --> > <dependency> > <groupId>org.eclipse</groupId> > <artifactId>swt-gtk-linux-x86</artifactId> > <version>${eclipse-version}</version> > <scope>provided</scope> > </dependency> > > <dependency> > <groupId>org.eclipse</groupId> > <artifactId>swt-gtk-linux-x86_64</artifactId> > <version>${eclipse-version}</version> > <scope>provided</scope> > </dependency> > > <dependency> > <groupId>org.eclipse</groupId> > <artifactId>swt-win32</artifactId> > <version>${eclipse-version}</version> > <scope>provided</scope> > </dependency> > > <dependency> > <groupId>org.eclipse</groupId> > <artifactId>macosx-swt</artifactId> > <version>${eclipse-version}</version> > <scope>provided</scope> > </dependency> > ... > <plugins> > ... > <plugin> > <artifactId>maven-assembly-plugin</artifactId> > <version>2.2-beta-2</version> > <executions> > <execution> > <id>make-jar</id> > <phase>package</phase> > <goals> > <goal>attached</goal> > </goals> > <configuration> > <attach>false</attach> > > <descriptorSourceDirectory>src/main/assembly/jar/</descriptorSourceDirectory> > <archive> > <manifest> > <mainClass>mypackage.MyMainClass</mainClass> > </manifest> > </archive> > </configuration> > </execution> > <execution> > <id>make-assembly</id> > <phase>package</phase> > <goals> > <goal>attached</goal> > </goals> > <configuration> > > <descriptorSourceDirectory>src/main/assembly/package/</descriptorSourceDirectory> > </configuration> > </execution> > </executions> > </plugin> > ... > > > Here is an example of my win32.xml file in the > src/main/assembly/package directory: > > <?xml version="1.0" encoding="UTF-8"?> > > <assembly > xmlns="http://maven.apache.org/POM/4.0.0" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <id>win32</id> > <formats> > <format>zip</format> > </formats> > <files> > <file> > <filtered>true</filtered> > <outputDirectory>/</outputDirectory> > <source>src/main/assembly/windows/runMyApplication.cmd</source> > </file> > <file> > <destName>${pom.artifactId}-${pom.version}.jar</destName> > <source>target/${pom.artifactId}-${pom.version}-win32.jar</source> > </file> > </files> > </assembly> > > Hope that helps, > Andrew > > On Wed, Aug 27, 2008 at 9:09 AM, Carfield Yim <[EMAIL PROTECTED]> wrote: >> >> So you are creating a jar with correct dependence classes and run test base >> on that jar? Not sure how can I do that... would you sure you pom.xml for me >> to refer to? >> >> >> Andrew Robinson-5 wrote: >>> >>> I used the maven assembly plugin to pull in the correct Jar. I have >>> all 3 jars (linux, Mac and Windows) as "provided" so that they are >>> there for compilation but they don't get automatically included in the >>> release. You can also have a profile to trigger on the correct current >>> OS, but that will not help you for releases, as you may want to >>> package a windows build on Linux. >>> >>> -Andrew >>> >>> On Tue, Aug 26, 2008 at 1:23 PM, Carfield Yim <[EMAIL PROTECTED]> >>> wrote: >>>> >>>> Actually what I like to do is to tell maven to use >>>> System.getProperty("user.os") and select the right dependence, is that >>>> possible? >>>> >>>> >>>> Carfield Yim wrote: >>>>> >>>>> I see... thanks, now I can resolve and download the correct swt library. >>>>> However, we would like to make the test running with maven correctly for >>>>> Windows and Linux. How can I tell maven to use correct platform of >>>>> library? >>>>> >>>>> >>>>> lukewpatterson wrote: >>>>>> >>>>>> These are in the repo >>>>>> >>>>>> <groupId>org.eclipse.swt.gtk.linux</groupId> >>>>>> <artifactId>x86_64</artifactId> >>>>>> [1] >>>>>> >>>>>> <groupId>org.eclipse.swt.gtk.linux</groupId> >>>>>> <artifactId>x86</artifactId> >>>>>> [2] >>>>>> >>>>>> The (groupId/artifactId)s are different than what you had listed. >>>>>> >>>>>> >>>>>> >>>>>> [1] - >>>>>> http://repo1.maven.org/maven2/org/eclipse/swt/gtk/linux/x86_64/3.3.0-v3346/ >>>>>> [2] - >>>>>> http://repo1.maven.org/maven2/org/eclipse/swt/gtk/linux/x86/3.3.0-v3346/ >>>>>> >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Problem-of-resolving-eclipse-swt-linux-library-tp19103219p19168597.html >>>> Sent from the Maven - Users mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> -- >> View this message in context: >> http://www.nabble.com/Problem-of-resolving-eclipse-swt-linux-library-tp19103219p19183049.html >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
