Dear
 for reference:
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>sample.plugins</groupId>
  <artifactId>maven-hello-plugin</artifactId>
  <packaging>jar</packaging>
  <!--<version>2.1-SNAPSHOT</version>-->
  <version>2</version>
  <name>Sample Parameter-less Maven Plugin</name>
  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
     <version>2.0</version>
    </dependency>
  </dependencies>
  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <outputDirectory>target</outputDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <configuration>
              <tasks>
               <property file="project.properties"/>
               <!--<property name="sunone.home" value="e:/sunapp7"/>-->
               <property name="jespath" value="sun-appserv-ant.jar"/>
               <path id="jesclasspath">
                 <pathelement location="sun-appserv-ant.jar"/>
                 <fileset dir="." includes="*.jar"/>
               </path>
               <!--sun-appserv-ant.jar-->
               <!--<taskdef name="sun-appserv-admin" classname
="org.apache.tools.ant.taskdefs.optional.sun.appserv.AdminTask" classpath
="${jespath}"/>-->
               <taskdef name="sun-appserv-admin" classname
="org.apache.tools.ant.taskdefs.optional.sun.appserv.AdminTask"
classpathref="jesclasspath" />
               <sun-appserv-admin command="start-instance --user admin
--password admin1234 --host 172.19.100.41 dss">
                </sun-appserv-admin>
               </tasks>
               <!--<taskdef name="sun-appserv-instance" classname
="org.apache.tools.ant.taskdefs.optional.sun.appserv.InstanceTask"
classpath="sun-appserv-ant.jar;f:\test\anttask\appserv-admin.jar;f:
\test\anttask\appserv-rt.jar;f:\test\anttask\appserv-ext.jar;"/>
                 <sun-appserv-instance
                    action="start"
                    user= "admin"
                    password="admin1234"
                    host="172.19.100.41"
                    instance="dss"
                    sunonehome= "e:/sunapp7">
                  </sun-appserv-instance>
              </tasks>-->

              <!--<taskdef name="sun-appserv-instance" classname
="org.apache.tools.ant.taskdefs.optional.sun.appserv.InstanceTask"
classpath="sun-appserv-ant.jar;f:\test\anttask\appserv-admin.jar;f:
\test\anttask\appserv-rt.jar;f:\test\anttask\appserv-ext.jar;"/>
                 <sun-appserv-instance
                    action="create"
                    user= "admin"
                    password="admin1234"
                    host="localhost"
                    instanceport="1089"
                    instance="clarkraotest"
                    sunonehome= "e:/sunapp7">
                  </sun-appserv-instance>
              </tasks>-->
              <!--<taskdef name="sun-appserv-instance" classname
="org.apache.tools.ant.taskdefs.optional.sun.appserv.InstanceTask"
classpath="sun-appserv-ant.jar;f:\test\anttask\appserv-admin.jar;f:
\test\anttask\appserv-rt.jar;f:\test\anttask\appserv-ext.jar;"/>
                 <sun-appserv-instance
                    action="delete"
                    user= "admin"
                    password="admin1234"
                    host="localhost"
                    instance="clarkraotest"
                    sunonehome= "e:/sunapp7">
                  </sun-appserv-instance>
              </tasks> -->
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <distributionManagement>
      <repository>
        <id>localrepo_server</id>
        <name>distribution repository</name>
        <url>file:///d:/m2localrepo/</url>
     </repository>
      <snapshotRepository>
        <id>localrepo_server</id>
        <name>distribution repository</name>
        <url>file:///d:/m2localrepo/</url>
     </snapshotRepository>

  </distributionManagement>
</project>






thanks.
Tel: (020)36315358-328 Fax: (020)36315170


                                                                                
                                                         
                      "Sean Hennessy"                                           
                                                         
                      <[EMAIL PROTECTED]        To:       "Maven Users List" 
<users@maven.apache.org>                                   
                      tworks.com>                cc:                            
                                                         
                                                 Subject:  RE: Classpath in 
antrun plugin                                                
                      17/11/2005 06:36                                          
                                                         
                      Please respond to                                         
                                                         
                      "Maven Users List"                                        
                                                         
                                                                                
                                                         
                                                                                
                                                         




Thank you for the clarification.
I missed the dependency for commons attributes in the previous post.
I presumed the classpath already referenced the maven-antrun-plugin jar
with anttask.properties resource therein.
My first attempt using the example resulted in:

[taskdef] Could not load definitions from resource
org/apache/commons/attributes/anttasks.properties

That led me to look closer "jar tf maven-antrun-plugin-1.0.jar" and
discover no resource so named.
So I generated an anttask.properties file and shaved down the path for a
trial and error attempt..

It remains an exercise of discovery to hunt down the jar that contains the
anttask.properties.

Regards,
Sean

