You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Juan Asensio Sánchez <ok...@gmail.com> on 2010/09/01 13:41:45 UTC

Compiling Studio

Hi

I am trying to translate and compile Studio to Spanish. The first problem I
have, is about compiling the source just after the checkout from SVN. I hve
done these steps:

svn co http://svn.apache.org/repos/asf/directory/studio/trunkapacheds-studio
cd apacheds-studio
mvn clean install

After download lots of dependencies, i get this error:

==============================================================================================================================================

Downloading:
http://repo1.maven.org/maven2/org/apache/directory/studio/org.apache.commons.lang/2.3/org.apache.commons.lang-2.3.jar
[INFO] Unable to find resource
'org.apache.directory.studio:org.apache.commons.lang:jar:2.3' in repository
central (http://repo1.maven.org/maven2)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve dependencies for one or more projects in the
reactor. Reason: Missing:
----------
1) org.apache.directory.studio:org.apache.commons.lang:jar:2.3

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=org.apache.directory.studio
-DartifactId=org.apache.commons.lang -Dversion=2.3 -Dpackaging=jar
-Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file
there:
      mvn deploy:deploy-file -DgroupId=org.apache.directory.studio
-DartifactId=org.apache.commons.lang -Dversion=2.3 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
      1) org.apache.directory.studio:common.core:jar:2.0.0-SNAPSHOT
      2) org.apache.directory.studio:org.apache.commons.lang:jar:2.3

----------
1 required artifact is missing.

for artifact:
  org.apache.directory.studio:common.core:jar:2.0.0-SNAPSHOT

from the specified remote repositories:
  apache.snapshots (http://repository.apache.org/snapshots),
  central (http://repo1.maven.org/maven2)

==============================================================================================================================================

I have checked if
http://repo1.maven.org/maven2/org/apache/directory/studio/org.apache.commons.lang/2.3/org.apache.commons.lang-2.3.jarexists,
but it doesn't, so I think some pom.xml is invalid. What should I do
next? (I am not a good developer, I just will use this for translate and
compile to test the translation).

Regards.

Re: Compiling Studio

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Committed at revision 995473. ;)

Regards,
Pierre-Arnaud

On 7 sept. 2010, at 20:13, Stefan Seelmann wrote:

> Hi Pierre-Arnaud,
> 
>> However, I found a more clever solution and we could use the activation
>> based on presence of the 'pom.xml' file.
>> Using the following diff on Studio's trunk, by default, 'mvn clean install'
>> would build everything, and 'mvn clean install -P-studio-full' (notice the
>> '-' in front of studio-full) would only build the core code plugins:
>> 
>> MacBookPro:Studio pajbam$ svn diff
>> Index: pom.xml
>> ===================================================================
>> --- pom.xml (revision 992968)
>> +++ pom.xml (working copy)
>> @@ -133,6 +133,11 @@
>>      -->
>>      <profile>
>>        <id>studio-full</id>
>> +     <activation>
>> +        <file>
>> +          <exists>pom.xml</exists>
>> +        </file>
>> +     </activation>
>>        <modules>
>>          <module>libraries</module>
>>          <module>helps</module>
>> 
>> WDYT?
> 
> Indeed, very clever :-) Works fine for me. +1 for this solution.
> 
> Kind Regards,
> Stefan


Re: Compiling Studio

Posted by Stefan Seelmann <se...@apache.org>.
Hi Pierre-Arnaud,

> However, I found a more clever solution and we could use the activation
> based on presence of the 'pom.xml' file.
> Using the following diff on Studio's trunk, by default, 'mvn clean install'
> would build everything, and 'mvn clean install -P-studio-full' (notice the
> '-' in front of studio-full) would only build the core code plugins:
>
> MacBookPro:Studio pajbam$ svn diff
> Index: pom.xml
> ===================================================================
> --- pom.xml (revision 992968)
> +++ pom.xml (working copy)
> @@ -133,6 +133,11 @@
>      -->
>      <profile>
>        <id>studio-full</id>
> +     <activation>
> +        <file>
> +          <exists>pom.xml</exists>
> +        </file>
> +     </activation>
>        <modules>
>          <module>libraries</module>
>          <module>helps</module>
>
> WDYT?

