Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-246

Poor Formatting # chains

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • 2.0-alpha-4
    • None
    • Creator
    • None
    • GNU/Linux, Maven 2.1.0

    Description

      All resources are formatted using Velocity. This is about right (even if the parameter <resource format="true/false"> would be good). The problem occurs when I set the sources of the "#" character.

      In Velocity user guide - Escaping says that it is possible to use "#". But after run "mvn archetype:create" still getting:

      [DEBUG] ********************* Debug info for resources created from generated Model ***********************                                                               
      [DEBUG] Was build element found in generated POM?: true                                                                                                                   
      [INFO] ********************* End of debug info from resources from generated POM ***********************                                                                  
      [ERROR] ResourceManager.getResource() parse exception: org.apache.velocity.exception.ParseErrorException: 
      Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 101, column 0.  Encountered: <EOF> after : ""                                                                                                      
      [INFO] ------------------------------------------------------------------------                                                                                           
      [ERROR] BUILD ERROR                                                                                                                                                       
      [INFO] ------------------------------------------------------------------------                                                                                           
      [INFO] Error creating from archetype                                                                                                                                      
      
      Embedded error: Error merging velocity templates
      Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 101, column 0.  Encountered: <EOF> after : ""
      [INFO] ------------------------------------------------------------------------                                                     
      [DEBUG] Trace                                                                                                                       
      org.apache.maven.lifecycle.LifecycleExecutionException: Error creating from archetype                                               
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)                      
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)             
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)                       
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)      
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)               
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)                           
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)                                                           
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)                                                             
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)                                                                    
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                              
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)                                            
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)                                    
              at java.lang.reflect.Method.invoke(Method.java:597)                                                                         
              at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)                                                      
              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)                                                              
              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)                                                    
              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)                                                                
      Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating from archetype                                            
              at org.apache.maven.archetype.mojos.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:253)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
              ... 16 more
      Caused by: org.apache.maven.archetype.old.ArchetypeTemplateProcessingException: Error merging velocity templates
              at org.apache.maven.archetype.old.DefaultOldArchetype.processTemplate(DefaultOldArchetype.java:905)
              at org.apache.maven.archetype.old.DefaultOldArchetype.processTemplate(DefaultOldArchetype.java:742)
              at org.apache.maven.archetype.old.DefaultOldArchetype.processResources(DefaultOldArchetype.java:798)
              at org.apache.maven.archetype.old.DefaultOldArchetype.processTemplates(DefaultOldArchetype.java:695)
              at org.apache.maven.archetype.old.DefaultOldArchetype.createArchetype(DefaultOldArchetype.java:331)
              at org.apache.maven.archetype.mojos.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:230)
              ... 18 more
      Caused by: org.apache.velocity.exception.ParseErrorException: Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: 
      Lexical error at line 101, column 0.  Encountered: <EOF> after : ""
              at org.apache.velocity.Template.process(Template.java:141)
              at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:423)
              at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:341)
              at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:831)
              at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:440)
              at org.apache.maven.archetype.old.DefaultOldArchetype.processTemplate(DefaultOldArchetype.java:899)
              ... 23 more
      [INFO] ------------------------------------------------------------------------
      

      It is curious that in the class javadoc (/** @see XY#get() */ everything works. The problem is resources (see attached file).

      Could you please fix this problem? I need the "#" for comments.

      Attachments

        1. wrapper.conf
          0.0 kB

        Activity

          People

            Unassigned Unassigned
            libor Libor Tvrdik
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: