You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Ward, Nathan" <nw...@merlin-intl.com> on 2012/03/12 21:19:05 UTC

Can Maven tell Eclipse/m2eclipse to include generated code in classpath?

I'm using the cxf-codegen-plugin to generate code from wsdl. The generated code goes into /target/generated/cxf. Is there a way to specify in the pom file that this code should be included in the Eclipse classpath? I need to reference this code from my code, but I don't want to put the generated code under version control and therefore don't want to move it to /src/main/java. However, if I leave it under /target/generated/cxf, then I have to configure my project in Eclipse to include /target/generated/cxf in the Eclipse classpath. This is no fun as I have to make this step part of the setup procedures that other developers have to do before they can start working with the code. Someone told me that this is not an issue when using NetBeans because the NetBeans/Maven component automatically includes the generated code in the classpath. Is there a better solution? Is there any articles on this topic that lays out the possible approaches and carefully weighs the pros and cons of each?

Thanks,

Nathan

Re: Can Maven tell Eclipse/m2eclipse to include generated code in classpath?

Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Mar 13, 2012 at 6:49 AM, Ward, Nathan <nw...@merlin-intl.com> wrote:
> I'm using the cxf-codegen-plugin to generate code from wsdl. The generated code goes into /target/generated/cxf. Is there a way to specify in the pom file that this code should be included in the Eclipse classpath? I need to reference this code from my code, but I don't want to put the generated code under version control and therefore don't want to move it to /src/main/java. However, if I leave it under /target/generated/cxf, then I have to configure my project in Eclipse to include /target/generated/cxf in the Eclipse classpath. This is no fun as I have to make this step part of the setup procedures that other developers have to do before they can start working with the code. Someone told me that this is not an issue when using NetBeans because the NetBeans/Maven component automatically includes the generated code in the classpath. Is there a better solution? Is there any articles on this topic that lays out the possible approaches and carefully weighs the pros and cons of each?

If this is a m2eclipse question, you should direct it to the m2e mailing list.
http://www.eclipse.org/m2e/

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