maven site plugin not deploying subprojects in a multimodule project or generating indexhtml
I have a multimodule project that I want to deploy a site for, but it seems like my site deployment distributionManagement configuration is not being inherited by subproject child modules. parent - moduleA - moduleB They are located relative to each other /parent/ /moduleA/ /moduleB/ When I run: mvn site-deploy -P documentation My parent project is deployed properly to: scp://devServer/documentation/webwars/ But none of the subprojects like moduleA or module is deployed there as I'd expect if child modules inherit parent distributionManagement: scp://devServer/documentation/webwars/moduleA scp://devServer/documentation/webwars/moduleB Here's my parent pom.xml, I removed some extraneous details and report plugins (I included my javadoc plugin which is a bit funky using APIViz and aggregate to ensure aggregate parent javadocs and child javadocs use APIViz properly.): 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/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.webwars/groupId artifactId parent/artifactId packagingpom/packaging version1.0-SNAPSHOT/version nameparent/name distributionManagement site idwebwarsDev.website/id urlscp://devServer/documentation/webwars//url /site /distributionManagement modules module../moduleA-common/module module../moduleB/module /modules profiles profile iddocumentation/id build pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-pmd-plugin/artifactId executions execution idverify_pmd/id phaseverify/phase goals goalpmd/goal /goals configuration linkXreftrue/linkXref minimumTokens20/minimumTokens targetJdk1.6/targetJdk /configuration /execution /executions /plugin /plugins /pluginManagement /build reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId version2.1.2/version reportSets reportSet reports reportproject-team/report reportcim/report reportscm/report /reports /reportSet /reportSets /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId version2.6.1/version configuration !-- Default configuration for all reports -- detectOfflineLinkstrue/detectOfflineLinks !-- detectLinkstrue/detectLinks -- detectJavaApiLinktrue/detectJavaApiLink linksourcetrue/linksource useStandardDocletOptionstrue/useStandardDocletOptions charsetUTF-8/charset encodingUTF-8/encoding docencodingUTF-8/docencoding breakiteratortrue/breakiterator versiontrue/version authortrue/author keywordstrue/keywords minmemory128m/minmemory maxmemory512m/maxmemory docletorg.jboss.apiviz.APIviz/doclet docletArtifact groupIdorg.jboss.apiviz/groupId artifactIdapiviz/artifactId version1.3.0.GA/version /docletArtifact additionalparam -charset UTF-8
RE: maven site plugin not deploying subprojects in a multimodule project or generating indexhtml
Sorry about that, you're correct, I had renamed some things in my pom.xml like my modules to make my example clearer and I forgot to rename that properly. I'm wondering if anyone knows of any issues with the site plugin and why my subproject modules would generate all the source files except for the index.html. I don't specify any src/site/ files like src/site/site.xml or src/site/apt/index.apt. -Original Message- From: Stevo Slavić [mailto:ssla...@gmail.com] Sent: Wednesday, November 11, 2009 4:30 PM To: Maven Users List Subject: Re: maven site plugin not deploying subprojects in a multimodule project or generating indexhtml Hello Doug, That modules section seems to be wrong, module../moduleA-common/module should probably be module../moduleA/module. Personally I prefer putting child module directories within parent - its natural, some plugins and tools used to have problems with relative paths, and you don't have to set relativePath in child modules. In maven-project-info-reports-plugin consider adding index report to the list. One more tip, specify site plugin version in pluginManagement for build to be reproducible - now it's not clear which version of the plugin you're using, it's determined by maven version which is also not known. Regards, Stevo. On Wed, Nov 11, 2009 at 10:07 PM, Doug Daniels ddani...@webwars.com wrote: I have a multimodule project that I want to deploy a site for, but it seems like my site deployment distributionManagement configuration is not being inherited by subproject child modules. parent - moduleA - moduleB They are located relative to each other /parent/ /moduleA/ /moduleB/ When I run: mvn site-deploy -P documentation My parent project is deployed properly to: scp://devServer/documentation/webwars/ But none of the subprojects like moduleA or module is deployed there as I'd expect if child modules inherit parent distributionManagement: scp://devServer/documentation/webwars/moduleA scp://devServer/documentation/webwars/moduleB Here's my parent pom.xml, I removed some extraneous details and report plugins (I included my javadoc plugin which is a bit funky using APIViz and aggregate to ensure aggregate parent javadocs and child javadocs use APIViz properly.): 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/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.webwars/groupId artifactId parent/artifactId packagingpom/packaging version1.0-SNAPSHOT/version nameparent/name distributionManagement site idwebwarsDev.website/id urlscp://devServer/documentation/webwars//url /site /distributionManagement modules module../moduleA-common/module module../moduleB/module /modules profiles profile iddocumentation/id build pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-pmd-plugin/artifactId executions execution idverify_pmd/id phaseverify/phase goals goalpmd/goal /goals configuration linkXreftrue/linkXref minimumTokens20/minimumTokens targetJdk1.6/targetJdk /configuration /execution /executions /plugin /plugins /pluginManagement /build reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId version2.1.2/version reportSets reportSet reports reportproject-team/report reportcim/report reportscm/report /reports /reportSet /reportSets /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId version2.6.1/version configuration !-- Default configuration for all reports
RE: maven site plugin not deploying subprojects in a multimodule project or generating indexhtml
If I define a src/site/site.xml, and src/site/apt/index.apt in my parent and child projects, it will generate an index.html for all child subproject modules. I did have to do the workaround of defining a distributionManagement for each subproject module, but that's not that bad. -Original Message- From: Doug Daniels [mailto:ddani...@webwars.com] Sent: Wednesday, November 11, 2009 4:48 PM To: Maven Users List Subject: RE: maven site plugin not deploying subprojects in a multimodule project or generating indexhtml Sorry about that, you're correct, I had renamed some things in my pom.xml like my modules to make my example clearer and I forgot to rename that properly. I'm wondering if anyone knows of any issues with the site plugin and why my subproject modules would generate all the source files except for the index.html. I don't specify any src/site/ files like src/site/site.xml or src/site/apt/index.apt. -Original Message- From: Stevo Slavić [mailto:ssla...@gmail.com] Sent: Wednesday, November 11, 2009 4:30 PM To: Maven Users List Subject: Re: maven site plugin not deploying subprojects in a multimodule project or generating indexhtml Hello Doug, That modules section seems to be wrong, module../moduleA-common/module should probably be module../moduleA/module. Personally I prefer putting child module directories within parent - its natural, some plugins and tools used to have problems with relative paths, and you don't have to set relativePath in child modules. In maven-project-info-reports-plugin consider adding index report to the list. One more tip, specify site plugin version in pluginManagement for build to be reproducible - now it's not clear which version of the plugin you're using, it's determined by maven version which is also not known. Regards, Stevo. On Wed, Nov 11, 2009 at 10:07 PM, Doug Daniels ddani...@webwars.com wrote: I have a multimodule project that I want to deploy a site for, but it seems like my site deployment distributionManagement configuration is not being inherited by subproject child modules. parent - moduleA - moduleB They are located relative to each other /parent/ /moduleA/ /moduleB/ When I run: mvn site-deploy -P documentation My parent project is deployed properly to: scp://devServer/documentation/webwars/ But none of the subprojects like moduleA or module is deployed there as I'd expect if child modules inherit parent distributionManagement: scp://devServer/documentation/webwars/moduleA scp://devServer/documentation/webwars/moduleB Here's my parent pom.xml, I removed some extraneous details and report plugins (I included my javadoc plugin which is a bit funky using APIViz and aggregate to ensure aggregate parent javadocs and child javadocs use APIViz properly.): 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/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.webwars/groupId artifactId parent/artifactId packagingpom/packaging version1.0-SNAPSHOT/version nameparent/name distributionManagement site idwebwarsDev.website/id urlscp://devServer/documentation/webwars//url /site /distributionManagement modules module../moduleA-common/module module../moduleB/module /modules profiles profile iddocumentation/id build pluginManagement plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-pmd-plugin/artifactId executions execution idverify_pmd/id phaseverify/phase goals goalpmd/goal /goals configuration linkXreftrue/linkXref minimumTokens20/minimumTokens targetJdk1.6/targetJdk /configuration /execution /executions /plugin /plugins /pluginManagement /build reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId version2.1.2/version reportSets reportSet reports reportproject-team/report
maven-ant-run plugin 1.3 error java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close
: or g.apache.tools.ant.util.FileUtils.close(Ljava/io/InputStream;)V at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: org.apache.maven.plugins:maven-antrun-plugin. Reason: java.lang.NoSuchMethod Error: org.apache.tools.ant.util.FileUtils.close(Ljava/io/InputStream;)V at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1412) at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:724) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.close(Ljava/io/InputStream;)V at org.apache.tools.ant.ComponentHelper.getDefaultDefinitions(ComponentHelper.java:737) at org.apache.tools.ant.ComponentHelper.initTasks(ComponentHelper.java:681) at org.apache.tools.ant.ComponentHelper.initDefaultDefinitions(ComponentHelper.java:270) at org.apache.maven.plugin.antrun.components.AntTargetConverter.initDefinitions(AntTargetConverter.java:189) at org.apache.maven.plugin.antrun.components.AntTargetConverter.processConfiguration(AntTargetConverter.java:109) at org.apache.maven.plugin.antrun.components.AntTargetConverter.fromConfiguration(AntTargetConverter.java:83) at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247) at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137) at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56) at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1357) ... 20 more [INFO] [INFO] Total time: 1 minute 4 seconds [INFO] Finished at: Thu Oct 08 10:38:44 CDT 2009 [INFO] Final Memory: 110M/263M - Doug Daniels - 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
, 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
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