You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Hobson <ma...@gmail.com> on 2010/01/14 12:04:19 UTC

Always active profiles

Hi there,

Is there a better way of always activating a profile, unless
explicitly deactivated, than using a dummy property activator?  For
example:

	<activation>
		<property>
			<name>!dummy</name>
		</property>
	</activation>

I can't use activeByDefault since I want the profile to be activated
even when other profiles in the pom are active.

It could be worth introducing an always active activator, something like:

	<activation>
		<active/>
	</activation>

I'll raise an issue if no-one objects.

Cheers,

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Always active profiles

Posted by Mark Hobson <ma...@gmail.com>.
2010/1/15 Wendy Smoak <ws...@gmail.com>:
> On Fri, Jan 15, 2010 at 7:58 AM, Mark Hobson <ma...@gmail.com> wrote:
>
>> But dropping the activation block means that it won't be implicitly
>> activated?
>
> True.  I shouldn't answer questions early in the morning. :)

Hehe, thanks for trying to help anyway.  I've raised an issue to track
this in future:

http://jira.codehaus.org/browse/MNG-4533

Cheers,

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Always active profiles

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Jan 15, 2010 at 7:58 AM, Mark Hobson <ma...@gmail.com> wrote:

> But dropping the activation block means that it won't be implicitly
> activated?

True.  I shouldn't answer questions early in the morning. :)

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Always active profiles

Posted by Mark Hobson <ma...@gmail.com>.
2010/1/15 Wendy Smoak <ws...@gmail.com>:
> I'd probably do it with <name>!noxyz</name> so that _de_activating it
> is intuitive with -Dnoxzy.

Yeah, I had similar thoughts.

> You can do it with less xml by dropping the activation block and
> de-activating by the profile id:
>
> -P !xzy or -P -xzy  (Maven 2.0.10 or later, see
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
> .)

But dropping the activation block means that it won't be implicitly
activated?  Yeah, I'm already deactivating using "-P -<id>" thanks.

Cheers,

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Always active profiles

Posted by Wendy Smoak <ws...@gmail.com>.
On Thu, Jan 14, 2010 at 4:04 AM, Mark Hobson <ma...@gmail.com> wrote:
> Hi there,
>
> Is there a better way of always activating a profile, unless
> explicitly deactivated, than using a dummy property activator?  For
> example:
>
>        <activation>
>                <property>
>                        <name>!dummy</name>
>                </property>
>        </activation>

I'd probably do it with <name>!noxyz</name> so that _de_activating it
is intuitive with -Dnoxzy.

You can do it with less xml by dropping the activation block and
de-activating by the profile id:

-P !xzy or -P -xzy  (Maven 2.0.10 or later, see
http://maven.apache.org/guides/introduction/introduction-to-profiles.html
.)

-- 
Wendy
-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Javascript zip dependency management

Posted by Manos Batsis <ma...@geekologue.com>.
John Ericksen wrote:
> This seems very promising, are there any repositories for javascript 
> dependencies?

There is no reason for special repos - the main repo or any others work 
just fine. For example sarissa is released through maven's central.


> If there is a tinymce dependency and the tinymce compressor library 
> dependency somewhere that would definitely solve my immediate issue.

Well you could patch up one yourself easily and manually put it in your 
local repo. I'm afraid JS devs dont really see any value in using maven 
repositories.


> That would be nice to also have the ability to extract the javascript 
> dependencies into a directory in the target... like /src/main/webapp/js/

Yes I have been thinking about that for jstools, never actually getting 
to specifics in my mind though.

Cheers,

Manos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Re: Javascript zip dependency management

Posted by John Ericksen <jo...@comcast.net>.
This seems very promising, are there any repositories for javascript 
dependencies?

If there is a tinymce dependency and the tinymce compressor library 
dependency somewhere that would definitely solve my immediate issue.

That would be nice to also have the ability to extract the javascript 
dependencies into a directory in the target... like /src/main/webapp/js/

