Re: Maven Ant-Run plugin

2008-12-03 Thread Stephen Connolly
you need to add the custom task's jar as a dependency for the antrun
plugin

also note that in a multi-module build, the first module to load a plugin
defines the classpath of the plugin for all subsequent modules in the same
reactor execution.

2008/12/3 Ricardo Mayerhofer <[EMAIL PROTECTED]>

>
> I've a ant task that runs fine on ant, but fails on maven ant run plugin.
> The
> ant task is not able to find a class defined on my system's classpath.
> I guess maven ant run has it's own classpath (maven.plugin.classpath?) Is
> it
> possible to set the plugin classpath and tells it to use my system
> classpath?
> --
> View this message in context:
> http://www.nabble.com/Maven-Ant-Run-plugin-tp20817803p20817803.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close

2009-10-08 Thread Doug Daniels
It appears that there are a couple other cases of this occurring around August 
27th 2009, in some open source projects.
http://www.mail-archive.com/uima-...@incubator.apache.org/msg10531.html 

I'm running with mvn -v:
Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
Java version: 1.6.0_16
Java home: C:\Program Files\Java\jdk1.6.0_16\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows server 2008" version: "6.1" arch: "amd64" Family: "windows"

-Original Message-
From: Doug Daniels [mailto:ddani...@webwars.com] 
Sent: Thursday, October 08, 2009 10:40 AM
To: users@maven.apache.org
Subject: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: 
org.apache.tools.ant.util.FileUtils.close

I'm building a maven project that uses the maven-ant-run plugin and I'm getting 
an error about a missing method from Ant. 





org.apache.maven.plugins


maven-antrun-plugin



install


run





The main error is:
[INFO] Error configuring: org.apache.maven.plugins:maven-antrun-plugin. Reason: 
java.lang.NoSuchMethodError: 
org.apache.tools.ant.util.FileUtils.close(Ljava/io/InputStream;)V


Here's the details:
[FATAL ERROR] 
org.codehaus.plexus.component.configurator.BasicComponentConfigurator#configureComponent(...)
 caused a linkage error (java.lang.NoSuchMethodError)
 and may be out-of-date. Check the realms:
[FATAL ERROR] Plugin realm = 
app0.child-container[org.apache.maven.plugins:maven-antrun-plugin:1.3]
urls[0] = 
file:/C:/Users/Autobuild/.m2/repository/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.jar
urls[1] = 
file:/C:/Users/Autobuild/.m2/repository/org/liquibase/liquibase-core/1.9.3/liquibase-core-1.9.3.jar
urls[2] = 
file:/C:/Users/Autobuild/.m2/repository/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar
urls[3] = 
file:/C:/Users/Autobuild/.m2/repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar
urls[4] = 
file:/C:/Users/Autobuild/.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar
urls[5] = 
file:/C:/Users/Autobuild/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
urls[6] = 
file:/C:/Users/Autobuild/.m2/repository/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar
urls[7] = 
file:/C:/Users/Autobuild/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar
urls[8] = 
file:/C:/Users/Autobuild/.m2/repository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar
urls[9] = 
file:/C:/Users/Autobuild/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
urls[10] = 
file:/C:/Users/Autobuild/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar
urls[11] = 
file:/C:/Users/Autobuild/.m2/repository/cglib/cglib/2.1_3/cglib-2.1_3.jar
urls[12] = file:/C:/Users/Autobuild/.m2/repository/asm/asm/1.5.3/asm-1.5.3.jar
urls[13] = 
file:/C:/Users/Autobuild/.m2/repository/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar
urls[14] = 
file:/C:/Users/Autobuild/.m2/repository/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar
urls[15] = 
file:/C:/Users/Autobuild/.m2/repository/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar
urls[16] = 
file:/C:/Users/Autobuild/.m2/repository/org/slf4j/slf4j-api/1.4.2/slf4j-api-1.4.2.jar
urls[17] = 
file:/C:/Users/Autobuild/.m2/repository/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar
urls[18] = 
file:/C:/Users/Autobuild/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
urls[19] = 
file:/C:/Users/Autobuild/.m2/repository/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar
urls[20] = 
file:/C:/Users/Autobuild/.m2/repository/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar
urls[21] = file:/C:/Users/Autobuild/.m2/repository/ant/ant/1.5/ant-1.5.jar
urls[22] = 
file:/C:/Users/Autobuild/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar
urls[23] = 
file:/C:/Users/Autobuild/.m2/repository/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar
urls[24] = 
file:/C:/Users/Autobuild/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/C:/apps/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar
[INFO] ---

Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close

