2010-09-07 45 views

回答

3

这应该可以通过将src/main/javasrc/main/resources声明为Maven War Plugin配置中的其他Web资源目录来实现。由Adding and Filtering External Web Resources例子启发:

... 
    <configuration> 
     <webResources> 
     <resource> 
      ... 
     </resource> 
     <resource> 
      <directory>src/main/java</directory> 
      <!-- override the destination directory for this resource --> 
      <targetPath>WEB-INF/src</targetPath> 
     </resource> 
     <resource> 
      <directory>src/main/resources</directory> 
      <!-- override the destination directory for this resource --> 
      <targetPath>WEB-INF/src</targetPath> 
     </resource> 
     </webResources> 
    </configuration> 
    ... 
+0

非常感谢,我会尝试:-) – sourcerebels 2010-09-07 08:34:24

+0

@SourceRebels不客气。 – 2010-09-07 08:48:18

+1

它工作。再次感谢。 – sourcerebels 2010-09-07 10:09:02