I believe you would be better suited with m2eclipse

also if src/main/java is supposed to be filtered before compiling that is a bad plan. I'd put your source that will be filtered in src/ filtered/java to flag that it is filtered

Sent from my [rhymes with tryPod] ;-)

On 17 Mar 2010, at 11:47, syllepsa <[email protected]> wrote:


Hi,

In my project I want to have separate src folders for maven an Eclipse.
Eclipse project settings is generated by typing:
mvn eclipse:clean eclipse:eclipse

Why? Because after editing code in Eclipse I invoke maven to do resource filtering. Maven overwrites src code from src/main/java and puts src output files in target/filtered-sources/java. So the real src folder is actually in target/filtered-sources/java and that's what Eclipse takes. So the question is how to point out separate src folder for Eclipse: src/main/java which
won't be recognizable as a src folder for Maven  ?

Below i put my project configuration:

   <sourceDirectory>target/filtered-sources/java</sourceDirectory>
   <resources>
       <resource>
           <directory>src/main/java</directory>
           <filtering>true</filtering>
           <includes>
               <include>**/*.java</include>
           </includes>
           <targetPath>../filtered-sources/java</targetPath>
       </resource>
       <resource>
           <directory>src/main/resources</directory>
           <filtering>true</filtering>
       </resource>
   </resources>
   <plugins>
             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-eclipse-plugin</artifactId>
               <version>2.8</version>
               <configuration>
                   <path>src/main/java</path>
                     <sourceIncludes>
                       <sourceInclude>**/*.java</sourceInclude>
                     </sourceIncludes>
                     <downloadSources>true</downloadSources>
                     <downloadJavadocs>true</downloadJavadocs>
               </configuration>
            </plugin>
</plugins>

Thanks in advance

Mariusz





--
View this message in context: 
http://old.nabble.com/Two-distinct-src-folders-tp27930875p27930875.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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