2009-10-08 Thread Jörg Schaible
Hi Doug,

Doug Daniels wrote:

> I'm building a maven project that uses the maven-ant-run plugin and I'm
> getting an error about a missing method from Ant.

Does this happen in a multi-project build or when you try to build the
project directly? Which other plugins did run before the install phase?

- Jörg



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close

2009-10-08 Thread Mark Struberg
Hmm maybe it's as simple as that: the maven-antrun-plugin only has the core 
dependencies on board. If your ant scripts make use of additional functions, 
you have to add those jars as dependencies.
E.g.:

> 
>  maven-antrun-plugin
>  ... 
>  
>   
>ant
>ant-nodeps
>1.6.5
>   
>  
>  

LieGrue,
strub

--- On Thu, 10/8/09, Jörg Schaible  wrote:

> From: Jörg Schaible 
> Subject: Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: 
> org.apache.tools.ant.util.FileUtils.close
> To: users@maven.apache.org
> Date: Thursday, October 8, 2009, 6:35 PM
> Hi Doug,
> 
> Doug Daniels wrote:
> 
> > I'm building a maven project that uses the
> maven-ant-run plugin and I'm
> > getting an error about a missing method from Ant.
> 
> Does this happen in a multi-project build or when you try
> to build the
> project directly? Which other plugins did run before the
> install phase?
> 
> - Jörg
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 




-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close

2009-10-08 Thread Jörg Schaible
Hi Mark,

Mark Struberg wrote:

> Hmm maybe it's as simple as that: the maven-antrun-plugin only has the
> core dependencies on board.

Look at the stack trace, it seems to imply that he did classes use from ant
core only.

- Jörg


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close

2009-10-08 Thread Doug Daniels
It is happening during a multi-module build, but it also occurs when I run that 
individual project in isolation. How would I give you the listing of other 
plugins being used (beyond maven-ant-run I am using just the default java 
project plugin maven-compiler-plugin)

I am additionally using the ant-contrib 1.0b3 library included as a dependency 
in the maven-ant-run plugin (along with some other application specific 
dependencies not directly ANT related).

Here's the full pom.xml plugin definition (inside a "liquibase-diff" profile):

liquibase-diff



org.apache.maven.plugins

maven-antrun-plugin


install

run





PERFORMING LIQUIBASE FUNCTIONS















org.liquibase
liquibase-core
1.9.3


mysql
mysql-connector-java

5.1.6


org.hibernate
hibernate
3.2.6.ga


org.hibernate
hibernate-annotations

3.4.0.GA


org.slf4j
slf4j-jdk14
1.5.6


apache-log4j
log4j
1.2.14


ant-contrib
ant-contrib
1.0b3



-Original Message-
From: news [mailto:n...@ger.gmane.org] On Behalf Of Jörg Schaible
Sent: Thursday, October 08, 2009 11:35 AM
To: users@maven.apache.org
Subject: Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: 
org.apache.tools.ant.util.FileUtils.close

Hi Doug,

Doug Daniels wrote:

> I'm building a maven project that uses the maven-ant-run plugin and I'm
> getting an error about a missing method from Ant.

Does this happen in a multi-project build or when you try to build the
project directly? Which other plugins did run before the install phase?

- Jörg



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close