-----Original Message-----
From: Drew Hite [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 16, 2005 1:47 PM
To: Maven Users List
Subject: Re: Classpath in antrun plugin


I think it would need to be in the classpath specified by classpath
attribute of the taskdef tag. So in your case, ${depClasspath} should
include the directory where anttask.properties is found. However, in my
experience the anttask.properties files are found in jar files and your
class path needs to include the jar, and in that case you need to make sure
you specify the full path within the jar as in the earlier example that I
gave.

HTH,
Drew

On 11/16/05, Sean Hennessy <[EMAIL PROTECTED]> wrote:
>
> Please would you elaborate on where one would place the
> anttask.propertiesfile?
>
> Although the build.xml was found maven barked about loading the
> anttask.properties file. I simplified the taskdef in build.xml
> <taskdef classpath="${depClasspath}" resource="anttask.properties">
> </taskdef>
>
>
> [taskdef] Could not load definitions from resource anttask.properties.
>
> -----Original Message-----
> From: Drew Hite [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 15, 2005 2:09 PM
> To: Maven Users List
> Subject: Re: Classpath in antrun plugin
>
>
> A few days ago it was stated on this list that the antrun plugin
> exposes maven.dependency.classpath to ant as a ref. It can be
> referenced with: <property name="depClasspath"
> refid="maven.dependency.classpath" />
>
> So if you could have something like this in your build.xml
>
> <project default="create_atts">
> <property name="src.path" value="src"/>
> <taskdef classpath="${depClasspath}"
> resource="org/apache/commons/attributes/anttasks.properties">
> </taskdef>
> <target name="create_atts">
> <attribute-compiler destdir="${src.path}">
> <fileset dir="${src.path}" />
> </attribute-compiler>
> </target>
> </project>
>
> and something like this in your pom.xml..
>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <execution>
> <phase>generate-sources</phase>
> <configuration>
> <tasks>
> <property name="depClasspath" refid="maven.dependency.classpath" />
> <ant antfile="build.xml" dir="." target="create_atts"
> inheritRefs="true" /> </tasks> </configuration> <goals>
> <goal>run</goal> </goals> </execution> </executions> </plugin>
> </plugins> </build>
>
> Seems to work for me...
>
> Drew
>
> On 11/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Hi Alexandre
> >
> > Thanks for your reply. This is what I would have assumed would be
> > the case but I am not getting this behaviour.
> >
> > Here is the relevant section of the pom
> >
> > <dependencies>
> > <!-- Dependency for Oracle JDBC -->
> > <dependency>
> > <groupId>ojdbc</groupId>
> > <artifactId>ojdbc</artifactId>
> > <version>14</version>
> > <scope>compile</scope>
> > </dependency>
> > </dependencies>
> > <build>
> > <plugins>
> > <plugin>
> > <artifactId>maven-antrun-plugin</artifactId>
> > <executions>
> > <execution>
> > <phase>test</phase>
> > <configuration>
> > <tasks>
> > <ant antfile="build.xml" dir="src/main" target="db-build"
> > inheritRefs="true"/> </tasks> </configuration>
> > <goals>
> > <goal>run</goal>
> > </goals>
> > </execution>
> > </executions>
> > </plugin>
> > </plugins>
> > </build>
> >
> > And this is the task that is being run in the build.xml file
> >
> > <sql src="oracle/bla_bla_bla.sql"
> > classpath="${jdbcfile}"
> > driver="${driver}"
> > url="${url}"
> > userid="${usr}"
> > password="${pass}"/>
> >
> >
> > Any ideas?
> >
> > Steve
> >
> > Quoting Alexandre Poitras <[EMAIL PROTECTED]>:
> >
> > >> From what I recall, the classpath seemed to be already set up for
> > >> the
> > ant
> > > plugin, including the dependencies declared in the pom.
> > >
> > > On 11/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > > wrote:
> > >>
> > >> Hi All
> > >>
> > >> How do I set up the classpath for ant tasks to contain the
> > >> dependencies specified in my POM
> > >>
> > >> Kind regards
> > >>
> > >> Stephen
> > >>
> > >> -----------------------------------------------------------------
> > >> --
> > >> --
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> > >
> > >
> > > --
> > > Alexandre Poitras
> > > Québec, Canada
> > >
> >
> >
> >
> >
> > --------------------------------------------------------------------
> > -
> > 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]


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________



Hactl..........Moving forward with you.

Best Air Cargo Terminal - Asia 2005
Air Cargo Terminal of the Year 2002, 2003 & 2004

Web: http://www.hactl.com

DISCLAIMER :-
The information contained in this message, including any attachment, is
confidential and may also be privileged. The information is intended only
for the person or entity to which it is addressed. Any review,
re-transmission, copying, storage, distribution or other use or disclosure
of this information by persons or entities other than the intended
recipient is prohibited. If you are not the intended recipient, please
contact the sender immediately by return email and delete this message from
your system. Thank you.




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

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

Reply via email to