You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Pierre-Arnaud Marcelot <pa...@marcelot.net> on 2008/10/01 11:55:21 UTC

Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Hi Felix,

I tried various fixes to make our tweak for the help plugins work, but I
could not find one working.

The only solution I see is to get rid of the help-pom.xml file and duplicate
the generation code in each help plugin project.
But this is a very "bad" and "ugly" solution...

Maybe you see another solution we could use ?

Thanks,
Pierre-Arnaud

On Fri, Sep 26, 2008 at 3:59 PM, Pierre-Arnaud Marcelot <pa...@marcelot.net>wrote:

> On Fri, Sep 26, 2008 at 3:46 PM, Felix Knecht <fe...@apache.org> wrote:
>
>> What's the benfit of a property? Where do you set the property? You'd
>> need to set it on every run -> We could also use a profile directly
>> instead of a property ...
>
>
> Yeah, you're right... Using a profile directly is better.
> Setting a property makes no sense...
>
> Regards,
> Pierre-Arnaud
>

Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
This time it works great!
2 min 23 sec (in fastbuild) against 6 min. 38 sec (in normal build).

And "mvn clean install" really works too...

The only ugly thing is this pretty well named "!must_stay_empty_property"
property, but there's nothing we can do about it.
I tried the "<activeByDefault>true</activeByDefault>" flag but it's not
working because:
"All profiles that are active by default are automatically deactivated when
a profile in the pom is activated on the command line or through its
activation config." as it is mentioned in this page [1].

Thanks,
Pierre-Arnaud

[1] -
http://maven.apache.org/guides/introduction/introduction-to-profiles.html

On Wed, Oct 1, 2008 at 3:33 PM, Felix Knecht <fe...@apache.org> wrote:

> Pierre-Arnaud Marcelot schrieb:
> > Héhé...
> >
> > I've just seen the "!" trick on this page [1], and wanted to share
> > this with you on the ML.
> >
> > You got me... ;)
>
> Hehe I was on the same page :-[
> >
> > I'm going to test what you committed.
> >
> > Thanks,
> > Pierre-Arnaud
> >
> > [1] -
> >
> http://techpolesen.blogspot.com/2007/08/maven-profiles-activation-by-property.html
> >
> > On Wed, Oct 1, 2008 at 3:25 PM, Felix Knecht <felixk@apache.org
> > <ma...@apache.org>> wrote:
> >
> >     Pierre-Arnaud Marcelot schrieb:
> >     > On Wed, Oct 1, 2008 at 2:55 PM, Felix Knecht <felixk@apache.org
> >     <ma...@apache.org>
> >     > <mailto:felixk@apache.org <ma...@apache.org>>> wrote:
> >     >
> >     >     No, you're right. I was too enthusiastic about this. But I
> >     try to
> >     >     use it
> >     >     the other way round ...
> >     >
> >     >
> >     > Yeah.
> >     >
> >     > I tried to play with it. But I can't get it working...
> >     > I tried to define a default value for our property in the
> >     <properties>
> >     > tag, but this property is not recognize in the activation of a
> >     profile...
> >     >
> >     > Maven really needs improvements in that profile activation part...
> >
> >     Please try may lately committed very hacky hack ;-)
> >
> >     mvn clean install
> >     mvn install -Dfastbuild
> >
> >     Felix
> >
> >     PS:
> >     Hope it works ...
> >
> >
>
>

Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Felix Knecht <fe...@apache.org>.
Pierre-Arnaud Marcelot schrieb:
> Héhé...
>
> I've just seen the "!" trick on this page [1], and wanted to share
> this with you on the ML.
>
> You got me... ;)

Hehe I was on the same page :-[
>
> I'm going to test what you committed.
>
> Thanks,
> Pierre-Arnaud
>
> [1] -
> http://techpolesen.blogspot.com/2007/08/maven-profiles-activation-by-property.html
>
> On Wed, Oct 1, 2008 at 3:25 PM, Felix Knecht <felixk@apache.org
> <ma...@apache.org>> wrote:
>
>     Pierre-Arnaud Marcelot schrieb:
>     > On Wed, Oct 1, 2008 at 2:55 PM, Felix Knecht <felixk@apache.org
>     <ma...@apache.org>
>     > <mailto:felixk@apache.org <ma...@apache.org>>> wrote:
>     >
>     >     No, you're right. I was too enthusiastic about this. But I
>     try to
>     >     use it
>     >     the other way round ...
>     >
>     >
>     > Yeah.
>     >
>     > I tried to play with it. But I can't get it working...
>     > I tried to define a default value for our property in the
>     <properties>
>     > tag, but this property is not recognize in the activation of a
>     profile...
>     >
>     > Maven really needs improvements in that profile activation part...
>
>     Please try may lately committed very hacky hack ;-)
>
>     mvn clean install
>     mvn install -Dfastbuild
>
>     Felix
>
>     PS:
>     Hope it works ...
>
>


Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Héhé...

