maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Gilles <Romain.Gil...@reuters.com>
Subject Extension usage ?
Date Wed, 26 Dec 2007 16:54:57 GMT
Hi,

I'm trying to use the maven extension capability in my plugin. My test
is based on the Plexus tutorial. I have made one extra operation by
adding an API project where I have put the
org.codehaus.plexus.tutorial.WebsiteMonitor interface.

I have a API project (plexus-website-monitor-api) that declares a ROLE
within an Interface: WebsiteMonitor.

I have a project (plexus-website-monitor-component) with a default
implementation of my interface: DefaultWebsiteMonitor implements
WebsiteMonitor.

I have a plugin project (plexus-website-monitor-plugin) that uses this
component interface as an attribute of MonitorMojo. 

Everything works fine if I declare in the plugin's 'pom.xml' a
dependency on the plexus-website-monitor-component artifact (the
implementation) : 

<project>

...

<dependencies>

...

<dependency>

<groupId>org.codehaus.plexus</groupId>

      <artifactId>plexus-website-monitor-component</artifactId>

      <version>1.0-SNAPSHOT</version>

</dependency>

</dependencies>

...

</project>

 

BUT if in my plugin pom.xml I declare a dependency on the API as follow:


<project>

...

<dependencies>

...

<dependency>

<groupId>org.codehaus.plexus</groupId>

      <artifactId>plexus-website-monitor-api</artifactId>

      <version>1.0-SNAPSHOT</version>

</dependency>

</dependencies>

...

</project>

 

and in the project that use the plugin I add the extensions tag as
follow:

<project>

            <build>

                        <plugins>

...

                        </plugins>

                        <extensions>

                                    <extension>

 
<groupId>org.codehaus.plexus</groupId>

 
<artifactId>plexus-website-monitor-component</artifactId>

                                    <version>1.0-SNAPSHOT</version>

                                    </extension>

                        </extensions>

</build>

</project>

 

I get an error on the command line :

[INFO] Internal error in the plugin manager executing goal
'org.codehaus.plexus:plexus-monitor2-plugin:1.0-SNAPSHOT:monitor':
Unable to find the mojo
'org.codehaus.plexus:plexus-monitor2-plugin:1.0-SNAPSHOT:monitor' in the
plugin 'org.codehaus.plexus:plexus-monitor2-plugin' Component descriptor
cannot be found in the component repository:
org.codehaus.plexus.tutorial.WebsiteMonitor.

 

Does it mean that extensions and dependencies are not loaded by the in a
same way? 

How can I resolve It, I suppose it is the same execution context for my
plugin than a Wagon specific implementation but I do not known why it
does not work for me... :-(

 

Please Help ...

 

Thanks,

Romain



This email was sent to you by Reuters, the global news and information company. 
To find out more about Reuters visit www.about.reuters.com

Any views expressed in this message are those of the individual sender, 
except where the sender specifically states them to be the views of Reuters Limited.

Reuters Limited is part of the Reuters Group of companies, of which Reuters Group PLC is the
ultimate parent company.
Reuters Group PLC - Registered office address: The Reuters Building, South Colonnade, Canary
Wharf, London E14 5EP, United Kingdom
Registered No: 3296375
Registered in England and Wales


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message