Using OS activation rather than command line profile specification?

27 views
Skip to first unread message

Kevin Clarke

unread,
May 30, 2013, 5:28:56 PM5/30/13
to cmake-maven-...@googlegroups.com
Hi,

I wonder whether you've considered using OS activation as the default rather than requiring that someone pass in the -P<profile> command?

Instead of the current profile definitions in the pom, you'd have:

<profile>
<id>linux</id>
<activation>
<os>
<name>Linux</name>
</os>
</activation>
<properties>
<cmake.classifier>linux</cmake.classifier>
</properties>
</profile>

You could still override it on the command line with: -Pwindows,-linux if you were on Linux but had a cross-compiling setup for building Windows binaries.

Thanks,
Kevin

cowwoc

unread,
May 30, 2013, 5:57:31 PM5/30/13
to cmake-maven-...@googlegroups.com

    It's a nice feature but (like everything else in Maven) poorly documented. There is no mention in the official documentation of suppressing profiles by prefixing them with a minus. I hadn't heard of such a thing until you just mentioned it.

Gili
--
You received this message because you are subscribed to the Google Groups "cmake-maven-project-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cmake-maven-projec...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kevin Clarke

unread,
May 30, 2013, 9:57:53 PM5/30/13
to cmake-maven-...@googlegroups.com

On Thursday, May 30, 2013 5:57:31 PM UTC-4, cowwoc wrote:

    It's a nice feature but (like everything else in Maven) poorly documented.

I agree.  I wrote a ctest mojo and then started writing tests for it.  Learning how to write integration tests for a Maven plugin has been a journey through bad/lacking documentation and broken toolkits.  Gah.  Anyway, will probably submit a patch for your consideration but just wanted to see how you felt about the OS activation stuff to know whether to include it with the rest or not.

Thanks,
Kevin

cowwoc

unread,
May 30, 2013, 11:08:45 PM5/30/13
to cmake-maven-...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "cmake-maven-project-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cmake-maven-projec...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

    I'm open to this change so long as we document how to override it somewhere (probably both in the Wiki and POM file). Did you actually try -P-linux to make sure it works?

Gili

Kevin S. Clarke

unread,
May 30, 2013, 11:56:15 PM5/30/13
to cmake-maven-...@googlegroups.com
Yes, confirmed with:

mvn -Pwindows,-linux help:active-profiles

Kevin



--
You received this message because you are subscribed to a topic in the Google Groups "cmake-maven-project-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cmake-maven-project-users/fVbtasixqsQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cmake-maven-projec...@googlegroups.com.

Kevin S. Clarke

unread,
May 30, 2013, 11:58:26 PM5/30/13
to cmake-maven-...@googlegroups.com
With the OS activation set (and working without the -linux) on my linux machine, obviously.

Kevin
Reply all
Reply to author
Forward
0 new messages