I think the way for me to solve this is to use 
<file><exists>blah</exists></file> in two different profiles checking for the 
two different locations of classes.jar. If neither exists, we'll use the 
default profile, which points to the Windows/Linux location.

I assume that when Oracle actually releases a Mac Java, they will use the 
standard locations for these things rather than Apple's non-standard locations, 
but it's just an assumption. I'm not counting on anything, including that 
Oracle will even release a Mac Java. ;-)

-K

On Jul 31, 2011, at 6:44 PM, Kathryn Huxtable wrote:

> Actually, can I require that a profile be activated when both a jdk version 
> *and* an os family are selected, or is it always an "or" comparison? -K
> 
> On Jul 31, 2011, at 6:41 PM, Kathryn Huxtable wrote:
> 
>> I've been working on a Swing pluggable look & feel, and was needing to 
>> include rt.jar. I have a separate profile for the Mac. The relevant sections 
>> of my pom look like:
>> 
>> ...
>> <build>
>>      <plugins>
>>              <plugin>
>>                      <groupId>org.apache.maven.plugins</groupId>
>>                      <artifactId>maven-compiler-plugin</artifactId>
>>                      <version>2.3.2</version>
>>                      <configuration>
>>                              <source>1.6</source>
>>                              <target>1.6</target>
>>                              <compilerArguments>
>>                                      
>> <bootclasspath>${java.home}/lib/rt.jar</bootclasspath>
>>                              </compilerArguments>
>>                      </configuration>
>>              </plugin>
>>      </plugins>
>> ...
>> <profiles>
>>      <profile>
>>              <id>mac</id>
>>              <activation>
>>                      <os>
>>                              <family>mac</family>
>>                      </os>
>>              </activation>
>>              <build>
>>                      <plugins>
>>                              <!-- Configure the compiler plugin to use JDK 
>> 1.6. -->
>>                              <plugin>
>>                                      
>> <groupId>org.apache.maven.plugins</groupId>
>>                                      
>> <artifactId>maven-compiler-plugin</artifactId>
>>                                      <version>2.3.2</version>
>>                                      <configuration>
>>                                              <source>1.6</source>
>>                                              <target>1.6</target>
>>                                              <compilerArguments>
>>                                                      
>> <bootclasspath>${java.home}/bundle/Classes/classes.jar</bootclasspath>
>>                                              </compilerArguments>
>>                                      </configuration>
>>                              </plugin>
>>                      </plugins>
>>              </build>
>>      </profile>
>> ...
>> 
>> I think most artifacts don't need to include rt.jar, so I don't know what 
>> you'd do. I suppose we can add the JDK version to the activation profile...
>> 
>> I don't think you folks need to do anything, but I was bewildered, and 
>> Google wasn't much help, though I did eventually find a solution through a 
>> Google search, just not the first several I tried.
>> 
>> -K
>> 
>> On Jul 31, 2011, at 6:27 PM, Barrie Treloar wrote:
>> 
>>> On Mon, Aug 1, 2011 at 8:23 AM, Kathryn Huxtable
>>> <[email protected]> wrote:
>>>> Okay, I see. Apple changed the location of classes.jar, which is what they 
>>>> call rt.jar in a recent release of Java, possibly update 26.
>>> 
>>> How did you fix this then?
>>> 
>>> Do we need to configure maven to understand this natively?
>>> 
>>> ---------------------------------------------------------------------
>>> 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]
>> 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to