Indeed, very clever :-) Works fine for me. +1 for this solution.

Kind Regards,
Stefan

Re: Compiling Studio

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Felix,

On 6 sept. 2010, at 17:19, Felix Knecht wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
>>> A normal "mvn clean install" should build all modules.
> 
> +1 - That's what I do when trying out anything maven build based before
> doing RTFM.
> 
>> 
>> You're right.
>> 
>>> And a "mvn clean install -P !studio-full" should deactivate the
>>> profile and hence skip the modules.
>> 
>> 
>> With the following diff, all modules are built by default and the 'not-code' plugins are excluded when running the following command lines:
>> - mvn clean install -Dfastbuild
>> - mvn clean install -P-studio-full
> 
> What happens when using "-Dfastbuild -Pstudio-full"? Isn't it rather
> confusing having to different variations to force the same profile. Once
> by indicating the profile once by setting a property? What's the benefit
> of it?

When using 'mvn clean install -Dfastbuild -Pstudio-full', the 'studio-full' profile is activated.

Actually there's no benefit of using both profile id or the property, it's just that you have the choice of using one of them.
I tried to use the 'activeByDefault' activation property but it can't work properly with our other profiles.
When setting this property on a profile, all other active by default profiles are deactivated.

Quoting the Maven documentation at [1]:
> 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.


So I used the property based activation to solve this.



However, I found a more clever solution and we could use the activation based on presence of the 'pom.xml' file.

Using the following diff on Studio's trunk, by default, 'mvn clean install' would build everything, and 'mvn clean install -P-studio-full' (notice the '-' in front of studio-full) would only build the core code plugins:
> MacBookPro:Studio pajbam$ svn diff
> Index: pom.xml
> ===================================================================
> --- pom.xml	(revision 992968)
> +++ pom.xml	(working copy)
> @@ -133,6 +133,11 @@
>      -->
>      <profile>
>        <id>studio-full</id>
> +     <activation>
> +        <file>
> +          <exists>pom.xml</exists>
> +        </file>
> +     </activation>
>        <modules>
>          <module>libraries</module>
>          <module>helps</module>


WDYT?

Regards,
Pierre-Arnaud

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


Re: Compiling Studio

Posted by Felix Knecht <fe...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>> A normal "mvn clean install" should build all modules.

+1 - That's what I do when trying out anything maven build based before
doing RTFM.

> 
> You're right.
> 
>> And a "mvn clean install -P !studio-full" should deactivate the
>> profile and hence skip the modules.
> 
> 
> With the following diff, all modules are built by default and the 'not-code' plugins are excluded when running the following command lines:
> - mvn clean install -Dfastbuild
> - mvn clean install -P-studio-full

What happens when using "-Dfastbuild -Pstudio-full"? Isn't it rather
confusing having to different variations to force the same profile. Once
by indicating the profile once by setting a property? What's the benefit
of it?

Regards
Felix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyFBmYACgkQ2lZVCB08qHHlPACfezrAZ8+7XIk62SZE8gTQeYLN
mkkAoJ0Tws9tueuEvJg61MX9mTa37rka
=vwBt
-----END PGP SIGNATURE-----

Re: Compiling Studio

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
On 6 sept. 2010, at 15:47, Stefan Seelmann wrote:

> Hi Pierre-Arnaud,
> 
> On Mon, Sep 6, 2010 at 2:05 PM, Pierre-Arnaud Marcelot <pa...@marcelot.net> wrote:
>>> Subsequent builds don't require the activation of that profile. We
>>> changed this to speed up the subsequent builds. However this caused
>>> problems several times, maybe we should consider to revert this
>>> change.
>> 
>> Do you really think so ?
>> I think that it should be ok with an up-to-date documentation.rrrr
>> It saves a lot of time to skip the build of the 'not-code' plugins (like external libraries, help and features plugins).
> 
> I don't think we should remove the the profile, but change the
> activation. With the following profile activtion (untested):
> 
>    ..
>    <profile>
>      <id>studio-full</id>
>      <activation>
>        <activeByDefault>true</activeByDefault>
>      </activation>
>    ...
> 
> A normal "mvn clean install" should build all modules.

