well, that would depend on how _old_ that trunk version is...I think brett put it in just a month ago or so.. I'll be back in town soon and can help you out on monday maybe.. paste in some examples of what you are trying to do jesse
On 9/23/05, Yann Le Du <[EMAIL PROTECTED]> wrote: > > Hi Jesse, > > I happen to try and use the extension mechanism for the antrun-plugin. The > ant > script I'm trying to run contains <regexpmapper> tags, so I need > ant:ant-nodeps > to be available to the plugin (if I add this dependency to antrun-plugin's > POM, > it's working). > > A few days ago, Kenney told me about this extension mechanism, but I never > get > to make it work - I admit now that I was using an ooold trunk version then > :) > Following your description, I just tried again, but to no avail. Do you > see > anything wrong in the way I use this mechanism below ? > > Also, I noticed this issue : http://jira.codehaus.org/browse/MNG-697 > Does it mean this extension mechanism isn't operational at the present > time ? > > Thanks, > > Yann > > > ~ <project> > ~ <parent> > ~ <artifactId>myparent</artifactId> > ~ <groupId>com.corp.myparent</groupId> > ~ <version>1.0.0</version> > ~ </parent> > ~ > ~ <modelVersion>4.0.0</modelVersion> > ~ <groupId>com.corp.myparent</groupId> > ~ <artifactId>myproject</artifactId> > ~ <name>My project</name> > ~ <version>1.0.1-SNAPSHOT</version> > ~ > ~ <build> > ~ <extensions> > ~ <extension> > ~ <groupId>ant</groupId> > ~ <artifactId>ant-nodeps</artifactId> > ~ <version>1.6.5</version> > ~ </extension> > ~ </extensions> > ~ > ~ [...] > ~ > ~ <plugins> > ~ <plugin> > ~ <artifactId>maven-antrun-plugin</artifactId> > ~ > ~ <executions> > ~ <execution> > ~ <phase>process-resources</phase> > ~ > ~ <goals> > ~ <goal>run</goal> > ~ </goals> > ~ > ~ <inherited>true</inherited> > ~ > ~ <configuration> > ~ <tasks> > ~ <ant antfile="replace.xml"/> > ~ </tasks> > ~ </configuration> > ~ </execution> > ~ </executions> > ~ </plugin> > ~ > ~ [...] > ~ </plugins> > ~ </build> > ~ > ~ <dependencies> > ~ <dependency> > ~ <groupId>ant</groupId> > ~ <artifactId>ant-nodeps</artifactId> > ~ <version>1.6.5</version> > ~ </dependency> > ~ > ~ [...] > ~ </dependencies> > ~ > ~ [...] > ~ </project> > > > --- Jesse McConnell <[EMAIL PROTECTED]> a écrit : > > > sure: > > > > > > this is the pom.xml for the maven-jdbc-plugin...notice there are not > > dependencies for a database driver in the plugin pom itself. > > > > <project> > > <modelVersion>4.0.0</modelVersion> > > <parent> > > <artifactId>mojo</artifactId> > > <groupId>org.apache.maven.plugins</groupId> > > <version>1.0.1</version> > > </parent> > > <artifactId>maven-jdbc-plugin</artifactId> > > <version>0.1-SNAPSHOT</version> > > <packaging>maven-plugin</packaging> > > <name>Maven JDBC Plugin</name> > > <inceptionYear>2005</inceptionYear> > > <dependencies> > > <dependency> > > <groupId>org.apache.maven</groupId> > > <artifactId>maven-project</artifactId> > > <version>2.0-beta-1-SNAPSHOT</version> > > </dependency> > > <dependency> > > <groupId>plexus</groupId> > > <artifactId>plexus-utils</artifactId> > > <version>1.0.1-SNAPSHOT</version> > > </dependency> > > </dependencies> > > </project> > > > > and here is the pom.xml for something that is using the plugin: > > > > <project> > > <modelVersion>4.0.0</modelVersion> > > <groupId>g</groupId> > > <artifactId>g-db</artifactId> > > <packaging>jar</packaging> > > <version>1.0</version> > > <name>g - db plugin playground</name> > > <parent> > > <groupId>g</groupId> > > <artifactId>g</artifactId> > > <version>1.0</version> > > </parent> > > <dependencies> > > <dependency> > > <groupId>oracle</groupId> > > <artifactId>oracle</artifactId> > > <version>9201</version> > > <scope>compile</scope> > > </dependency> > > <dependency> > > <groupId>oracle</groupId> > > <artifactId>oracle_nls_charset</artifactId> > > <version>9201.12</version> > > <scope>compile</scope> > > </dependency> > > </dependencies> > > <build> > > <extensions> > > <extension> > > <artifactId>oracle</artifactId> > > <groupId>oracle</groupId> > > <version>9201</version> > > </extension> > > <extension> > > <artifactId>oracle_nls_charset</artifactId> > > <groupId>oracle</groupId> > > <version>9201.12</version> > > </extension> > > </extensions> > > <plugins> > > <plugin> > > <artifactId>maven-jdbc-plugin</artifactId> > > <version>1.0-SNAPSHOT</version> > > <configuration> > > <driver>oracle.jdbc.driver.OracleDriver</driver> > > <url>jdbc:oracle:thin:@host:1790:DB</url> > > <username>user</username> > > <password>password</password> > > <statement>select * from whatever</statement> > > </configuration> > > </plugin> > > </plugins> > > </build> > > </project> > > > > > > now, the <dependency> entries would in available to compile against for > > sources that might be in this subproject..but they would not be > available to > > the plugin execution classpath. But with the <extensions> mechanism the > > plugin would be able to find the oracle.jdbc.driver.OracleDriver class > since > > those extensions are inserted into the plugin exec classpath > > > > in a nutshell it can boil down to > > > > extensions let you insert an artifact into the classpath of a plugin > when it > > executes > > > > that clear it up further? > > > > jesse > > > > On 9/22/05, dohadwala, moiz <[EMAIL PROTECTED]> wrote: > > > > > > Jesse, > > > > > > Thanks for the explanation. To make it clearer, can you show me what > the > > > extension tag would look like in this case? > > > > > > Thanks, > > > > > > -Moiz > > > > > > -----Original Message----- > > > From: Jesse McConnell [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, September 22, 2005 7:25 AM > > > To: Maven Users List > > > Subject: Re: [m2] project descriptor tags > > > > > > I can give you a use case where you would need extensions. > > > > > > there is a jdbc plugin that lets you execute whatever sql you want > when > > > you > > > execute the plugin. But the way the plugin was built you can't just > > > declare > > > every database driver as a dependency of the plugin...that would mean > > > people > > > would need to download oracle drivers and install them just to use > mysql.. > > > > > > so you use extensions so that you can insert the database driver code > at > > > runtime of the plugin.. > > > > > > does that case clear up what extensions can be used for? > > > > > > jesse > > > > > > On 9/22/05, dohadwala, moiz <[EMAIL PROTECTED]> wrote: > > > > > > > > I am new to maven and have decided to take the plunge with m2. I > have > > > > trying to understand the pom.xml tags. I don't understand the > purpose > > > > of the extension tag. The description on > > > > > http://maven.apache.org/maven2/maven-model/maven.html#class_Extension > > > > < > http://maven.apache.org/maven2/maven-model/maven.html#class_Extension > > > > > > > > > isn't too clear. > > > > > > > > Is there any other location I can use for reference? > > > > > > > > -Moiz > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > jesse mcconnell > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > jesse mcconnell > > > > > > > > > > > ___________________________________________________________________________ > Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger > Téléchargez cette version sur http://fr.messenger.yahoo.com > -- jesse mcconnell jesseDOTmcconnellATgmailDOTcom