On Mon, 2008-03-24 at 12:46 -0500, Chris Berry wrote:
> Greetings,
> 
> I am wondering if there is a standard solution to this problem anywhere.
> I can't seem to find one, but I could have easily have overlooked it...
> 
> What we need to do is;  download a file, put it in the local repo, and  
> also on the classpath.
> 
> To make this concrete, I'll explain our use-case. I would like to;
> 
> 1) create a dependency on a RelaxNG schema (a RNC file) in the POM;
> 
> <dependency>
>        <type>rnc</type>
>        <groupId>com.foo</groupId>
>         <artifactId>foobar</artifactId>
>         <version>1.1</version>
> </dependency>
> 
> 2) hook up some plugin in the POM, telling it to recognize RNC types,  
> and to do its work during resource resolution phase
> 
> 3) the plugin would
>      3.1) download the RNC to the local repo
>      3.2) copy it to target/classes, so that we can use it as  
> Classpath resource (to do RelaxNG validation)
> 
> This seems like it might be something people would commonly want to  
> accomplish. Not just for RNC files, but for any custom type.
> 
> We've hacked up a custom plugin to do this. But it doesn't seem like  
> we should have too ???
> 
> If we do have to create a custom plugin, could someone give a synopsis  
> of the best practice for accomplishing this??
> I'd like to verify that we've done it the best way...

Unless I've misunderstood you, the standard maven-dependency-plugin does
what you want:
  http://maven.apache.org/plugins/maven-dependency-plugin/

See the "dependency-copy" goal in particular.

Regards,
Simon
  



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

Reply via email to