I've just seen the "!" trick on this page [1], and wanted to share this with
you on the ML.

You got me... ;)

I'm going to test what you committed.

Thanks,
Pierre-Arnaud

[1] -
http://techpolesen.blogspot.com/2007/08/maven-profiles-activation-by-property.html

On Wed, Oct 1, 2008 at 3:25 PM, Felix Knecht <fe...@apache.org> wrote:

> Pierre-Arnaud Marcelot schrieb:
> > On Wed, Oct 1, 2008 at 2:55 PM, Felix Knecht <felixk@apache.org
> > <ma...@apache.org>> wrote:
> >
> >     No, you're right. I was too enthusiastic about this. But I try to
> >     use it
> >     the other way round ...
> >
> >
> > Yeah.
> >
> > I tried to play with it. But I can't get it working...
> > I tried to define a default value for our property in the <properties>
> > tag, but this property is not recognize in the activation of a profile...
> >
> > Maven really needs improvements in that profile activation part...
>
> Please try may lately committed very hacky hack ;-)
>
> mvn clean install
> mvn install -Dfastbuild
>
> Felix
>
> PS:
> Hope it works ...
>

Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Felix Knecht <fe...@apache.org>.
Pierre-Arnaud Marcelot schrieb:
> On Wed, Oct 1, 2008 at 2:55 PM, Felix Knecht <felixk@apache.org
> <ma...@apache.org>> wrote:
>
>     No, you're right. I was too enthusiastic about this. But I try to
>     use it
>     the other way round ...
>
>  
> Yeah.
>
> I tried to play with it. But I can't get it working...
> I tried to define a default value for our property in the <properties>
> tag, but this property is not recognize in the activation of a profile...
>
> Maven really needs improvements in that profile activation part...

Please try may lately committed very hacky hack ;-)

mvn clean install
mvn install -Dfastbuild

Felix

PS:
Hope it works ...

Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
On Wed, Oct 1, 2008 at 2:55 PM, Felix Knecht <fe...@apache.org> wrote:

> No, you're right. I was too enthusiastic about this. But I try to use it
> the other way round ...


Yeah.

I tried to play with it. But I can't get it working...
I tried to define a default value for our property in the <properties> tag,
but this property is not recognize in the activation of a profile...

Maven really needs improvements in that profile activation part...

Pierre-Arnaud

Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Felix Knecht <fe...@apache.org>.
Pierre-Arnaud Marcelot schrieb:
> On Wed, Oct 1, 2008 at 2:31 PM, Felix Knecht <felixk@apache.org
> <ma...@apache.org>> wrote:
>
>     What we could do is the following
>     Add this to the root profile:
>        <profile>
>          <id>foobar</id>
>          <activation>
>            <property>
>              <name>fastbuild</name>
>              <value>true</value>
>            </property>
>          </activation>
>          <modules>
>            <module>schemaeditor-help</module>
>            <module>ldifeditor-help</module>
>            <module>ldapbrowser-help</module>
>            <module>apacheds-configuration-help</module>
>            <module>apacheds-help</module>
>          </modules>
>        </profile>
>
>     and remove all the timestamp stuff we have added.
>     By default also the *help modules are build. If you as developer know
>     that they already exist you can add -Dfastbuild to your CLI and the
>     *help modules are skipped from build:
>
>     felix@pcfelix ~/svn/apache/directory/studio/trunk $ mvn
>     help:active-profiles|grep foobar
>     felix@pcfelix ~/svn/apache/directory/studio/trunk $ mvn
>     help:active-profiles -Dfastbuild|grep foobar
>      - foobar (source: pom)
>     felix@pcfelix ~/svn/apache/directory/studio/trunk $
>
>     Would this be a way to go?
>
>
> Yeah, it could be a way, but, to me, if I follow what you showed, the
> help plugins will only be built if there's the -Dfastbuild flag added
> to the CLI.
> Am I wrong ?
No, you're right. I was too enthusiastic about this. But I try to use it
the other way round ...
>
> Thanks
> Pierre-Arnaud


Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
On Wed, Oct 1, 2008 at 2:31 PM, Felix Knecht <fe...@apache.org> wrote:

