| -----Original Message----- | From: Ian Springer [mailto:[EMAIL PROTECTED] | Sent: Monday, October 02, 2006 10:41 PM | To: Maven Users List | Subject: RE: maven-resources-plugin StringIndexOutOfBoundsException | | | | | Hi! | | | | I am migrating a project from m1 to m2. | | | | I have two modeules, one to make a jar from jaxb generated | | and compiled | | source and another module that must create a war and which | | have a dependency | | with the previous jar cretaed in my jaxb module. | | | | Well, my jaxb module works fine, the problem is when the | resources are | | filtered in my second module. | | | | I think is a problem during the execution of | | maven-resoures-plugin but I | | don“t know where the problem is. | | | | I ran mvn install and the error shown is this: | | | | ... | | ... | | ... | | [INFO] | | -------------------------------------------------------------- | | -------------- | | [INFO] Building nooscom-voiceportal-web-jsf | | [INFO] task-segment: [install] | | [INFO] | | -------------------------------------------------------------- | | -------------- | | [DEBUG] Skipping disabled repository Maven Snapshots | | [DEBUG] maven-war-plugin: resolved to version 2.0.2-SNAPSHOT | | from repository | | central | | [DEBUG] Skipping disabled repository central | | [DEBUG] maven-war-plugin: resolved to version | | 2.0.2-20060829.202242-1 from | | repository snapshots | | [DEBUG] Retrieving parent-POM: | | org.apache.maven.plugins:maven-plugins::2-SNAPSHOT for project: | | null:maven-war-plugin:maven-plugin:2.0.2-20060829.202242-1 from the | | repository. | | [DEBUG] maven-plugins: resolved to version 2-20060822.131811-5 from | | repository snapshots | | [DEBUG] Retrieving parent-POM: | | org.apache.maven:maven-parent::4-SNAPSHOT for | | project: | | org.apache.maven.plugins:maven-plugins:pom:2-SNAPSHOT from the | | repository. | | [DEBUG] maven-parent: resolved to version 4-20060822.161338-4 from | | repository snapshots | | [DEBUG] Retrieving parent-POM: org.apache:apache::3 for project: | | org.apache.maven:maven-parent:pom:4-SNAPSHOT from the repository. | | [DEBUG] Configuring mojo | | 'org.apache.maven.plugins:maven-resources-plugin:2.3-SNAPSHOT: | | resources' --> | | [DEBUG] (f) filters = | | [c:\java\workspace\nooscom-servicecopy\servicecopy/src/main/fi | | lters/desarrollo15.properties] | | [DEBUG] (f) outputDirectory = | | c:\java\workspace\nooscom-servicecopy\servicecopy/target/classes | | [DEBUG] (f) project = | [EMAIL PROTECTED] | | [DEBUG] (f) resources = [EMAIL PROTECTED] | | [DEBUG] -- end configuration -- | | [INFO] [resources:resources] | | [INFO] Using default encoding to copy filtered resources. | | [INFO] | | -------------------------------------------------------------- | | ---------- | | [ERROR] FATAL ERROR | | [INFO] | | -------------------------------------------------------------- | | ---------- | | [INFO] String index out of range: 0 | | [INFO] | | -------------------------------------------------------------- | | ---------- | | [DEBUG] Trace | | java.lang.StringIndexOutOfBoundsException: String index out | | of range: 0 | | at java.lang.String.charAt(String.java:558) | | at | | org.apache.maven.plugin.resources.util.InterpolationFilterRead | | er.read(InterpolationFilterReader.java:193) | | at | | org.apache.maven.plugin.resources.util.InterpolationFilterRead | | er.read(InterpolationFilterReader.java:201) | | at | | org.apache.maven.plugin.resources.util.InterpolationFilterRead | | er.read(InterpolationFilterReader.java:162) | | at java.io.Reader.read(Reader.java:122) | | at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:212) | | at org.codehaus.plexus.util.IOUtil.copy(IOUtil.java:200) | | at | | org.apache.maven.plugin.resources.ResourcesMojo.copyFile(Resou | | rcesMojo.java:274) | | at | | org.apache.maven.plugin.resources.ResourcesMojo.copyResources( | | ResourcesMojo.java:188) | | at | | org.apache.maven.plugin.resources.ResourcesMojo.execute(Resour | | cesMojo.java:105) | | at | | org.apache.maven.plugin.DefaultPluginManager.executeMojo(Defau | | ltPluginManager.java:412) | | at | | org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa | | ls(DefaultLifecycleExecutor.java:534) | | at | | org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa | | lWithLifecycle(DefaultLifecycleExecutor.java:475) | | at | | org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa | | l(DefaultLifecycleExecutor.java:454) | | at | | org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa | | lAndHandleFailures(DefaultLifecycleExecutor.java:306) | | at | | org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas | | kSegments(DefaultLifecycleExecutor.java:273) | | at | | org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(De | | faultLifecycleExecutor.java:140) | | at | | org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) | | at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) | | at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) | | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | | at | | sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess | | orImpl.java:39) | | at | | sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth | | odAccessorImpl.java:25) | | at java.lang.reflect.Method.invoke(Method.java:585) | | 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) | | [INFO] | | -------------------------------------------------------------- | | ---------- | | [INFO] Total time: 13 seconds | | [INFO] Finished at: Wed Aug 30 11:39:11 CEST 2006 | | [INFO] Final Memory: 9M/19M | | [INFO] | | -------------------------------------------------------------- | | ---------- | | | | Someone knows how can I fix the error? | | | | thanks for reading! | | | | I am having the same issue. Did the original poster ever | solve the problem? | | Thanks! | Ian |
I figured it out. I had some binary files (specifically, Java class files) in my src/main/resources/ dir. Apparently, the resources plugin chokes hard on binary files. Too bad it doesn't provide a way to specify a file mask for which files should be filtered... Ian --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
