You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-dev@incubator.apache.org by Steve Poole <sp...@googlemail.com> on 2009/06/25 16:03:17 UTC

Building the eclipse projects

I'm hitting a weird problem when building the eclipse projects ,  If I build
outside eclipse using "mvn install"  everything works fine.   But if I build
by using the eclipse maven support I hit a problem with when the API project
(kato.api.eclipse.plugin) is built.

It fails, it seems,  because the copy dependencies maven plugin  is
expecting to find a jar file and finds a directory instead.  It looks like
this on windows.

25/06/09 16:20:48 BST: [INFO] Copying classes to C:\Documents and
Settings\spoole\workspace\kato.eclipse\plugins\kato.api.plugin\target\dependency\classes
25/06/09 16:20:48 BST: Build errors for kato.api.eclipse.plugin;
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
the plugin manager executing goal
'org.apache.maven.plugins:maven-dependency-plugin:2.0:copy-dependencies':
Mojo execution failed.

In the maven project pom its configured as

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>validate</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>lib</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
          </execution>
        </executions>
      </plugin>


I can't find any solution to this on the net -  so I'm left with having to
fix this either by replacing the maven plugin with some clunky Ant stuff,
or  by  doing something clever.

My latest thought is to use svn externals as a way to link the source code
of the API project into the eclipse project.   Since the only reason for the
eclipse API project is to expose the Kato API to eclipse plugins it sort of
makes sense.

Anyway - thought I'd mention it to see if anyone has fixed this or has an
opinion


Cheers

Steve

Re: Building the eclipse projects

Posted by Steve Poole <sp...@googlemail.com>.
I've decided the "best" solution is to stop using the maven pde build plugin
and craft my own ant script.  Since I've had to build plugins before from
ant its not a big deal.   The effect on the structure of the eclipse modules
should be minimal.  Since I'll be in control of where the PDE build takes
place I can keep it away from the source modules so all the sideeffects
should disappear.

thats the theory anyway


On Sun, Jun 28, 2009 at 10:15 AM, Steve Poole <sp...@googlemail.com>wrote:

> Having moved to a different machine to prove my changes from scratch  I've
> started to uncover more peculiarities in the interactions between eclipse
> maven and the pde plugin.
>
>  I can't put my finger on what's the root cause - There are two  symptoms
>
> 1 - The jdt compiler preferences for some eclipse plugin projects are
> changed on disk back to 1.4 (from 1.6)
> 2 - In the API plugin even with all the dependencies satisfied the manifest
> editor refuses to acknowledge that the classes being exported exist.  I have
> to reedit the plugin runtime class path to remove and replace the api
> classes dir for it to work.
>
> It also doesn't help having the pde builder build insutu - a lot of build
> time stuff gets created which ends up in the various projects.
>
> This is turning into a real pain.   More to come when I figure out what to
> do.
>
>
>
> On Sat, Jun 27, 2009 at 9:58 PM, Steve Poole <sp...@googlemail.com>wrote:
>
>> I fixed this by getting the maven build to tell me the location of the API
>> dependency and then using an Ant script to copy the directory or unpack a
>> jar as required.  Bit of a hack simple.
>>
>> On Thu, Jun 25, 2009 at 5:03 PM, Steve Poole <sp...@googlemail.com>wrote:
>>
>>> I'm hitting a weird problem when building the eclipse projects ,  If I
>>> build outside eclipse using "mvn install"  everything works fine.   But if I
>>> build by using the eclipse maven support I hit a problem with when the API
>>> project (kato.api.eclipse.plugin) is built.
>>>
>>> It fails, it seems,  because the copy dependencies maven plugin  is
>>> expecting to find a jar file and finds a directory instead.  It looks like
>>> this on windows.
>>>
>>> 25/06/09 16:20:48 BST: [INFO] Copying classes to C:\Documents and
>>> Settings\spoole\workspace\kato.eclipse\plugins\kato.api.plugin\target\dependency\classes
>>> 25/06/09 16:20:48 BST: Build errors for kato.api.eclipse.plugin;
>>> org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
>>> the plugin manager executing goal
>>> 'org.apache.maven.plugins:maven-dependency-plugin:2.0:copy-dependencies':
>>> Mojo execution failed.
>>>
>>> In the maven project pom its configured as
>>>
>>> <plugin>
>>>         <groupId>org.apache.maven.plugins</groupId>
>>>         <artifactId>maven-dependency-plugin</artifactId>
>>>         <executions>
>>>           <execution>
>>>             <id>copy-dependencies</id>
>>>             <phase>validate</phase>
>>>             <goals>
>>>               <goal>copy-dependencies</goal>
>>>             </goals>
>>>             <configuration>
>>>               <outputDirectory>lib</outputDirectory>
>>>               <overWriteReleases>false</overWriteReleases>
>>>               <overWriteSnapshots>true</overWriteSnapshots>
>>>               <overWriteIfNewer>true</overWriteIfNewer>
>>>             </configuration>
>>>           </execution>
>>>         </executions>
>>>       </plugin>
>>>
>>>
>>> I can't find any solution to this on the net -  so I'm left with having
>>> to fix this either by replacing the maven plugin with some clunky Ant stuff,
>>> or  by  doing something clever.
>>>
>>> My latest thought is to use svn externals as a way to link the source
>>> code of the API project into the eclipse project.   Since the only reason
>>> for the eclipse API project is to expose the Kato API to eclipse plugins it
>>> sort of makes sense.
>>>
>>> Anyway - thought I'd mention it to see if anyone has fixed this or has an
>>> opinion
>>>
>>>
>>> Cheers
>>>
>>> Steve
>>>
>>>
>>
>

