Resource plugin - LifecycleExecutionException - Input length = 1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Resource plugin - LifecycleExecutionException - Input length = 1

Tobias
Hi,

a new version of the maven-resources-plugin (3.2.0) has been released
recently.

Trying to take advantage of this I added

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.2.0</version>
</plugin>
<plugin>
                <groupId>org.apache.maven.shared</groupId>
                <artifactId>maven-filtering</artifactId>
                <version>3.2.0</version>
</plugin>
<plugin>
                <groupId>org.apache.maven.shared</groupId>
                <artifactId>maven-shared-utils</artifactId>
                <version>3.3.3</version>
</plugin>

to the pom.xml file (the version of maven-resources-plugin had not been
specified before).

When running maven I see in the output that now version 3.2.0 of the
resource plugin is used (before it was 2.x). However, it now results in
the following error :

Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources (default-testResources) on project XXX: Input length = 1

See [2] below for a more detailed stack trace.

Do you know what goes wrong and how this can be fixed?

[Help1] says that "The concrete meaning of the exception depends on the
plugin so please have a look at its documentation."

I took at look at [1] but didn't find "Input length = 1" mentioned
somewhere - could you maybe point me to the right direction?

Unfortunately, I can't share the the full pom. I hope this information
is sufficient.

Best regards
Tobias

[1] https://maven.apache.org/plugins/maven-resources-plugin/index.html

[2]

11:46:07,007 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources (default-testResources) on project XXX: Input length = 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources (default-testResources) on project XXX: Input length = 1
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:218)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:151)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0 (MultiThreadedBuilder.java:191)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:748)
Caused by: org.apache.maven.plugin.MojoExecutionException: Input length = 1
    at org.apache.maven.plugins.resources.ResourcesMojo.execute (ResourcesMojo.java:362)
    at org.apache.maven.plugins.resources.TestResourcesMojo.execute (TestResourcesMojo.java:75)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:136)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:151)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0 (MultiThreadedBuilder.java:191)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:748)
Caused by: org.apache.maven.shared.filtering.MavenFilteringException: Input length = 1
    at org.apache.maven.shared.filtering.DefaultMavenFileFilter.copyFile (DefaultMavenFileFilter.java:113)
    at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources (DefaultMavenResourcesFiltering.java:262)
    at org.apache.maven.plugins.resources.ResourcesMojo.execute (ResourcesMojo.java:356)
    at org.apache.maven.plugins.resources.TestResourcesMojo.execute (TestResourcesMojo.java:75)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:136)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:151)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0 (MultiThreadedBuilder.java:191)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:748)
Caused by: java.nio.charset.MalformedInputException: Input length = 1
    at java.nio.charset.CoderResult.throwException (CoderResult.java:281)
    at sun.nio.cs.StreamDecoder.implRead (StreamDecoder.java:339)
    at sun.nio.cs.StreamDecoder.read (StreamDecoder.java:178)
    at java.io.InputStreamReader.read (InputStreamReader.java:184)
    at java.io.BufferedReader.read1 (BufferedReader.java:210)
    at java.io.BufferedReader.read (BufferedReader.java:286)
    at java.io.BufferedReader.fill (BufferedReader.java:161)
    at java.io.BufferedReader.read (BufferedReader.java:182)
    at org.apache.maven.shared.filtering.BoundedReader.read (BoundedReader.java:85)
    at org.apache.maven.shared.filtering.MultiDelimiterInterpolatorFilterReaderLineEnding.read (MultiDelimiterInterpolatorFilterReaderLineEnding.java:235)
    at org.apache.maven.shared.filtering.MultiDelimiterInterpolatorFilterReaderLineEnding.read (MultiDelimiterInterpolatorFilterReaderLineEnding.java:197)
    at java.io.Reader.read (Reader.java:140)
    at org.apache.maven.shared.utils.io.IOUtil.copy (IOUtil.java:199)
    at org.apache.maven.shared.utils.io.IOUtil.copy (IOUtil.java:181)
    at org.apache.maven.shared.utils.io.FileUtils.copyFile (FileUtils.java:1908)
    at org.apache.maven.shared.filtering.DefaultMavenFileFilter.copyFile (DefaultMavenFileFilter.java:98)
    at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources (DefaultMavenResourcesFiltering.java:262)
    at org.apache.maven.plugins.resources.ResourcesMojo.execute (ResourcesMojo.java:356)
    at org.apache.maven.plugins.resources.TestResourcesMojo.execute (TestResourcesMojo.java:75)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:136)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:151)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0 (MultiThreadedBuilder.java:191)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:748)
11:46:07,007 [ERROR]
11:46:07,007 [ERROR]
11:46:07,007 [ERROR] For more information about the errors and possible solutions, please read the following articles:
11:46:07,007 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Resource plugin - LifecycleExecutionException - Input length = 1

Mark Prins
Op wo 12 aug. 2020 om 21:47 schreef Tobias <[hidden email]>:

>
>
> Failed to execute goal
> org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources
> (default-testResources) on project XXX: Input length = 1
>
> See [2] below for a more detailed stack trace.
>
> Do you know what goes wrong and how this can be fixed?
>
>
I ran into this as well, after updating the list of "
nonFilteredFileExtensions" this seems to be fixed, see eg.
https://github.com/B3Partners/brmo/pull/901/files

run "mvn -X process-test-resources" to get the list of filtered files


--
Disclaimer;
This message is just a reflection of what I thought at the time of sending.
The message may contain information that is not intended for you or that
you don't understand.
Reply | Threaded
Open this post in threaded view
|

Re: Resource plugin - LifecycleExecutionException - Input length = 1

Karl Heinz Marbaise-3
In reply to this post by Tobias
Hi,

On 12.08.20 21:44, Tobias wrote:

