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

Lexical Error when archetype-resource contains excel file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.2.1
    • waiting-for-feedback
    • Archetypes
    • None

    Description

      I have created an archetype where my archetype-resources under src/main/resources contains an template excel that will get copied when a project will be created out of it. While executing the archetype:generate on this, it throws lexical error while creating the excel file.

       

      Exception Trace:

      [ERROR] ResourceManager.getResource() parse exception
      org.apache.velocity.exception.ParseErrorException: Lexical error,   Encountered: "\ufffd" (65533), after : "" at archetype-resources/src/test/resources/XYZZ.xlsx[line 50, column 138]
          at org.apache.velocity.Template.process (Template.java:151)
          at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource (ResourceManagerImpl.java:437)
          at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource (ResourceManagerImpl.java:352)
          at org.apache.velocity.runtime.RuntimeInstance.getTemplate (RuntimeInstance.java:1533)
          at org.apache.velocity.app.VelocityEngine.mergeTemplate (VelocityEngine.java:343)
          at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processTemplate (DefaultFilesetArchetypeGenerator.java:715)
          at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processFileSet (DefaultFilesetArchetypeGenerator.java:513)
          at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processTemplates (DefaultFilesetArchetypeGenerator.java:758)
          at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processArchetypeTemplates (DefaultFilesetArchetypeGenerator.java:487)
          at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processFilesetProject (DefaultFilesetArchetypeGenerator.java:605)
          at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.processFilesetModule (DefaultFilesetArchetypeGenerator.java:538)
          at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype (DefaultFilesetArchetypeGenerator.java:206)
          at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype (DefaultArchetypeGenerator.java:133)
          at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype (DefaultArchetypeGenerator.java:104)
          at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype (DefaultArchetypeGenerator.java:148)
          at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype (DefaultArchetypeGenerator.java:163)
          at org.apache.maven.archetype.DefaultArchetypeManager.generateProjectFromArchetype (DefaultArchetypeManager.java:75)
          at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute (CreateProjectFromArchetypeMojo.java:211)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

      Attachments

        Activity

          People

            Unassigned Unassigned
            gitissuepost Deepak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: