Is there a particular reason why the Assembly plugin, using
"jar-with-dependencies" does not work for you? Most people use this
option to create project Jars that also contain some/all dependency
Jars.

Wayne

On 6/25/07, János Jarecsni <[EMAIL PROTECTED]> wrote:
Hi,

I'm new to maven and to this list so Hi everybody :) Here's my problem: I'd
have to write a maven plugin, which would extend the normal behaviour of the
Jar Archiver. What I need is that the target jar also includes some of the
declared dependencies. I'm stuck for two reasons:

1. Upon setting up the basic mojo project, I can't proceed as the install
goal fails:

[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Maven Sample Plugin
[INFO]    task-segment: [install]
[INFO]
----------------------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-plugin-plugin' does not
exist or no valid version could be found
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Jun 25 16:03:06 CEST 2007
[INFO] Final Memory: 1M/2M
[INFO]
------------------------------------------------------------------------

Here's the pom:
<project xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd' xmlns='
http://maven.apache.org/POM/4.0.0'>
 <modelVersion>4.0.0</modelVersion>
 <groupId>mygroup</groupId>
 <artifactId>maven-simple-plugin</artifactId>
 <packaging>maven-plugin</packaging>
 <name>Maven Sample Plugin</name>
 <version>1.0</version>

 <dependencies>
   <dependency>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven-plugin-api</artifactId>
     <version>2.0</version>
   </dependency>
 </dependencies>
</project>

Secondly, I'm unsure: I think I will have to create a new packaging, and
delegate some work to the JAR packager? Something like chain of
responsibilities is not possible with Mojos in this case, I fear. Am I
right?

Thanks in advance,
Janos


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to