Manos Batsis wrote:
> John Ericksen wrote:
>   
>> I have what might be a basic question, but I haven't been able to find a 
>> way to accomplish it using Maven.  The project I am working on 
>> (Braintrain: http://code.google.com/p/braintrain/) uses Maven as the 
>> build framework.  What I want to do is basically unzip 2 zip files and 
>> move the contents of a subdirectory in each to the js/ directory of the 
>> war.  Specifically:
>>     
>
> Another approach used in our jstools plugin is that JS projects are 
> packaged normally as jars [1], while web apps may load (and cache) 
> script files or other static resources directly from the 
> jars/dependencies using configurable servlet filter [2].
>
> [1] http://dev.abiss.gr/mvn-jstools/js-packaging.html
> [2] 
> http://dev.abiss.gr/mvn-jstools/apidocs/gr/abiss/mvn/plugins/jstools/web/JavascriptDependencyFilter.html
>
> cheers,
>
> Manos
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Re : Always active profiles

Posted by Mark Hobson <ma...@gmail.com>.
2010/1/14 Julien HENRY <he...@yahoo.fr>:
> Hi,
>
> I suppose you are talking about profile defined in pom, otherwise you can look at <activeProfiles> section of settings.xml.

Yep, this is for regular pom profiles.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re : Always active profiles

Posted by Julien HENRY <he...@yahoo.fr>.
Hi,

I suppose you are talking about profile defined in pom, otherwise you can look at <activeProfiles> section of settings.xml.

Regards

Julien



----- Message d'origine ----
> De : Mark Hobson <ma...@gmail.com>
> À : Maven Users List <us...@maven.apache.org>
> Envoyé le : Jeu 14 Janvier 2010, 12 h 04 min 19 s
> Objet : Always active profiles
> 
> Hi there,
> 
> Is there a better way of always activating a profile, unless
> explicitly deactivated, than using a dummy property activator?  For
> example:
> 
>     
>         
>             !dummy
>         
>     
> 
> I can't use activeByDefault since I want the profile to be activated
> even when other profiles in the pom are active.
> 
> It could be worth introducing an always active activator, something like:
> 
>     
>         
>     
> 
> I'll raise an issue if no-one objects.
> 
> Cheers,
> 
> Mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org



      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Always active profiles

Posted by Mark Hobson <ma...@gmail.com>.
2010/1/15 Tom Bollwitt <tl...@mersoft.com>:
> Try this...
>
> <activation>
>        <activeByDefault>true</activeByDefault>
> </activation>

Erm, did you even read my question?

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Always active profiles

Posted by Tom Bollwitt <tl...@mersoft.com>.
Try this...

<activation>
	<activeByDefault>true</activeByDefault>
</activation>

Regards,

Tom Bollwitt
SYSTEMS ENGINEER

Mersoft
9300 W. 110th St.
Building 55, Suite 350
Overland Park, KS 66210
913-871-6200

tlbollwitt@mersoft.com







On Jan 15, 2010, at 4:40 AM, Mark Hobson wrote:

2010/1/14 Wendy Smoak <ws...@gmail.com>:
> On Thu, Jan 14, 2010 at 1:44 PM, Kees van Dieren
> <ke...@gmail.com> wrote:
>> Just curious: where do you need this for? If you want plugins /  
>> dependencies
>> always to be active, you could add them in the pom directly, then  
>> they don't
>> need to be in a profile. Couldn't you simply define them directly  
>> in the pom
>> instead of adding it withing a profile?
>
> The OP said, "... unless explicitly deactivated."
>
> If it's directly in the pom, there's no way to deactivate it.

Yep, that's right, I'm profiling this so that it can be deactivated if
necessary.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Always active profiles

Posted by Mark Hobson <ma...@gmail.com>.
2010/1/14 Wendy Smoak <ws...@gmail.com>:
> On Thu, Jan 14, 2010 at 1:44 PM, Kees van Dieren
> <ke...@gmail.com> wrote:
>> Just curious: where do you need this for? If you want plugins / dependencies
>> always to be active, you could add them in the pom directly, then they don't
>> need to be in a profile. Couldn't you simply define them directly in the pom
>> instead of adding it withing a profile?
>
> The OP said, "... unless explicitly deactivated."
>
> If it's directly in the pom, there's no way to deactivate it.

Yep, that's right, I'm profiling this so that it can be deactivated if
necessary.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Always active profiles

Posted by Wendy Smoak <ws...@gmail.com>.
On Thu, Jan 14, 2010 at 1:44 PM, Kees van Dieren
<ke...@gmail.com> wrote:
> Just curious: where do you need this for? If you want plugins / dependencies
> always to be active, you could add them in the pom directly, then they don't
> need to be in a profile. Couldn't you simply define them directly in the pom
> instead of adding it withing a profile?

The OP said, "... unless explicitly deactivated."

If it's directly in the pom, there's no way to deactivate it.

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Always active profiles

Posted by Kees van Dieren <ke...@gmail.com>.
Just curious: where do you need this for? If you want plugins / dependencies
always to be active, you could add them in the pom directly, then they don't
need to be in a profile. Couldn't you simply define them directly in the pom
instead of adding it withing a profile?

2010/1/14 Mark Hobson <ma...@gmail.com>

> Hi there,
>
> Is there a better way of always activating a profile, unless
> explicitly deactivated, than using a dummy property activator?  For
> example:
>
>        <activation>
>                <property>
>                        <name>!dummy</name>
>                </property>
>        </activation>
>
> I can't use activeByDefault since I want the profile to be activated
> even when other profiles in the pom are active.
>
> It could be worth introducing an always active activator, something like:
>
>        <activation>
>                <active/>
>        </activation>
>
> I'll raise an issue if no-one objects.
>
> Cheers,
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Squins | IT, Honestly
Oranjestraat 23
2983 HL Ridderkerk
The Netherlands
Phone: +31 (0)180 414520
Mobile: +31 (0)6 30413841
www.squins.com
http://twitter.com/keesvandieren
Chamber of commerce Rotterdam: 22048547