2009-10-08 Thread Doug Daniels
Also I am only seeing this when I run the:
mvn -P liquibase-diff install

On a windows 2008 server machine running with the following maven environment:
Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
Java version: 1.6.0_16
Java home: C:\Program Files\Java\jdk1.6.0_16\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows server 2008" version: "6.1" arch: "amd64" Family: "windows"


It runs fine on a Linux build environment:
Maven version: 2.1.0-M1
Java version: 1.6.0_07
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.18-92.1.22.el5" arch: "amd64" family: "unix"

(I've also tried using maven 2.1.0 with no luck, and deleting my ~/.m2/repo 
with no luck)

-Original Message-
From: Doug Daniels 
Sent: Thursday, October 08, 2009 12:38 PM
To: users@maven.apache.org
Subject: RE: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: 
org.apache.tools.ant.util.FileUtils.close

It is happening during a multi-module build, but it also occurs when I run that 
individual project in isolation. How would I give you the listing of other 
plugins being used (beyond maven-ant-run I am using just the default java 
project plugin maven-compiler-plugin)

I am additionally using the ant-contrib 1.0b3 library included as a dependency 
in the maven-ant-run plugin (along with some other application specific 
dependencies not directly ANT related).

Here's the full pom.xml plugin definition (inside a "liquibase-diff" profile):

liquibase-diff



org.apache.maven.plugins

maven-antrun-plugin


install

run





PERFORMING LIQUIBASE FUNCTIONS















org.liquibase
liquibase-core
1.9.3


mysql
mysql-connector-java

5.1.6


org.hibernate
hibernate
3.2.6.ga


org.hibernate
hibernate-annotations

3.4.0.GA


org.slf4j
slf4j-jdk14
1.5.6


apache-log4j
log4j
1.2.14


ant-contrib
ant-contrib
1.0b3



-Original Message-
From: news [mailto:n...@ger.gmane.org] On Behalf Of Jörg Schaible
Sent: Thursday, October 08, 2009 11:35 AM
To: users@maven.apache.org
Subject: Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: 
org.apache.tools.ant.util.FileUtils.close

Hi Doug,

Doug Daniels wrote:

> I'm building a maven project that uses the maven-ant-run plugin and I'm
> getting an error about a missing method from Ant.

Does this happen in a multi-project build or when you try to build the
project directly? Which other plugins did run before the install phase?

- Jörg



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close

2009-10-08 Thread Jörg Schaible
Hi Doug,

Doug Daniels wrote at Donnerstag, 8. Oktober 2009 19:42:

> Also I am only seeing this when I run the:
> mvn -P liquibase-diff install

Can you post the /project/build/plugins section running

mvn help:effective-pom -P liquibase-diff

- Jörg


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close

2009-11-01 Thread Vadim B


Jörg Schaible-2 wrote:
> 
> Can you post the /project/build/plugins section running
> mvn help:effective-pom -P liquibase-diff
> 


Hi Jörg, 

I have exact the same problems as Doug. So i just post my results of the 
mvn help:effective-pom -P tester
C:\Dev\workspace\derux-master\derux-qa>mvn help:effective-pom -P tester
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'help'.
[INFO]

[INFO] Building Derux QA Testing
[INFO]task-segment: [help:effective-pom] (aggregator-style)
[INFO]

[INFO] [help:effective-pom {execution: default-cli}]
[INFO]
Effective POMs, after inheritance, interpolation, and profiles are applied:















http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.x
sd">
  4.0.0
  
derux-master
derux
1.0.0-SNAPSHOT
  
  derux
  derux-qa
  1.0.0-SNAPSHOT
  war
  Derux QA Testing
  WAR project for derux-qa
  
   
C:\Dev\workspace\derux-master\derux-qa\src\test\java
src/main/scripts
   
C:\Dev\workspace\derux-master\derux-qa\src\test\java
   
C:\Dev\workspace\derux-master\derux-qa\target\classes
   
C:\Dev\workspace\derux-master\derux-qa\target\test-classes
install

  
true
resource-0
   
