Thanks Brian,

I will check into dependency-maven-plugin.  In the meantime, I had
solved it.  This seems to be anti-Maven, b/c it uses an environment
variable, but it seems to work.  I added these two goals to maven.xml

<goal name="check-props">
                <j:if test="${context.getVariable('geoserver.home') == null}">
                        <j:if test="${context.getVariable('env.GEOSERVER_HOME') 
== null}">
                                <fail>Please set either env-var GEOSERVER_HOME 
or Maven var
geoserver.home</fail>
                        </j:if>
                        <echo>Setting geoserver.home to 
${env.GEOSERVER_HOME}</echo>
                        <j:set var="geoserver.home" 
value="${env.GEOSERVER_HOME}"/>
                </j:if>
        </goal>
        <goal name="geoserver" prereqs="jar, check-props" description="Copy
the Diamond Jar to GeoServer">
                <echo>GeoServer Home is = ${geoserver.home}</echo>
                <ant:copy file="${maven.build.dir}/${maven.final.name}.jar"
todir="${geoserver.home}\server\geoserver\WEB-INF\lib"/>
        </goal>

On 1/2/06, Brian E. Fox <[EMAIL PROTECTED]> wrote:
> Take a look at the dependency-maven-plugin at mojo
> http://mojo.codehaus.org/dependency-maven-plugin. After building and
> installing, this plugin could execute and copy it where ever you like.
> It expects the artifact to be in the local or remote repository but if
> you execute it in the install phase, it should already be in your local
> repo by the time the plugin executes.
>
> -----Original Message-----
> From: Davis Ford [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 02, 2006 9:53 AM
> To: [email protected]
> Subject: Copy Jar?
>
> Hi, I'm using Maven 1.0.2 to build my jar.  The jar is used as part of a
> different project called GeoServer that uses Jetty.
>
> Every time I build my jar, I need to manually copy it to
> $someDir$/geoserver/server/WEB-INF/lib/ in order to test my changes.
> I don't rebuild GeoServer software everytime...I only rebuild my jar
> that I run inside GeoServer.  What is the best way for me to add a
> target or over-ride a plugin property to copy my jar to this directory?
>
> I looked at jar:install, but if I think if I over-ride that, then my jar
> dependencies will get screwed up as it won't point to my
> .maven/repository anymore.
>
> I looked at distribution plugin, but it doesn't seem to have any
> documentation.
>
> I'm not that swift yet with Jelly, but is there a maven.xml example
> somewhere that does this?  Also, different developers have installed
> GeoServer in different directories on their machines.  This means
> somehow, whatever solution I create has to be able to accomodate this
> discrepancy.  Environment variable?
>
> Regards,
> Davis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to