hi, well, maybe, but it seemed to me that the JarArchiver packages only things that match its filter. And things like a LIB folder in the target definitely did not match this filter by default. Maybe I can configure the archiver plugin to include that too? In this case the dependency plugin will work for me.
Another headache I have now, is that later on I will have to process some files, like generating classpath into a run script template according to what JARs have been collected during the build. I'm just suspecting, that I will have to have a mojo for this custom processing. Cheers, Janos On 25/06/07, Tim Kettler <[EMAIL PROTECTED]> wrote:
Hi, wouldn't it be easier/more sane to just use the maven-dependency-plugin [1] to copy the needed dependencies (with the copy-dependencies goal) in the right directory under ./target/ so that they are jarred up when the standard jar-plugin is run in the package phase? -Tim [1] http://maven.apache.org/plugins/maven-dependency-plugin/ János Jarecsni schrieb: > 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]
