maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Libor Tvrdík (JIRA) <j...@codehaus.org>
Subject [jira] Created: (ARCHETYPE-246) Poor Formatting # chains
Date Thu, 11 Jun 2009 19:21:42 GMT
Poor Formatting # chains
------------------------

                 Key: ARCHETYPE-246
                 URL: http://jira.codehaus.org/browse/ARCHETYPE-246
             Project: Maven Archetype
          Issue Type: Bug
          Components: Creator
    Affects Versions: 2.0-alpha-4
         Environment: GNU/Linux, Maven 2.1.0
            Reporter: Libor Tvrdík
         Attachments: wrapper.conf

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|http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#escaping_vtl_directives]
says that it is possible to use *"\#"*. But after run "mvn archetype:create" still getting:

{code}
[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] ------------------------------------------------------------------------
{code}
	
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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message