[jbosstools-dev] Special profile for java 1.7 on mac - how to do it

Martin Malina mmalina at redhat.com
Thu Nov 15 09:18:50 EST 2012


Hi Mickael and Nick,

We've been having a problem with running our bot tests on OS X with java 1.7. This is what we get:
java.awt.AWTException: headless environment
To overcome this, we need to add this property to the tycho surefire argLine: -Dawt.toolkit=sun.lwawt.macosx.LWCToolkit

The question is how to do it?
We tried this:
        <profiles>
                <profile>
                        <id>mac17</id>
                        <activation>
                                <os>
                                        <family>mac</family>
                                </os>
                                <jdk>1.7</jdk>
                        </activation>
                        <properties>
                                <systemProperties>-Dawt.toolkit=sun.lwawt.macosx.LWCToolkit</systemProperties>
                        </properties>
                </profile>

But the problem is that maven uses OR with multiple conditions instead of AND (there has been an open bug report for this for a couple of years).

Do you have any idea how to overcome this? Of course you can always manually enable such profile, but that's not really an option if you want to run a matrix job in Jenkins.

Also, if we find a solution for this, could we add it to the parent pom?

Thanks,
Martin

--
Martin Malina
JBoss QA Engineer
Red Hat Czech s.r.o.
Purkynova 99
612 45 Brno, Czech Republic

Tel.: +420 532 294 265




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20121115/50add5ad/attachment.html 


More information about the jbosstools-dev mailing list