Try adding this to your maven.xml:

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

You'll need this:

  xmlns:maven="jelly:maven"

in your <project> element.

  Jeff

On Tue, 17 Aug 2004, at 19:38:51 [GMT -0400] Karan-Sahni (Contractor)
wrote:

> I just tried that.. here is the output.  Any other ideas?

> -------------------------------
> java:compile:
>     [echo] Compiling to c:/mavenworkspace/builds/ODBase/classes

> BUILD FAILED
> File...... C:\.maven\cache\maven-java-plugin-1.4\plugin.jelly
> Element... ant:javac
> Line...... 52
> Column.... 48
> srcdir attribute must be set!
> -----------------------------------



> I am declaring my sources as follows:
> -----------------------------------
>   <build>
>                   <sourceDirectory>
>                 ${maven.src.dir}
>           </sourceDirectory>
>           <resources/>  
>   </build>
> --------------------------------------


> also in the project properties:
> -------------------------------------------------
> maven.src.dir=${maven.scm.checkout.dir}/${maven.scm.cvs.module}/src
> ------------------------------------------------


> -----Original Message-----
> From: Jefferson K. French [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 17, 2004 7:29 PM
> To: Maven Users List
> Subject: Re: sourcesPresent


> Did you try setting it this way:

>   <j:set var="sourcesPresent" value="true" scope="parent"/>

> I'm not able to try this at the moment, so I can't verify it will
> work.

>   Jeff

> On Tue, 17 Aug 2004, at 17:23:08 [GMT -0400] Karan-Sahni (Contractor)
> wrote:

>> I create a source directory dynamically in maven.xml and checkout files from cvs 
>> into that folder. I call scm:checkout-project before java:compile, but the java 
>> plugin thinks I have no sources
>> present. I tried setting the sourcesPresent property to true before java:compile 
>> but the plugin throws an exception. The process works fine as long as the source 
>> directory was there before I call
>> maven.

>> Anyone have ideas how I can get maven to recognise my source directory if it is 
>> created in maven.xml?



-- 
mailto:[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to