Had a similar issue to use code generated with Axis... I created a
postGoal in maven.xml:

   <postGoal name="eclipse:generate-classpath">
                <attainGoal name="generateAxis"/>
                <attainGoal name="addAxisPath"/>
        </postGoal>
        
        <goal name="addAxisPath">
                <j:file name="${basedir}/.classpathNew">
                        <classpath>
                                <jxml:parse var="theDoc" 
xml="file://${basedir}/.classpath"/>
                                <jxml:forEach var="entry"
select="$theDoc/classpath/classpathentry">
                                        <jxml:copyOf select="$entry"/>
                                </jxml:forEach>
                                <jxml:element name="classpathentry">
                                        <jxml:attribute 
name="kind">src</jxml:attribute>
                                        <jxml:attribute 
name="exclude"></jxml:attribute>
                                        <jxml:attribute 
name="path">target/axis/src</jxml:attribute>
                                </jxml:element>
                        </classpath>
                </j:file>
                <delete file="${basedir}/.classpath"/>
                <move file="${basedir}/.classpathNew"
toFile="${basedir}/.classpath"/>
   </goal>
   

Enjoy!

Steve

On Thu, 2005-10-02 at 18:02 -0500, Joseph M. Ferner wrote:

> I'm having a similar problem with JavaCC.  I found the same entry in the FAQ
> about adding additional source directories but, the eclipse plug-in doesn't
> add the second source directory to the project. Are there any solutions to
> this problem? Could the eclipse plug-in possibly run a java:compile and
> extract the source directories from there?
>  
> -----Original Message-----
> From: Mark D. Hansen [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, February 10, 2005 4:57 PM
> To: Maven Users List
> Subject: RE: multiple src directories ?
> 
> oops, sorry to bug you good people.  i just found this in the FAQ:
> http://maven.apache.org/faq.html#multiple-source-directories
> 
> > -----Original Message-----
> > From: Mark D. Hansen [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, February 10, 2005 4:55 PM
> > To: Maven User (E-mail)
> > Subject: multiple src directories ?
> > 
> > 
> > another newbie question:
> > 
> > I would like to compile from 2 src directories, like this (in 
> > my project.xml)
> > 
> >   <build>
> >     <sourceDirectory>src/java</sourceDirectory>
> >     <sourceDirectory>target/work/java</sourceDirectory>
> >   ...
> >   </build>
> > 
> > It doesn't seem to work that way.  The idea here is that I am 
> > using a tool (JAXB XJC) to generate some source from an XSD - 
> > and I don't want to copy that into the regular src directory 
> > (that is a no, no since you can screw up your src if you are 
> > sloppy).  With Ant, I can specify multiple src directories.  
> > How is this done in maven?
> > 
> > Thanks!
> > 
> > -- Mark
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to