You can use the dependency:copy or unpack to get your file out of the
repo and drop it or unpack it...much simpler than using ant.

-----Original Message-----
From: Simon Taylor [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 19, 2007 6:32 PM
To: Maven Users List
Subject: RE: Maven2 - deploy archive to server?


This is the exact same question I was asking a few weeks ago.
Now I may have misunderstood how things are meant to work but this is
how I see it:-

1) Developers check out source code from Source Code Repository
(including the POM)
2) Maven build + test locally
3) Make your changes then commit to SCC (possibly using the mvn
release-plugin)
4) Deploy to Maven Repository - optionally use an Assembly to build a
distribution containing non-build components (shell scripts, html read
me etc)
5) Consume the resource from the Repository - since the repository is
HTTP accessible its easy to access your dist from wget OR via an ant
script using the maven ant tasks if you want the install to traverse the
dependency for your dist (if you didn't use the assembly to pull all the
dependencies into the dist

We deploy to a filesystem so the Cargo Plugin didn't fit with what were
trying to achieve.

This is an example ant build.xml which accesses a Maven repository and
grabs artifact com.nortel.RemedySLAFormula version 1 it copies the jar
and dependencies into target/files/binaries. For more go here
(http://maven.apache.org/ant-tasks.html)

It's a rudimentary start but you get the idea.


<project name="maven-ant-tasks" default="test-deps"
xmlns:artifact="urn:maven-artifact-ant">
  <target name="initTaskDefs">
        <xmlproperty file="pom.xml" prefix="pom.xml" />

    <path id="maven-ant-tasks.classpath"
path="target/maven-ant-tasks-2.0.7.jar" />
    <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant"
             classpathref="maven-ant-tasks.classpath"/>
  </target>

  <target name="test-deps" depends="initTaskDefs">
    
    <artifact:dependencies pathId="dependency.classpath"
filesetId="dependency.fileset" sourcesFilesetId="sources.fileset"
verbose="true" versionsId="dependency.versions">
      <dependency groupId="com.nortel" artifactId="RemedySLAFormula"
version="1.0"/>
      <remoteRepository url="http://hardgwd01:7680/maven_repo";
id="NortelToolsRepo" />
    </artifact:dependencies>

    <copy todir="target/files/binaries">
      <fileset refid="dependency.fileset"/>
       <mapper type="flatten"/>
    </copy>
    
   </target>
</project>
 
HTH

Simon


-----Original Message-----
From: kroe [mailto:[EMAIL PROTECTED] 
Sent: 19 November 2007 22:58
To: [email protected]
Subject: Maven2 - deploy archive to server?


Our applications are deployed to internal servers - either to JBoss as a
web application or to a directory on a specified server for exection by
a scheduling system.  We have development, staging, and production
environments that we need the ability to deploy to consistenly and
easily.

Maven's usage of the word "deploy" clashes with how I have always
thought of "deploy".  Maven's deploy plug-in outputs to an artifact
repository.  Is this the end of the line for the maven life cycle, or is
there a plug-in that allows you to transfer the artifact to a
development, staging, or production server based on the profile set?  If
this is not supported by Maven, how are the rest of you distributing
your artifacts for execution?

Thanks,
-Ken
--
View this message in context:
http://www.nabble.com/Maven2---deploy-archive-to-server--tf4840083s177.h
tml#a13847417
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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