> What we could do is the following
> Add this to the root profile:
>    <profile>
>      <id>foobar</id>
>      <activation>
>        <property>
>          <name>fastbuild</name>
>          <value>true</value>
>        </property>
>      </activation>
>      <modules>
>        <module>schemaeditor-help</module>
>        <module>ldifeditor-help</module>
>        <module>ldapbrowser-help</module>
>        <module>apacheds-configuration-help</module>
>        <module>apacheds-help</module>
>      </modules>
>    </profile>
>
> and remove all the timestamp stuff we have added.
> By default also the *help modules are build. If you as developer know
> that they already exist you can add -Dfastbuild to your CLI and the
> *help modules are skipped from build:
>
> felix@pcfelix ~/svn/apache/directory/studio/trunk $ mvn
> help:active-profiles|grep foobar
> felix@pcfelix ~/svn/apache/directory/studio/trunk $ mvn
> help:active-profiles -Dfastbuild|grep foobar
>  - foobar (source: pom)
> felix@pcfelix ~/svn/apache/directory/studio/trunk $
>
> Would this be a way to go?
>

Yeah, it could be a way, but, to me, if I follow what you showed, the help
plugins will only be built if there's the -Dfastbuild flag added to the CLI.
Am I wrong ?

Thanks
Pierre-Arnaud

Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Felix Knecht <fe...@apache.org>.
Pierre-Arnaud Marcelot schrieb:
> On Wed, Oct 1, 2008 at 12:27 PM, Felix Knecht <felixk@apache.org
> <ma...@apache.org>> wrote:
>
>     If you want a dist also with fast mvn build I son't see any other
>     solution than moving this part of the help-pom.xml into every
>     *help/pom.xml :-(
>     The userguides profile may last in help-pom.
>
>
> Yeah, that's also what I was thinking.
>
> But there's also another drawback with this solution.
> The command "mvn clean install" does not work as expected.
> It will only clean the target folder and 'timestamp' file but won't
> re-generate the HTML help because when the command line is launched
> the 'timestamp' file is there and then the profile is not activated...
>
> I guess we should leave it as it was before we tried to implement this
> functionality as it causing some troubles to the build...
>
> I'm also wondering if we should not try to have a named profile that
> we add to the command line if we want the generation of the help ("mvn
> clean install -Pgenerate-help-plugins"). But I think this could cause
> issues when using the release plugin.
>
> WDYT?
What we could do is the following
Add this to the root profile:
    <profile>
      <id>foobar</id>
      <activation>
        <property>
          <name>fastbuild</name>
          <value>true</value>
        </property>
      </activation>
      <modules>
        <module>schemaeditor-help</module>
        <module>ldifeditor-help</module>
        <module>ldapbrowser-help</module>
        <module>apacheds-configuration-help</module>
        <module>apacheds-help</module>
      </modules>
    </profile>

and remove all the timestamp stuff we have added.
By default also the *help modules are build. If you as developer know
that they already exist you can add -Dfastbuild to your CLI and the
*help modules are skipped from build:

felix@pcfelix ~/svn/apache/directory/studio/trunk $ mvn
help:active-profiles|grep foobar
felix@pcfelix ~/svn/apache/directory/studio/trunk $ mvn
help:active-profiles -Dfastbuild|grep foobar
 - foobar (source: pom)
felix@pcfelix ~/svn/apache/directory/studio/trunk $

Would this be a way to go?

Regards
Felix


Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
On Wed, Oct 1, 2008 at 12:27 PM, Felix Knecht <fe...@apache.org> wrote:

> If you want a dist also with fast mvn build I son't see any other
> solution than moving this part of the help-pom.xml into every
> *help/pom.xml :-(
> The userguides profile may last in help-pom.
>

Yeah, that's also what I was thinking.

But there's also another drawback with this solution.
The command "mvn clean install" does not work as expected.
It will only clean the target folder and 'timestamp' file but won't
re-generate the HTML help because when the command line is launched the
'timestamp' file is there and then the profile is not activated...

I guess we should leave it as it was before we tried to implement this
functionality as it causing some troubles to the build...

I'm also wondering if we should not try to have a named profile that we add
to the command line if we want the generation of the help ("mvn clean
install -Pgenerate-help-plugins"). But I think this could cause issues when
using the release plugin.

WDYT?

Regards,
Pierre-Arnaud

Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Felix Knecht <fe...@apache.org>.
Felix Knecht schrieb:
> Pierre-Arnaud Marcelot schrieb:
>   
>> Hi Felix,
>>
>> I tried various fixes to make our tweak for the help plugins work, but
>> I could not find one working.
>>
>> The only solution I see is to get rid of the help-pom.xml file and
>> duplicate the generation code in each help plugin project.
>> But this is a very "bad" and "ugly" solution...
>>
>> Maybe you see another solution we could use ?
>>     
> IMO the question is 'What for want you do a maven build?'.
>
> I could imagine to have a profile (root pom) containing the modules
> *help, updatesite,studio (I think this are the ones failing when there
> are missing *help artifacts).
> If none of those two (updatesite and studio=dist) is needed to be built
> on a 'fast build' this works also. But this is only if a fast mvn build
> is just to see if it compiles.
> So it's really the question what's the intention of a fast build.
>   
If you want a dist also with fast mvn build I son't see any other
solution than moving this part of the help-pom.xml into every
*help/pom.xml :-(
The userguides profile may last in help-pom.

>> Thanks,
>> Pierre-Arnaud
>>
>> On Fri, Sep 26, 2008 at 3:59 PM, Pierre-Arnaud Marcelot
>> <pa@marcelot.net <ma...@marcelot.net>> wrote:
>>
>>     On Fri, Sep 26, 2008 at 3:46 PM, Felix Knecht <felixk@apache.org
>>     <ma...@apache.org>> wrote:
>>
>>         What's the benfit of a property? Where do you set the
>>         property? You'd
>>         need to set it on every run -> We could also use a profile
>>         directly
>>         instead of a property ...
>>
>>
>>     Yeah, you're right... Using a profile directly is better.
>>     Setting a property makes no sense...
>>
>>     Regards,
>>     Pierre-Arnaud
>>
>>
>>     
>
>   


Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
On Wed, Oct 1, 2008 at 12:05 PM, Felix Knecht <fe...@apache.org> wrote:

> IMO the question is 'What for want you do a maven build?'.


The intention of a fast build is to generate a fully functional distribution
that we can run and test in a few seconds.
We usually make modifications in the code and either launch the application
in Eclipse or run "mvn install" and launch the generated distribution to
test if the behavior is OK.


> I could imagine to have a profile (root pom) containing the modules
> *help, updatesite,studio (I think this are the ones failing when there
> are missing *help artifacts).
> If none of those two (updatesite and studio=dist) is needed to be built
> on a 'fast build' this works also. But this is only if a fast mvn build
> is just to see if it compiles.
> So it's really the question what's the intention of a fast build.


Yeah, the idea is to be able to launch a generated distribution, so I
believe this won't unfortunately help.

Regards,
Pierre-Arnaud

Re: svn commit: r699310 - in /directory/studio/trunk: ./ aciitemeditor/ apacheds-configuration-feature/ apacheds-configuration-help/ apacheds-configuration/ apacheds-feature/ apacheds-help/ apacheds-launcher/ apacheds/ connection-core/ connection-ui/

Posted by Felix Knecht <fe...@apache.org>.
Pierre-Arnaud Marcelot schrieb:
> Hi Felix,
>
> I tried various fixes to make our tweak for the help plugins work, but
> I could not find one working.
>
> The only solution I see is to get rid of the help-pom.xml file and
> duplicate the generation code in each help plugin project.
> But this is a very "bad" and "ugly" solution...
>
> Maybe you see another solution we could use ?
IMO the question is 'What for want you do a maven build?'.

I could imagine to have a profile (root pom) containing the modules
*help, updatesite,studio (I think this are the ones failing when there
are missing *help artifacts).
If none of those two (updatesite and studio=dist) is needed to be built
on a 'fast build' this works also. But this is only if a fast mvn build
is just to see if it compiles.
So it's really the question what's the intention of a fast build.
>
> Thanks,
> Pierre-Arnaud
>
> On Fri, Sep 26, 2008 at 3:59 PM, Pierre-Arnaud Marcelot
> <pa@marcelot.net <ma...@marcelot.net>> wrote:
>
>     On Fri, Sep 26, 2008 at 3:46 PM, Felix Knecht <felixk@apache.org
>     <ma...@apache.org>> wrote:
>
>         What's the benfit of a property? Where do you set the
>         property? You'd
>         need to set it on every run -> We could also use a profile
>         directly
>         instead of a property ...
>
>
>     Yeah, you're right... Using a profile directly is better.
>     Setting a property makes no sense...
>
>     Regards,
>     Pierre-Arnaud
>
>