[ http://jira.codehaus.org/browse/MOJO-143?page=comments#action_58486 ]
Christoph Schönfeld commented on MOJO-143: ------------------------------------------ I agree. Setting the output path as you recommend was also my solution. However, following the pattern "throw an Exception if a method cannot perform its intended job", I would raise an Exception if ProjectHelper.addResource() is called in a phase when it has no effect? This would point plug-in developers right to the source of their mistake. > [Java2WSDLMojo] Resources generated in process-classes missing in artifact > -------------------------------------------------------------------------- > > Key: MOJO-143 > URL: http://jira.codehaus.org/browse/MOJO-143 > Project: Mojo > Type: Bug > Components: sandbox > Reporter: Christoph Schönfeld > > > The following code does not work: > projectHelper.addResource( project, outputDirectory.getAbsolutePath(), > Collections.singletonList("**/*.wsdl"), Collections.EMPTY_LIST); > It is located at the end of Java2WSDLMojo.execute() of the > axistool-maven-plugin which uses Axis to create WSDL files. It is intended > that the generated WSDL files get included in the build artifact but they > don't end up there. > The plug-in is run in the process-classes phase because Java2WSDL depends on > the compiled class files. > The reason for the missing resource files is that adding resources in this > phase has no effect -- obviously because the resources plug-in is run in an > ealier phase. > Brett Porter confirmed this in his response to my e-mail "Adding resources in > the process-classes phase of a Project", Thu, 24 Nov 2005 15:01:37 +0100 on > maven-users. -- 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