Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close
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: dependency groupIdant-contrib/groupId artifactIdant-contrib/artifactId version${ant-contrib.ver}/version exclusions exclusion groupIdant/groupId artifactIdant/artifactId /exclusion /exclusions /dependency This way, whatever dependency is specified by maven-antrun-plugin will be kick in. Hope it helps someone. Cheers, -- Haroon Rafique haroon.rafi...@utoronto.ca - 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
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-qamvn 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: ?xml version=1.0 encoding=UTF-8? !-- == -- !-- -- !-- Generated by Maven Help Plugin on 11/1/09 10:23 PM -- !-- See: http://maven.apache.org/plugins/maven-help-plugin/ -- !-- -- !-- == -- !-- == -- !-- -- !-- Effective POM for project 'derux:derux-qa:war:1.0.0-SNAPSHOT' -- !-- -- !-- == -- project xmlns=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 modelVersion4.0.0/modelVersion parent artifactIdderux-master/artifactId groupIdderux/groupId version1.0.0-SNAPSHOT/version /parent groupIdderux/groupId artifactIdderux-qa/artifactId version1.0.0-SNAPSHOT/version packagingwar/packaging nameDerux QA Testing/name descriptionWAR project for derux-qa/description build sourceDirectoryC:\Dev\workspace\derux-master\derux-qa\src\test\java/sourceDirectory scriptSourceDirectorysrc/main/scripts/scriptSourceDirectory testSourceDirectoryC:\Dev\workspace\derux-master\derux-qa\src\test\java/testSourceDirectory outputDirectoryC:\Dev\workspace\derux-master\derux-qa\target\classes/outputDirectory testOutputDirectoryC:\Dev\workspace\derux-master\derux-qa\target\test-classes/testOutputDirectory defaultGoalinstall/defaultGoal resources resource filteringtrue/filtering mergeIdresource-0/mergeId directoryC:\Dev\workspace\derux-master\derux-qa\src\main\resources/directory /resource /resources testResources testResource filteringtrue/filtering mergeIdresource-1/mergeId directoryC:\Dev\workspace\derux-master\derux-qa\src\test\resources/directory /testResource /testResources directoryC:\Dev\workspace\derux-master\derux-qa\target/directory finalNamederux-web-1.0.0-SNAPSHOT/finalName pluginManagement plugins plugin artifactIdmaven-antrun-plugin/artifactId version1.3/version /plugin plugin artifactIdmaven-assembly-plugin/artifactId version2.2-beta-2/version /plugin plugin artifactIdmaven-clean-plugin/artifactId version2.2/version /plugin plugin artifactIdmaven-compiler-plugin/artifactId version2.0.2/version /plugin plugin artifactIdmaven-dependency-plugin/artifactId version2.0/version /plugin plugin artifactIdmaven-deploy-plugin/artifactId version2.4/version /plugin plugin artifactIdmaven-ear-plugin/artifactId version2.3.1/version /plugin plugin artifactIdmaven-ejb-plugin/artifactId version2.1/version /plugin plugin artifactIdmaven-install-plugin/artifactId version2.2/version /plugin plugin artifactIdmaven-jar-plugin/artifactId version2.2/version /plugin plugin artifactIdmaven-javadoc-plugin/artifactId version2.5/version /plugin plugin artifactIdmaven-plugin-plugin/artifactId version2.4.3/version /plugin plugin artifactIdmaven-rar-plugin/artifactId version2.2/version /plugin plugin artifactIdmaven-release-plugin/artifactId version2.0-beta-8/version /plugin plugin artifactIdmaven-resources-plugin/artifactId version2.3/version /plugin
RE: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close
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
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. build plugins plugin groupIdorg.apache.maven.plugins /groupId artifactIdmaven-antrun-plugin/artifactId executions execution phaseinstall/phase goals goalrun/goal /goals /execution /executions configuration 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]
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
Re: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close
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.: plugin artifactIdmaven-antrun-plugin/artifactId ... dependencies dependency groupIdant/groupId artifactIdant-nodeps/artifactId version1.6.5/version /dependency /dependencies /plugin LieGrue, strub --- On Thu, 10/8/09, Jörg Schaible joerg.schai...@gmx.de wrote: From: Jörg Schaible joerg.schai...@gmx.de 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
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
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): profile idliquibase-diff/id build plugins plugin groupIdorg.apache.maven.plugins /groupId artifactIdmaven-antrun-plugin/artifactId executions execution phaseinstall/phase goals goalrun/goal /goals /execution /executions configuration tasks echoPERFORMING LIQUIBASE FUNCTIONS/echo 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 / property name=project_classpath value=${project.build.directory}/classes / property name=liquibaseDir value=${basedir}/src/main/resources/changelogs/mysql/complete / property name=changeLogFile value=${liquibaseDir}/liquibase.changelog.xml / property name=outputFile value=${liquibaseDir}/liquibase-update.sql / ant antfile=liquibase-build.xml target name=diffDatabaseToChangeLog / /ant /tasks /configuration dependencies dependency groupIdorg.liquibase/groupId artifactIdliquibase-core/artifactId version1.9.3/version /dependency dependency groupIdmysql/groupId artifactIdmysql-connector-java /artifactId version5.1.6/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.2.6.ga/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate-annotations /artifactId version3.4.0.GA/version /dependency dependency groupIdorg.slf4j/groupId artifactIdslf4j-jdk14/artifactId version1.5.6/version /dependency dependency groupIdapache-log4j/groupId artifactIdlog4j/artifactId version1.2.14/version /dependency dependency groupIdant-contrib/groupId artifactIdant-contrib/artifactId version1.0b3/version /dependency /dependencies /plugin -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
RE: maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close
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): profile idliquibase-diff/id build plugins plugin groupIdorg.apache.maven.plugins /groupId artifactIdmaven-antrun-plugin/artifactId executions execution phaseinstall/phase goals goalrun/goal /goals /execution /executions configuration tasks echoPERFORMING LIQUIBASE FUNCTIONS/echo 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 / property name=project_classpath value=${project.build.directory}/classes / property name=liquibaseDir value=${basedir}/src/main/resources/changelogs/mysql/complete / property name=changeLogFile value=${liquibaseDir}/liquibase.changelog.xml / property name=outputFile value=${liquibaseDir}/liquibase-update.sql / ant antfile=liquibase-build.xml target name=diffDatabaseToChangeLog / /ant /tasks /configuration dependencies dependency groupIdorg.liquibase/groupId artifactIdliquibase-core/artifactId version1.9.3/version /dependency dependency groupIdmysql/groupId artifactIdmysql-connector-java /artifactId version5.1.6/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.2.6.ga/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate-annotations /artifactId version3.4.0.GA/version /dependency dependency groupIdorg.slf4j/groupId artifactIdslf4j-jdk14/artifactId