You're right.

> And a "mvn clean install -P !studio-full" should deactivate the
> profile and hence skip the modules.


With the following diff, all modules are built by default and the 'not-code' plugins are excluded when running the following command lines:
- mvn clean install -Dfastbuild
- mvn clean install -P-studio-full

> Index: pom.xml
> ===================================================================
> --- pom.xml	(revision 992968)
> +++ pom.xml	(working copy)
> @@ -133,6 +133,11 @@
>      -->
>      <profile>
>        <id>studio-full</id>
> +     <activation>
> +       <property>
> +         <name>!fastbuild</name>
> +       </property>
> +     </activation>
>        <modules>
>          <module>libraries</module>
>          <module>helps</module>


I tested this against the current trunk.

Regards,
Pierre-Arnaud


Re: Compiling Studio

Posted by Stefan Seelmann <se...@apache.org>.
Hi Pierre-Arnaud,

On Mon, Sep 6, 2010 at 2:05 PM, Pierre-Arnaud Marcelot <pa...@marcelot.net> wrote:
>> Subsequent builds don't require the activation of that profile. We
>> changed this to speed up the subsequent builds. However this caused
>> problems several times, maybe we should consider to revert this
>> change.
>
> Do you really think so ?
> I think that it should be ok with an up-to-date documentation.rrrr
> It saves a lot of time to skip the build of the 'not-code' plugins (like external libraries, help and features plugins).

I don't think we should remove the the profile, but change the
activation. With the following profile activtion (untested):

    ..
    <profile>
      <id>studio-full</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    ...

A normal "mvn clean install" should build all modules.
And a "mvn clean install -P !studio-full" should deactivate the
profile and hence skip the modules.

wdyt?

Kind Regards,
Stefan

Re: Compiling Studio

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Juan, Stefan,

More inline...

On 1 sept. 2010, at 14:03, Stefan Seelmann wrote:

> Hi Juan,
> 
> we reorganized the project layout and build lately and it is now
> necessary to build the trunk using
>  mvn clean install -Pstudio-full
> the first time.

My bad, I forgot to update the documentation on the website after the reorganization.
Sorry about it.
I will update the page on the website today.

> Subsequent builds don't require the activation of that profile. We
> changed this to speed up the subsequent builds. However this caused
> problems several times, maybe we should consider to revert this
> change.

Do you really think so ?
I think that it should be ok with an up-to-date documentation.rrrr
It saves a lot of time to skip the build of the 'not-code' plugins (like external libraries, help and features plugins).

Regards,
Pierre-Arnaud