> Hi,
>
> a new version of the maven-resources-plugin (3.2.0) has been released
> recently.
>
> Trying to take advantage of this I added
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>3.2.0</version>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.shared</groupId>
> <artifactId>maven-filtering</artifactId>
> <version>3.2.0</version>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.shared</groupId>
> <artifactId>maven-shared-utils</artifactId>
> <version>3.3.3</version>
> </plugin>
>
> to the pom.xml file (the version of maven-resources-plugin had not been
> specified before).

This is the most important thing you should always define the versions
of all your plugins.

I don't understand why you have defined maven-shared-utils, and
maven-filtering as plugins? Cause they are no plugins. And not needed by
usual project...

Apart from I recommend to make a directory where the filtered resources
can be put into. I use the usual resources directory. A separate
directory which contains the files which should not being filtered like
`non-filtered-resources` that makes the configuration easier and makes
very clear for users what is being done.

Kind regards
Karl Heinz Marbaise

>
> When running maven I see in the output that now version 3.2.0 of the
> resource plugin is used (before it was 2.x). However, it now results in
> the following error :
>
> Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources (default-testResources) on project XXX: Input length = 1
>
> See [2] below for a more detailed stack trace.
>
> Do you know what goes wrong and how this can be fixed?
>
> [Help1] says that "The concrete meaning of the exception depends on the
> plugin so please have a look at its documentation."
>
> I took at look at [1] but didn't find "Input length = 1" mentioned
> somewhere - could you maybe point me to the right direction?
>
> Unfortunately, I can't share the the full pom. I hope this information
> is sufficient.
>
> Best regards
> Tobias
>
> [1] https://maven.apache.org/plugins/maven-resources-plugin/index.html
>
> [2]
>
> 11:46:07,007 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources (default-testResources) on project XXX: Input length = 1 -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources (default-testResources) on project XXX: Input length = 1
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:218)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:151)
>      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115)
>      at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0 (MultiThreadedBuilder.java:191)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:266)
>      at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:266)
>      at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
>      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
>      at java.lang.Thread.run (Thread.java:748)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Input length = 1
>      at org.apache.maven.plugins.resources.ResourcesMojo.execute (ResourcesMojo.java:362)
>      at org.apache.maven.plugins.resources.TestResourcesMojo.execute (TestResourcesMojo.java:75)
>      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:136)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:151)
>      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115)
>      at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0 (MultiThreadedBuilder.java:191)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:266)
>      at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:266)
>      at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
>      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
>      at java.lang.Thread.run (Thread.java:748)
> Caused by: org.apache.maven.shared.filtering.MavenFilteringException: Input length = 1
>      at org.apache.maven.shared.filtering.DefaultMavenFileFilter.copyFile (DefaultMavenFileFilter.java:113)
>      at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources (DefaultMavenResourcesFiltering.java:262)
>      at org.apache.maven.plugins.resources.ResourcesMojo.execute (ResourcesMojo.java:356)
>      at org.apache.maven.plugins.resources.TestResourcesMojo.execute (TestResourcesMojo.java:75)
>      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:136)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:151)
>      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115)
>      at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0 (MultiThreadedBuilder.java:191)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:266)
>      at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:266)
>      at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
>      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
>      at java.lang.Thread.run (Thread.java:748)
> Caused by: java.nio.charset.MalformedInputException: Input length = 1
>      at java.nio.charset.CoderResult.throwException (CoderResult.java:281)
>      at sun.nio.cs.StreamDecoder.implRead (StreamDecoder.java:339)
>      at sun.nio.cs.StreamDecoder.read (StreamDecoder.java:178)
>      at java.io.InputStreamReader.read (InputStreamReader.java:184)
>      at java.io.BufferedReader.read1 (BufferedReader.java:210)
>      at java.io.BufferedReader.read (BufferedReader.java:286)
>      at java.io.BufferedReader.fill (BufferedReader.java:161)
>      at java.io.BufferedReader.read (BufferedReader.java:182)
>      at org.apache.maven.shared.filtering.BoundedReader.read (BoundedReader.java:85)
>      at org.apache.maven.shared.filtering.MultiDelimiterInterpolatorFilterReaderLineEnding.read (MultiDelimiterInterpolatorFilterReaderLineEnding.java:235)
>      at org.apache.maven.shared.filtering.MultiDelimiterInterpolatorFilterReaderLineEnding.read (MultiDelimiterInterpolatorFilterReaderLineEnding.java:197)
>      at java.io.Reader.read (Reader.java:140)
>      at org.apache.maven.shared.utils.io.IOUtil.copy (IOUtil.java:199)
>      at org.apache.maven.shared.utils.io.IOUtil.copy (IOUtil.java:181)
>      at org.apache.maven.shared.utils.io.FileUtils.copyFile (FileUtils.java:1908)
>      at org.apache.maven.shared.filtering.DefaultMavenFileFilter.copyFile (DefaultMavenFileFilter.java:98)
>      at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources (DefaultMavenResourcesFiltering.java:262)
>      at org.apache.maven.plugins.resources.ResourcesMojo.execute (ResourcesMojo.java:356)
>      at org.apache.maven.plugins.resources.TestResourcesMojo.execute (TestResourcesMojo.java:75)
>      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:136)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
>      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:151)
>      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:115)
>      at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0 (MultiThreadedBuilder.java:191)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:266)
>      at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)
>      at java.util.concurrent.FutureTask.run (FutureTask.java:266)
>      at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
>      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
>      at java.lang.Thread.run (Thread.java:748)
> 11:46:07,007 [ERROR]
> 11:46:07,007 [ERROR]
> 11:46:07,007 [ERROR] For more information about the errors and possible solutions, please read the following articles:
> 11:46:07,007 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]