Re: Building the eclipse projects

Posted by Steve Poole <sp...@googlemail.com>.
Having moved to a different machine to prove my changes from scratch  I've
started to uncover more peculiarities in the interactions between eclipse
maven and the pde plugin.

 I can't put my finger on what's the root cause - There are two  symptoms

1 - The jdt compiler preferences for some eclipse plugin projects are
changed on disk back to 1.4 (from 1.6)
2 - In the API plugin even with all the dependencies satisfied the manifest
editor refuses to acknowledge that the classes being exported exist.  I have
to reedit the plugin runtime class path to remove and replace the api
classes dir for it to work.

It also doesn't help having the pde builder build insutu - a lot of build
time stuff gets created which ends up in the various projects.

This is turning into a real pain.   More to come when I figure out what to
do.


On Sat, Jun 27, 2009 at 9:58 PM, Steve Poole <sp...@googlemail.com>wrote:

> I fixed this by getting the maven build to tell me the location of the API
> dependency and then using an Ant script to copy the directory or unpack a
> jar as required.  Bit of a hack simple.
>
> On Thu, Jun 25, 2009 at 5:03 PM, Steve Poole <sp...@googlemail.com>wrote:
>
>> I'm hitting a weird problem when building the eclipse projects ,  If I
>> build outside eclipse using "mvn install"  everything works fine.   But if I
>> build by using the eclipse maven support I hit a problem with when the API
>> project (kato.api.eclipse.plugin) is built.
>>
>> It fails, it seems,  because the copy dependencies maven plugin  is
>> expecting to find a jar file and finds a directory instead.  It looks like
>> this on windows.
>>
>> 25/06/09 16:20:48 BST: [INFO] Copying classes to C:\Documents and
>> Settings\spoole\workspace\kato.eclipse\plugins\kato.api.plugin\target\dependency\classes
>> 25/06/09 16:20:48 BST: Build errors for kato.api.eclipse.plugin;
>> org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
>> the plugin manager executing goal
>> 'org.apache.maven.plugins:maven-dependency-plugin:2.0:copy-dependencies':
>> Mojo execution failed.
>>
>> In the maven project pom its configured as
>>
>> <plugin>
>>         <groupId>org.apache.maven.plugins</groupId>
>>         <artifactId>maven-dependency-plugin</artifactId>
>>         <executions>
>>           <execution>
>>             <id>copy-dependencies</id>
>>             <phase>validate</phase>
>>             <goals>
>>               <goal>copy-dependencies</goal>
>>             </goals>
>>             <configuration>
>>               <outputDirectory>lib</outputDirectory>
>>               <overWriteReleases>false</overWriteReleases>
>>               <overWriteSnapshots>true</overWriteSnapshots>
>>               <overWriteIfNewer>true</overWriteIfNewer>
>>             </configuration>
>>           </execution>
>>         </executions>
>>       </plugin>
>>
>>
>> I can't find any solution to this on the net -  so I'm left with having to
>> fix this either by replacing the maven plugin with some clunky Ant stuff,
>> or  by  doing something clever.
>>
>> My latest thought is to use svn externals as a way to link the source code
>> of the API project into the eclipse project.   Since the only reason for the
>> eclipse API project is to expose the Kato API to eclipse plugins it sort of
>> makes sense.
>>
>> Anyway - thought I'd mention it to see if anyone has fixed this or has an
>> opinion
>>
>>
>> Cheers
>>
>> Steve
>>
>>
>

Re: Building the eclipse projects

Posted by Steve Poole <sp...@googlemail.com>.
I fixed this by getting the maven build to tell me the location of the API
dependency and then using an Ant script to copy the directory or unpack a
jar as required.  Bit of a hack simple.

On Thu, Jun 25, 2009 at 5:03 PM, Steve Poole <sp...@googlemail.com>wrote:

> I'm hitting a weird problem when building the eclipse projects ,  If I
> build outside eclipse using "mvn install"  everything works fine.   But if I
> build by using the eclipse maven support I hit a problem with when the API
> project (kato.api.eclipse.plugin) is built.
>
> It fails, it seems,  because the copy dependencies maven plugin  is
> expecting to find a jar file and finds a directory instead.  It looks like
> this on windows.
>
> 25/06/09 16:20:48 BST: [INFO] Copying classes to C:\Documents and
> Settings\spoole\workspace\kato.eclipse\plugins\kato.api.plugin\target\dependency\classes
> 25/06/09 16:20:48 BST: Build errors for kato.api.eclipse.plugin;
> org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
> the plugin manager executing goal
> 'org.apache.maven.plugins:maven-dependency-plugin:2.0:copy-dependencies':
> Mojo execution failed.
>
> In the maven project pom its configured as
>
> <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-dependency-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>copy-dependencies</id>
>             <phase>validate</phase>
>             <goals>
>               <goal>copy-dependencies</goal>
>             </goals>
>             <configuration>
>               <outputDirectory>lib</outputDirectory>
>               <overWriteReleases>false</overWriteReleases>
>               <overWriteSnapshots>true</overWriteSnapshots>
>               <overWriteIfNewer>true</overWriteIfNewer>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>
>
> I can't find any solution to this on the net -  so I'm left with having to
> fix this either by replacing the maven plugin with some clunky Ant stuff,
> or  by  doing something clever.
>
> My latest thought is to use svn externals as a way to link the source code
> of the API project into the eclipse project.   Since the only reason for the
> eclipse API project is to expose the Kato API to eclipse plugins it sort of
> makes sense.
>
> Anyway - thought I'd mention it to see if anyone has fixed this or has an
> opinion
>
>
> Cheers
>
> Steve
>
>