You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Karan-Sahni (Contractor)" <KS...@OfficeDepot.com> on 2004/09/13 18:12:48 UTC

duplicate class error

I used the following code to get maven to recognise my source files because the files are being checked out from cvs during the build process and maven doesnt recognise source folders unless they exist when the build starts.

		<path id="my.path" location="${maven.src.dir}" />
		<m:addPath id="maven.compile.src.set" refid="my.path" />
		<j:set var="sourcesPresent" value="true" />


The problem now is that if the folder does exist, the java:compile goal throws a duplicate class error. There are 6 java files in maven.src.dir but maven tries to compile 12 files. Where is it getting these extra files from?

Any ideas?





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


Re: duplicate class error

Posted by "Jefferson K. French" <je...@frenches.org>.
Check if maven.src.dir is in maven.compile.src.set twice:

  <ant:property name="cp" refid="maven.compile.src.set"/>
  <ant:echo>cp=${cp}</ant:echo>

You may want to try checking out your files into another directory
besides src.

  Jeff

On Mon, 13 Sep 2004, at 12:12:48 [GMT -0400] Karan-Sahni (Contractor)
wrote:

> I used the following code to get maven to recognise my source files because the files are being checked out from cvs during the build process and maven doesnt recognise source folders unless they
> exist when the build starts.

>                 <path id="my.path" location="${maven.src.dir}" />
>                 <m:addPath id="maven.compile.src.set" refid="my.path" />
>                 <j:set var="sourcesPresent" value="true" />


> The problem now is that if the folder does exist, the java:compile goal throws a duplicate class error. There are 6 java files in maven.src.dir but maven tries to compile 12 files. Where is it
> getting these extra files from?

> Any ideas?

-- 
mailto:jeff@frenches.org



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