Yes, that is exactly what I was trying to do. However none of these Eclipse
properties appear to be available at runtime.

For example, in my Eclipse Configuration Details dialog the first few
"System properties" are as shown below. I can access all of the Java System
properties, however the Eclipse properties (e.g., eclipse.buildId) are not
available at runtime so I can't use them in my Maven profile.

This seems like such a standard situation I was a bit surprised that there
doesn't appear to be an easy way to tell that a Maven build has been
launched from within Eclipse. Is there any way to detect this and use a
property to activate (or not activate) a Maven profile?

This is the first part of my Eclipse Configuration Details -- note that the
properties are listed as System properties. I suspect that the reason I
don't see these during Maven build execution is because Eclipse is launching
the build independently of the Eclipse execution per se.

*** Date: Friday, January 9, 2009 7:57:38 AM PT

*** Platform Details:

*** System properties:
awt.toolkit=sun.awt.windows.WToolkit
eclipse.buildId=M20080221-1800
eclipse.commands=-os
win32
-ws
win32
-arch
x86


Eugene Kuleshov wrote:
> 
> 
>   You can look at the active system properties in the Eclipse 
> configuration details from Help / About Eclipse SDK / Configuration 
> Details. There is several properties named like eclipse.*, e.g. 
> eclipse.buildId
> 
>   regards,
>   Eugene
> 
> 
> stug23 wrote:
>> I am trying to work around a bug related to the Maven embedder. I would
>> like
>> to define a profile wherein activation is controlled by a property which
>> is
>> intrinsically available in Eclipse so that I can disable the profile when
>> running a Maven build in Eclipse.
>>
>> I tried to use 'eclipse.product=org.eclipse.platform.ide' which is
>> available
>> in the Eclipse Configuration Details but can't seem to get Maven to
>> pickup
>> this property. I want the activation to be based solely on a property so
>> that the profile doesn't need to set outside of Eclipse.
>>
>> Is there a way to do this?
>>
>> Note that I would rather not do this at all however the bug
>> (NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory):
>>
>>   <http://jira.codehaus.org/browse/MNGECLIPSE-847>
>>
>> has not yet been fixed and users are running into problems where
>> resources
>> don't get copied because of this bug.
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-property-that-can-be-used-to-activate-a-profile-in-Eclipse--tp21363974p21375131.html
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to