2013-11-22 2 views
0

Я пытаюсь построить многомодульный архетип с Maven для проекта. Когда я включаю мои JSP, я получаю исключение от Velocity.Здание и архетип в Maven, Velocity ParseErrorException с JSP's

[INFO] Parent element not overwritten in /home/gortiz/workspaces/archetype/miPrueba/miPrueba-new-aw/pom.xml 
[ERROR] Parser Exception: archetype-resources/__rootArtifactId__-new-aw/src/main/webapp/WEB-INF/jsp/open/login.jsp 
[ERROR] org.apache.velocity.runtime.parser.ParseException: Encountered " eq 1}\">\n 

Я нашел этот URL-адрес, но он не работает для меня. http://yajdb.wordpress.com/2012/08/28/maven-archetype-creation-conflicts-between-jsp-and-velocity-templates/

Мой конфигурационный файл:

<modules> 
     <module id="${implantation}-new-aw" dir="__rootArtifactId__-new-aw" 
      name="${implantation}-new-aw"> 
      <fileSets> 
       <fileSet filtered="true" encoding="UTF-8"> 
        <directory>src/main/java</directory> 
        <includes> 
         <include>**/*.java</include> 
        </includes> 
       </fileSet> 
       <fileSet filtered="true" encoding="UTF-8"> 
        <directory>src/test/java</directory> 
        <includes> 
         <include>**/*.java</include> 
        </includes>     
       </fileSet> 
       <!-- <fileSet filtered=”true” packaged=”false”> 
       <directory>src/main/webapp</directory> 
        <excludes> 
         <exclude>**/**/*.jsp</exclude> 
         <exclude>**/*.xml</exclude> 
        </excludes> 
       </fileSet>-->     
       <fileSet filtered="true" encoding="UTF-8"> 
        <directory>src/main/webapp</directory> 
        <includes> 
         <include>**/*.xml</include> 
        </includes> 
       </fileSet> 
       <fileSet filtered="true" packaged="false" encoding="UTF-8"> 
        <directory>src/main/webapp</directory> 
        <includes> 
         <include>**/*.jsp</include> 
        </includes> 
       </fileSet>               
       <fileSet filtered="true" encoding="UTF-8"> 
        <directory>src/main/resources/</directory> 
        <includes> 
         <include>**/**/*.*</include> 
        </includes>     
       </fileSet> 
      </fileSets> 
     </module>  
    </modules> 

ответ

1

удалить или сделать отфильтрованный атрибут ложна в конфигурации Jsp, а также в ресурсах.

отфильтрован = true, файлы могут быть отфильтрованы, что означает, что выбранные файлы будут использоваться в качестве шаблонов Velocity.

filtere = false, Они могут быть нефильтрованными, что означает, что выбранные файлы будут скопированы без изменений.
Значение по умолчанию: false.

<fileSet packaged="false" encoding="UTF-8"> 
    <directory>src/main/webapp</directory> 
    <includes> 
     <include>**/*.jsp</include> 
    </includes> 
</fileSet> 
Смежные вопросы