Hi all,
I am trying to switch one of our 'projects' to Maven and am running into
some problems.
The project consists of some shell-scripts (which I want to replace with
Maven) and configurations to build an Ubuntu pre-seed Image. What the
scripts do in short:
- Mount an Ubuntu image
- Copy its content to a directory to work in
- Add our configurations
- Create a new Image
I have found a plugin to extract the image without mounting it (getting
rid of the need for 'sudo' in our script) and copying the configurations
is peanuts any day.
To repackage the image, I looked into the iso9660-maven-plugin, which
was said to do just that.
Now, when I run my project, it always stops with the following error:
[ERROR] Failed to execute goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
(default) on project test: Execution default of goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
failed: String index out of range: 41 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
(default) on project test: Execution default of goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
failed: String index out of range: 41
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
default of goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
failed: String index out of range: 41
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out
of range: 41
at java.lang.String.substring(String.java:1946)
at
com.github.stephenc.javaisotools.joliet.impl.JolietNamingConventions.apply(JolietNamingConventions.java:89)
at
com.github.stephenc.javaisotools.iso9660.NamingConventions.processDirectory(NamingConventions.java:233)
at
com.github.stephenc.javaisotools.iso9660.impl.ISO9660Factory.applyNamingConventions(ISO9660Factory.java:79)
at
com.github.stephenc.javaisotools.joliet.impl.JolietHandler.<init>(JolietHandler.java:60)
at
com.github.stephenc.javaisotools.iso9660.impl.CreateISO.process(CreateISO.java:52)
at
com.github.stephenc.javaisotools.maven.PackageMojo.execute(PackageMojo.java:317)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
Looking through the code, it seems the plugin thinks the filename is too
long. I added some logging and built a SNAPSHOT version to play with,
but I am not quite sure about the calculation of the filename-length.
All names that go in are exactly 64 characters long, but the plugin
wants to shorten them still.
I was hoping that Mr. Connolly could perhaps take another look at it and
give me some pointer/update the current version to work correctly.
A simple test-case is to just unpack an Ubuntu image (I was testing with
10.04.4 amd64) and try to repackage it.
Thanks.
Roland
I am trying to switch one of our 'projects' to Maven and am running into
some problems.
The project consists of some shell-scripts (which I want to replace with
Maven) and configurations to build an Ubuntu pre-seed Image. What the
scripts do in short:
- Mount an Ubuntu image
- Copy its content to a directory to work in
- Add our configurations
- Create a new Image
I have found a plugin to extract the image without mounting it (getting
rid of the need for 'sudo' in our script) and copying the configurations
is peanuts any day.
To repackage the image, I looked into the iso9660-maven-plugin, which
was said to do just that.
Now, when I run my project, it always stops with the following error:
[ERROR] Failed to execute goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
(default) on project test: Execution default of goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
failed: String index out of range: 41 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
(default) on project test: Execution default of goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
failed: String index out of range: 41
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
default of goal
com.github.stephenc.java-iso-tools:iso9660-maven-plugin:2.0.0:iso
failed: String index out of range: 41
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out
of range: 41
at java.lang.String.substring(String.java:1946)
at
com.github.stephenc.javaisotools.joliet.impl.JolietNamingConventions.apply(JolietNamingConventions.java:89)
at
com.github.stephenc.javaisotools.iso9660.NamingConventions.processDirectory(NamingConventions.java:233)
at
com.github.stephenc.javaisotools.iso9660.impl.ISO9660Factory.applyNamingConventions(ISO9660Factory.java:79)
at
com.github.stephenc.javaisotools.joliet.impl.JolietHandler.<init>(JolietHandler.java:60)
at
com.github.stephenc.javaisotools.iso9660.impl.CreateISO.process(CreateISO.java:52)
at
com.github.stephenc.javaisotools.maven.PackageMojo.execute(PackageMojo.java:317)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
Looking through the code, it seems the plugin thinks the filename is too
long. I added some logging and built a SNAPSHOT version to play with,
but I am not quite sure about the calculation of the filename-length.
All names that go in are exactly 64 characters long, but the plugin
wants to shorten them still.
I was hoping that Mr. Connolly could perhaps take another look at it and
give me some pointer/update the current version to work correctly.
A simple test-case is to just unpack an Ubuntu image (I was testing with
10.04.4 amd64) and try to repackage it.
Thanks.
Roland