C:\Dev\workspace\derux-master\derux-qa\src\main\resources
  


  
true
resource-1
   
C:\Dev\workspace\derux-master\derux-qa\src\test\resources
  

C:\Dev\workspace\derux-master\derux-qa\target
derux-web-1.0.0-SNAPSHOT

  

  maven-antrun-plugin
  1.3


  maven-assembly-plugin
  2.2-beta-2


  maven-clean-plugin
  2.2


  maven-compiler-plugin
  2.0.2


  maven-dependency-plugin
  2.0


  maven-deploy-plugin
  2.4


  maven-ear-plugin
  2.3.1


  maven-ejb-plugin
  2.1


  maven-install-plugin
  2.2


  maven-jar-plugin
  2.2


  maven-javadoc-plugin
  2.5


  maven-plugin-plugin
  2.4.3


  maven-rar-plugin
  2.2


  maven-release-plugin
  2.0-beta-8


  maven-resources-plugin
  2.3


  maven-site-plugin
  2.0-beta-7


  maven-source-plugin
  2.0.4


  maven-surefire-plugin
  2.4.3


  maven-war-plugin
  2.1-alpha-2

  


  
maven-compiler-plugin
2.0.2

  1.5
  1.5

  
  
maven-surefire-plugin
2.4.3

  true
  false
  

  cactus.contextURL
  http://localhost:8080/derux

  
  -Xms512m -Xmx1024m -XX:MaxPermSize=128m

  
  
maven-ejb-plugin
2.1

  true
  3.0
  
**/editor/*.class
**/*Bean*.class
**/*MDB*.class
**/*Job.class
**/package.html
**/*.xml
**/*.xhtml
**/*.properties
  

  
  
org.codehaus.mojo
dashboard-maven-plugin
1.0.0-beta-1

  
hsqldb
hsqldb
1.8.0
compile
  


  org.hibernate.dialect.HSQLDialect
  org.hsqldb.jdbcDriver
 
jdbc:hsqldb:c:/dashboard-db/dashboardDB;create=true
  dashboard
  dashboard

  
  
maven-dependency-plugin
2.0

  
unpack-ear
package

  unpack

  


  

  derux
  derux-app
  1.0.0-SNAPSHOT
  ear
 
C:\Dev\workspace\derux-master\derux-qa\target/ear

  

  
  
maven-antrun-plugin
1.3

  
install

  run

  


  
ant-contrib
ant-contrib
1.0b3
compile
  
  
org.apache.ant
ant
1.7.1
compile
  

false

  

  

   

Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close

2009-11-11 Thread Haroon Rafique

Hi there,

Sorry for breaking the threading in your email reader, but I just found 
the fix for the above subject and alas I don't have the original thread to 
reply to.


In any case, you may look at the thread discussion at nabble:
http://old.nabble.com/maven-ant-run-plugin-1.3-error-java.lang.NoSuchMethodError:-org.apache.tools.ant.util.FileUtils.close-td25806467.html

The root cause is that the OP (Doug Daniels) is using, ant-contrib in 
maven-antrun-plugin. The fix is to add an exclusion for ant:ant in the 
dependency for ant-contrib, as by default it uses ant-1.5. E.g., use:



ant-contrib
ant-contrib
${ant-contrib.ver}


ant
ant




This way, whatever dependency is specified by maven-antrun-plugin will be 
kick in.


Hope it helps someone.

Cheers,
--
Haroon Rafique



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-ant-run plugin fails due to missing class

2012-06-05 Thread Wayne Fay
> oal org.apache.maven.plugins:maven-antrun-plugin:1.5:run failed:
> Unable to load the mojo 'run' in the plugin
> 'org.apache.maven.plugins:mav
> -antrun-plugin:1.5'. A required class is missing:
> org/apache/tools/ant/BuildException

Are you sure the ant-nodeps jar file is not corrupt? Check to be sure
it is a proper jar etc.

Wayne

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org