AppFuse
  1. AppFuse
  2. APF-970

mvn appfuse:full-source fails with Illegal characters in path

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.1.0-M2
    • Component/s: Tools - AMP
    • Labels:
      None

      Description

      This works great in version 2.0, but fails with an exception below, even when creating a fresh project:

      mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-spring -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.1 -DgroupId=net.tkz.league -DartifactId=league
      cd league
      mvn appfuse:full-source

      results in:
      [INFO] Scanning for projects...
      [INFO] Searching repository for plugin with prefix: 'appfuse'.
      [INFO] -------------------------------------------------------------------------

      [INFO] Building AppFuse Spring MVC Application
      [INFO] task-segment: [appfuse:full-source]
      [INFO] -------------------------------------------------------------------------

      [WARNING] POM for 'org.hibernate:jtidy:pom:r8-20060801:runtime' is invalid. It w
      ill be ignored for artifact resolution. Reason: Parse error reading POM. Reason:
      TEXT must be immediately followed by END_TAG and not START_TAG (position: START
      _TAG seen ...<licenses>\n\t\t\t<license>... @12:13) for project org.hibernate:j
      tidy at D:\Documents and Settings\paul\.m2\repository\org\hibernate\jtidy\r8-200
      60801\jtidy-r8-20060801.pom
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] null
      Illegal character in path at index 18: file:/D:/Documents and Settings/paul/.m2/
      repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.IllegalArgumentException
      at java.net.URI.create(URI.java:842)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
      at org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:11
      9)
      at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
      at org.apache.tools.ant.Project.setAntLib(Project.java:313)
      at org.apache.tools.ant.Project.initProperties(Project.java:309)
      at org.apache.tools.ant.Project.init(Project.java:295)
      at org.appfuse.mojo.installer.AntUtils.createProject(AntUtils.java:47)
      at org.appfuse.mojo.installer.InstallSourceMojo.<init>(InstallSourceMojo
      .java:51)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
      orAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
      onstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at java.lang.Class.newInstance0(Class.java:355)
      at java.lang.Class.newInstance(Class.java:308)
      at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newIn
      stance(JavaComponentFactory.java:44)
      at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(De
      faultPlexusContainer.java:1464)
      at org.codehaus.plexus.component.manager.AbstractComponentManager.create
      ComponentInstance(AbstractComponentManager.java:93)
      at org.codehaus.plexus.component.manager.PerLookupComponentManager.getCo
      mponent(PerLookupComponentManager.java:48)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
      ner.java:331)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
      ner.java:440)
      at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
      tPluginManager.java:562)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:421)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:539)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
      Goal(DefaultLifecycleExecutor.java:493)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:463)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:311)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:278)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:143)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.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: java.net.URISyntaxException: Illegal character in path at index 18: f
      ile:/D:/Documents and Settings/paul/.m2/repository/org/apache/ant/ant/1.7.0/ant-
      1.7.0.jar
      at java.net.URI$Parser.fail(URI.java:2809)
      at java.net.URI$Parser.checkChars(URI.java:2982)
      at java.net.URI$Parser.parseHierarchical(URI.java:3066)
      at java.net.URI$Parser.parse(URI.java:3014)
      at java.net.URI.<init>(URI.java:578)
      at java.net.URI.create(URI.java:840)
      ... 43 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2 seconds
      [INFO] Finished at: Sat Dec 01 18:18:33 PST 2007
      [INFO] Final Memory: 5M/11M
      [INFO] ------------------------------------------------------------------------

        Issue Links

          Activity

          Hide
          Matt Raible added a comment -

          This is caused by a bug in Ant 1.7. Please search the mailing list archives for suggested solutions.

          Show
          Matt Raible added a comment - This is caused by a bug in Ant 1.7. Please search the mailing list archives for suggested solutions.
          Hide
          Matt Raible added a comment -

          Changing your local repository to a location that does not contain spaces should fix this problem.

          http://markmail.org/message/x7ls5iu3lusfvrmg

          Show
          Matt Raible added a comment - Changing your local repository to a location that does not contain spaces should fix this problem. http://markmail.org/message/x7ls5iu3lusfvrmg
          Hide
          Matt Raible added a comment -

          If you modify settings.xml to contain a DOS-version of the path (with no spaces), it should fix this problem. How to configure settings.xml can be found at:

          http://maven.apache.org/settings.html

          Show
          Matt Raible added a comment - If you modify settings.xml to contain a DOS-version of the path (with no spaces), it should fix this problem. How to configure settings.xml can be found at: http://maven.apache.org/settings.html
          Hide
          Matt Raible added a comment -

          This does seem to be a major issues for Windows users. Unfortunately, there doesn't seem to be any sort of hack we can put into AMP that solves this problem. I guess we'll just have to wait for a new release of Ant.

          Show
          Matt Raible added a comment - This does seem to be a major issues for Windows users. Unfortunately, there doesn't seem to be any sort of hack we can put into AMP that solves this problem. I guess we'll just have to wait for a new release of Ant.
          Hide
          Renato Steiner added a comment -

          Thanks to the comments from Matt I could quickly implement a workaround for this problem:

          Workaround for Windows Users:

          1. Move the default maven repository from c:\documents and settings\<user>\.m2
          to c:\.m2

          2. Edit the maven settings.xml file:
          vi <mavenpath>\conf\settings.xml
          Activate the following directive: <localRepository>C:\.m2\repository</localRepository>

          3. mvn appfuse:full-source

          4. It works

          Show
          Renato Steiner added a comment - Thanks to the comments from Matt I could quickly implement a workaround for this problem: Workaround for Windows Users: 1. Move the default maven repository from c:\documents and settings\<user>\.m2 to c:\.m2 2. Edit the maven settings.xml file: vi <mavenpath>\conf\settings.xml Activate the following directive: <localRepository>C:\.m2\repository</localRepository> 3. mvn appfuse:full-source 4. It works
          Hide
          Matt Raible added a comment -

          Fixed by upgrading to Ant 1.8.

          Show
          Matt Raible added a comment - Fixed by upgrading to Ant 1.8.

            People

            • Assignee:
              Matt Raible
              Reporter:
              Paul Sundling
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: