You are viewing a plain text version of this content. The canonical link for it is here.
Posted to api@directory.apache.org by Richard Sand <rs...@idfconnect.com> on 2013/08/07 07:38:19 UTC

building the API in Eclipse

Hi all - just sharing some things I learned today setting up the API source
in Eclipse.

If you try to check out the entire API trunk (i.e.
https://svn.apache.org/repos/asf/directory/shared/trunk/) into a single
Eclipse project, you will get an epic failure. The problem seems to be with
the Eclipse Maven (m2e) integration. Doing "New-->Checkout Project from SVN"
puts everything into 1 project, and the maven plugin for eclipse doesn't
resolve the dependencies of the maven subprojects. There may be a way to fix
that, but after some tinkering I got this to work instead: do
"New-->Maven-->Checkout Maven Project from SCM" and then specify the trunk
(you'll need to have the m2e plugin for svn). What this does is create a
distinct Eclipse project for every subproject - so you'll end up with 15 or
so projects, but everything will build correctly...

...with one exception. The project "api-ldap-schema-data" (i.e.
http://svn.apache.org/repos/asf/directory/shared/trunk/ldap/schema/data)
gave me a strange error message on line 1 of the pom.xml, the error message
being:
org.codehaus.plexus.archiver.jar.Manifest.merge(org.codehaus.plexus.archiver
.jar.Manifest). This seems to be caused by a known problem with
maven-kar-plugin:2.4. Someone else had the same problem with an unrelated
project and his workaround was to explicitly set the maven-jar-plugin to
version 2.3.2. That work for me, and after that I was able to build the who
API in Eclipse. 

Hope this helps someone. Thanks!

Best regards,

Richard




Re: building the API in Eclipse

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 8/7/13 7:45 AM, Kiran Ayyagari a écrit :
> On Wed, Aug 7, 2013 at 11:08 AM, Richard Sand <rs...@idfconnect.com> wrote:
>
>> Hi all - just sharing some things I learned today setting up the API source
>> in Eclipse.
>>
>> If you try to check out the entire API trunk (i.e.
>> https://svn.apache.org/repos/asf/directory/shared/trunk/) into a single
>> Eclipse project, you will get an epic failure. The problem seems to be with
>> the Eclipse Maven (m2e) integration. Doing "New-->Checkout Project from
>> SVN"
>>
> personally I(guess most of us) never use this plugin, we all use terminal
> to do the checkout,
> building and then run mvn eclipse:eclipse to finally import the projects
> into eclipse.
> most of the times these maven plugins in IDE download the whole internet
> whenever a file is
> saved (cause of the maven builder)

Yes, I do that too. For many reasons :
- it's faster
- it simply works (tm)
- it allows us to build all the projects (ie, API, ApacheDS, Studio,
etc) in one shot, and have each of tjese projects imported as a separate
working set but still have dependencies on each single project (ie, an
ApacheDS module will depend on the API modules, and not on the jars,
which is a blessing when debugging !)

But all in all, we could probably achive the same thing by mporting
trunks directly in eclipse, and move the modules in various working set
too.

That would worth trying, assuming that the maven eclipse plugin is not
aymore maintained...

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


Re: building the API in Eclipse

Posted by Kiran Ayyagari <ka...@apache.org>.
On Wed, Aug 7, 2013 at 11:08 AM, Richard Sand <rs...@idfconnect.com> wrote:

> Hi all - just sharing some things I learned today setting up the API source
> in Eclipse.
>
> If you try to check out the entire API trunk (i.e.
> https://svn.apache.org/repos/asf/directory/shared/trunk/) into a single
> Eclipse project, you will get an epic failure. The problem seems to be with
> the Eclipse Maven (m2e) integration. Doing "New-->Checkout Project from
> SVN"
>
personally I(guess most of us) never use this plugin, we all use terminal
to do the checkout,
building and then run mvn eclipse:eclipse to finally import the projects
into eclipse.
most of the times these maven plugins in IDE download the whole internet
whenever a file is
saved (cause of the maven builder)

> puts everything into 1 project, and the maven plugin for eclipse doesn't
> resolve the dependencies of the maven subprojects. There may be a way to
> fix
> that, but after some tinkering I got this to work instead: do
> "New-->Maven-->Checkout Maven Project from SCM" and then specify the trunk
> (you'll need to have the m2e plugin for svn). What this does is create a
> distinct Eclipse project for every subproject - so you'll end up with 15 or
> so projects, but everything will build correctly...
>
> ...with one exception. The project "api-ldap-schema-data" (i.e.
> http://svn.apache.org/repos/asf/directory/shared/trunk/ldap/schema/data)
> gave me a strange error message on line 1 of the pom.xml, the error message
> being:
>
> org.codehaus.plexus.archiver.jar.Manifest.merge(org.codehaus.plexus.archiver
> .jar.Manifest). This seems to be caused by a known problem with
> maven-kar-plugin:2.4. Someone else had the same problem with an unrelated
> project and his workaround was to explicitly set the maven-jar-plugin to
> version 2.3.2. That work for me, and after that I was able to build the who
> API in Eclipse.
>
> Hope this helps someone. Thanks!
>
> thanks for sharing

> Best regards,
>
> Richard
>
>
>
>


-- 
Kiran Ayyagari
http://keydap.com