> Kind Regards,
> Stefan
> 
> 
> 2010/9/1 Juan Asensio Sánchez <ok...@gmail.com>:
>> Hi
>> 
>> I am trying to translate and compile Studio to Spanish. The first problem I
>> have, is about compiling the source just after the checkout from SVN. I hve
>> done these steps:
>> 
>> svn co http://svn.apache.org/repos/asf/directory/studio/trunk
>> apacheds-studio
>> cd apacheds-studio
>> mvn clean install
>> 
>> After download lots of dependencies, i get this error:
>> 
>> ==============================================================================================================================================
>> 
>> Downloading:
>> http://repo1.maven.org/maven2/org/apache/directory/studio/org.apache.commons.lang/2.3/org.apache.commons.lang-2.3.jar
>> [INFO] Unable to find resource
>> 'org.apache.directory.studio:org.apache.commons.lang:jar:2.3' in repository
>> central (http://repo1.maven.org/maven2)
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Failed to resolve dependencies for one or more projects in the
>> reactor. Reason: Missing:
>> ----------
>> 1) org.apache.directory.studio:org.apache.commons.lang:jar:2.3
>> 
>>   Try downloading the file manually from the project website.
>> 
>>   Then, install it using the command:
>>       mvn install:install-file -DgroupId=org.apache.directory.studio
>> -DartifactId=org.apache.commons.lang -Dversion=2.3 -Dpackaging=jar
>> -Dfile=/path/to/file
>> 
>>   Alternatively, if you host your own repository you can deploy the file
>> there:
>>       mvn deploy:deploy-file -DgroupId=org.apache.directory.studio
>> -DartifactId=org.apache.commons.lang -Dversion=2.3 -Dpackaging=jar
>> -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>> 
>>   Path to dependency:
>>       1) org.apache.directory.studio:common.core:jar:2.0.0-SNAPSHOT
>>       2) org.apache.directory.studio:org.apache.commons.lang:jar:2.3
>> 
>> ----------
>> 1 required artifact is missing.
>> 
>> for artifact:
>>   org.apache.directory.studio:common.core:jar:2.0.0-SNAPSHOT
>> 
>> from the specified remote repositories:
>>   apache.snapshots (http://repository.apache.org/snapshots),
>>   central (http://repo1.maven.org/maven2)
>> 
>> ==============================================================================================================================================
>> 
>> I have checked if
>> http://repo1.maven.org/maven2/org/apache/directory/studio/org.apache.commons.lang/2.3/org.apache.commons.lang-2.3.jar
>> exists, but it doesn't, so I think some pom.xml is invalid. What should I do
>> next? (I am not a good developer, I just will use this for translate and
>> compile to test the translation).
>> 
>> Regards.
>> 
>> 


Re: Compiling Studio

Posted by Stefan Seelmann <se...@apache.org>.
Hi Juan,

we reorganized the project layout and build lately and it is now
necessary to build the trunk using
  mvn clean install -Pstudio-full
the first time.

Subsequent builds don't require the activation of that profile. We
changed this to speed up the subsequent builds. However this caused
problems several times, maybe we should consider to revert this
change.

Kind Regards,
Stefan


2010/9/1 Juan Asensio Sánchez <ok...@gmail.com>:
> Hi
>
> I am trying to translate and compile Studio to Spanish. The first problem I
> have, is about compiling the source just after the checkout from SVN. I hve
> done these steps:
>
> svn co http://svn.apache.org/repos/asf/directory/studio/trunk
> apacheds-studio
> cd apacheds-studio
> mvn clean install
>
> After download lots of dependencies, i get this error:
>
> ==============================================================================================================================================
>
> Downloading:
> http://repo1.maven.org/maven2/org/apache/directory/studio/org.apache.commons.lang/2.3/org.apache.commons.lang-2.3.jar
> [INFO] Unable to find resource
> 'org.apache.directory.studio:org.apache.commons.lang:jar:2.3' in repository
> central (http://repo1.maven.org/maven2)
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve dependencies for one or more projects in the
> reactor. Reason: Missing:
> ----------
> 1) org.apache.directory.studio:org.apache.commons.lang:jar:2.3
>
>   Try downloading the file manually from the project website.
>
>   Then, install it using the command:
>       mvn install:install-file -DgroupId=org.apache.directory.studio
> -DartifactId=org.apache.commons.lang -Dversion=2.3 -Dpackaging=jar
> -Dfile=/path/to/file
>
>   Alternatively, if you host your own repository you can deploy the file
> there:
>       mvn deploy:deploy-file -DgroupId=org.apache.directory.studio
> -DartifactId=org.apache.commons.lang -Dversion=2.3 -Dpackaging=jar
> -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>
>   Path to dependency:
>       1) org.apache.directory.studio:common.core:jar:2.0.0-SNAPSHOT
>       2) org.apache.directory.studio:org.apache.commons.lang:jar:2.3
>
> ----------
> 1 required artifact is missing.
>
> for artifact:
>   org.apache.directory.studio:common.core:jar:2.0.0-SNAPSHOT
>
> from the specified remote repositories:
>   apache.snapshots (http://repository.apache.org/snapshots),
>   central (http://repo1.maven.org/maven2)
>
> ==============================================================================================================================================
>
> I have checked if
> http://repo1.maven.org/maven2/org/apache/directory/studio/org.apache.commons.lang/2.3/org.apache.commons.lang-2.3.jar
> exists, but it doesn't, so I think some pom.xml is invalid. What should I do
> next? (I am not a good developer, I just will use this for translate and
> compile to test the translation).
>
> Regards.
>
>