[ 
http://jira.codehaus.org/browse/MANTRUN-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_107927
 ] 

Alan Mehio commented on MANTRUN-58:
-----------------------------------

I had some issue with the dependecy of the following tasks which get executed 
from mavenantrun plugin
the tasks are 
telnet
ftp 


the dependency are :
ant-commons-net 
commons-net

I have checked the plugin class path ( printed out) and found the above 
dependency are not included. 
the plug in should bring its dependencies and know about its dependencies. I 
would say; manvenantrun plugin should include all the depdencies needed to run 
ant task or at least   it should be documented in the examples at 
http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html

The solution is to explicitly mention the dependency as below which needs to be 
documented. I found it after opening the source code and analysing the whole 
code of the manvenantrun plugin which took me some time.

                                <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-antrun-plugin</artifactId>
                                <dependencies>
                                        <dependency>
                                                <groupId>commons-net</groupId>
                                                
<artifactId>commons-net</artifactId>
                                                <version>1.4.1</version>
                                        </dependency>
                                        <dependency>
                                                <groupId>ant</groupId>
                                                
<artifactId>ant-commons-net</artifactId>
                                                <version>1.6.5</version>
                                        </dependency>          

                                </dependencies>
                                <executions>
                                        <execution>
                                                <id>pricingDeployment</id>
                                                <phase>pricingDeployment</phase>
                                                <configuration>
                                                        <tasks>

                                                                 
                                                                        
<property name="compile_classpath" refid="maven.compile.classpath"/>
                                                                        
<property name="runtime_classpath" refid="maven.runtime.classpath"/>
                                                                        
<property name="test_classpath" refid="maven.test.classpath"/>
                                                                        
<property name="plugin_classpath" refid="maven.plugin.classpath"/>
                                                                        
                                                                        <echo 
message="compile classpath: ${compile_classpath}"/>
                                                                        <echo 
message="runtime classpath: ${runtime_classpath}"/>
                                                                        <echo 
message="test classpath:    ${test_classpath}"/>
                                                                        <echo 
message="plugin classpath:  ${plugin_classpath}"/>
                                                                        
<property name="maven.build.output" value="target/classes"/>
                                                                        
<property name="maven.build.directory" value="target"/>
                                                                        
<property name="maven.build.final.name" value="project.build.finalName"/>
                                                                        

                                                                    <ftp
                                                                    
action="send"
                                                                    
server="myhost"
                                                                        
remotedir="/apps/java/pricingEngine" userid="alan"
                                                                        
password="password" depends="yes" verbose="yes">
                                                                         
<fileset
                                                                                
dir="${project.build.directory}">
                                                                                
<include name="*.jar" />
                                                                         
</fileset>
                                                                   </ftp>
                                                                 
                                                        </tasks>
                                                </configuration>
                                                <goals>
                                                        <goal>run</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin>



Regards,
Alan Mehio
London, UK

> Update depencies to include all ant artifacts so all ant tasks can be used
> --------------------------------------------------------------------------
>
>                 Key: MANTRUN-58
>                 URL: http://jira.codehaus.org/browse/MANTRUN-58
>             Project: Maven 2.x Antrun Plugin
>          Issue Type: Bug
>            Reporter: Jason Chaffee
>            Priority: Blocker
>
> Should add ALL ant distribution artifacts as dependencies as some tasks 
> cannot be run without them.  For example, ant-trax is needed to use <xslt> 
> with the trax processor.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to