Re: MalformedInputException: Input length = 1

2023-01-23 Thread Greg Chabala
>
> maven-resources-pluginable is not included in the
> https://github.com/OpenAPITools/openapi-generator/blob/master/pom.xml or
> our pom.xml and I have not been able to work out what calls it. If you have
> any ideas please shout!
>

maven-resources-plugin is a standard plugin, it's part of the default
lifecycle without being specified explicitly:
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html


Calling process-resources or any phase after it will trigger the resources
plugin, e.g. compile, test, package, verify. It's the first phase in the
lifecycle, almost anything will trigger it.


RE: MalformedInputException: Input length = 1

2023-01-23 Thread Tom Corcoran
I am only catching up on the replies - I was not sure my query had made it
in, so many thanks for the replies.

Our previous implementation of openapi-generator 5.0.0 generated to
resources and then it copied to target.

However, v6.3.0 newly generates gradle artefacts (which we don't need)
including the aforementioned jar and so this highlights as ye have
identified that we should generate to target and copy selectively to
resources. maven-resources-pluginable is not included in the
https://github.com/OpenAPITools/openapi-generator/blob/master/pom.xml or
our pom.xml and I have not been able to work out what calls it. If you have
any ideas please shout!

In the meantime I am looking into the filtering option you mentioned,

> Hi,
>
> I am working on upgrading my use of the openapi-generator-maven-plugin
for
> Spring Boot 3. My API gets generated and includes the expected pom.xml &
> gradle elements (I only used the former).
>
> Anyway then your plugin is used to copy 62 resourees,
> maven-resources-plugin:3.3.0 and I get the message:
>
>  [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources
> (default-resources) on project ABC: filtering
>  ...\src\main\resources\v1\gradle\wrapper\gradle-wrapper.jar to
> ...\target\classes\v1\gradle\wrapper\gradle-wrapper.jar failed with
> MalformedInputException: Input length = 1
>
> Any ideas are much appreciated!!
>


Re: MalformedInputException: Input length = 1

2023-01-22 Thread Karl Heinz Marbaise

Hi,

On 21.01.23 14:02, Nils Breunese wrote:

I’d say it’s pretty common to have binary files under src/main/resources 
actually. Images, movies, etc. for instance.


That's correct but you should never filter them... that's the issue here..

In general two options:

Change the configuration for filtering and exclude the binary formats
for example:
https://maven.apache.org/plugins/maven-resources-plugin/examples/binaries-filtering.html

or create two different directories and use the following configuration:



  
src/test/filtered-resources
true
  
  
src/test/resources
false
  


  
src/main/filtered-resources
true
  
  
src/main/resources
false
  



That simply means the default directory src/main/resources contains only
resources which are not filtered and src/main/filtered-resources will
contain resources which will be filtered...



Kind regards
Karl Heinz Marbaise


It’s also pretty common to commit Gradle Wrapper or Maven Wrapper JAR files, 
but in this case it looks like this Gradle Wrapper JAR is not used for building 
the codebase itself, but possibly for some other use case. I myself for 
instance maintain an application based on Spring Initializr, which also has 
these build tool wrapper JARs in its resources, because it can generate new 
projects with these files included.

I don’t know if the presence of this JAR makes sense in this case, but you 
indeed might want to exclude it from resource filtering.

Nils.


Op 20 jan. 2023 om 17:22 heeft Karl Heinz Marbaise  het 
volgende geschreven:


Accidentially not included the list...


 Forwarded Message 
Subject: Re: MalformedInputException: Input length = 1
Date: Fri, 20 Jan 2023 13:50:52 +0100
From: Karl Heinz Marbaise 
Reply-To: i...@soebes.de
To: Tom Corcoran 

Hi,

On 18.01.23 17:23, Tom Corcoran wrote:
Hi,

I am working on upgrading my use of the openapi-generator-maven-plugin for
Spring Boot 3. My API gets generated and includes the expected pom.xml &
gradle elements (I only used the former).

Anyway then your plugin is used to copy 62 resourees,
maven-resources-plugin:3.3.0 and I get the message:

  [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources
(default-resources) on project ABC: filtering
  ...\src\main\resources\v1\gradle\wrapper\gradle-wrapper.jar to
...\target\classes\v1\gradle\wrapper\gradle-wrapper.jar failed with
MalformedInputException: Input length = 1

Any ideas are much appreciated!!



Why is a JAR file in your src/main/resources directory? (binary file?)
does not make sense nor can you filter a binary file correctly...

That is the reason.

Kind regards
Karl Heinz Marbaise




-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: MalformedInputException: Input length = 1

2023-01-21 Thread Nils Breunese
I’d say it’s pretty common to have binary files under src/main/resources 
actually. Images, movies, etc. for instance.

It’s also pretty common to commit Gradle Wrapper or Maven Wrapper JAR files, 
but in this case it looks like this Gradle Wrapper JAR is not used for building 
the codebase itself, but possibly for some other use case. I myself for 
instance maintain an application based on Spring Initializr, which also has 
these build tool wrapper JARs in its resources, because it can generate new 
projects with these files included.

I don’t know if the presence of this JAR makes sense in this case, but you 
indeed might want to exclude it from resource filtering.

Nils.

> Op 20 jan. 2023 om 17:22 heeft Karl Heinz Marbaise  het 
> volgende geschreven:
> 
> 
> Accidentially not included the list...
> 
> 
>  Forwarded Message 
> Subject: Re: MalformedInputException: Input length = 1
> Date: Fri, 20 Jan 2023 13:50:52 +0100
> From: Karl Heinz Marbaise 
> Reply-To: i...@soebes.de
> To: Tom Corcoran 
> 
> Hi,
>> On 18.01.23 17:23, Tom Corcoran wrote:
>> Hi,
>> 
>> I am working on upgrading my use of the openapi-generator-maven-plugin for
>> Spring Boot 3. My API gets generated and includes the expected pom.xml &
>> gradle elements (I only used the former).
>> 
>> Anyway then your plugin is used to copy 62 resourees,
>> maven-resources-plugin:3.3.0 and I get the message:
>> 
>>  [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources
>> (default-resources) on project ABC: filtering
>>  ...\src\main\resources\v1\gradle\wrapper\gradle-wrapper.jar to
>> ...\target\classes\v1\gradle\wrapper\gradle-wrapper.jar failed with
>> MalformedInputException: Input length = 1
>> 
>> Any ideas are much appreciated!!
> 
> 
> Why is a JAR file in your src/main/resources directory? (binary file?)
> does not make sense nor can you filter a binary file correctly...
> 
> That is the reason.
> 
> Kind regards
> Karl Heinz Marbaise
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: MalformedInputException: Input length = 1

2023-01-20 Thread Stanimir Stamenkov

Fri, 20 Jan 2023 13:38:32 +0200, /Delany/:


Hi Tom,
You can turn off filtering if you don't need it. The docs suggest having
separate folders for plaintext/binary resources
https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html


The docs also mention a configuration to explicitly exclude certain file 
extensions from filtering:


https://maven.apache.org/plugins/maven-resources-plugin/examples/binaries-filtering.html

The plugin will prevent binary files filtering without adding some 
excludes configuration for the following file extensions jpg, jpeg, gif, 
bmp and png.


If you like to add supplemental file extensions this can simply achieved 
by using a configuration like the following:


  
org.apache.maven.plugins
maven-resources-plugin
3.3.0

  ...
  
pdf
swf
  
  ...

  


--
Stanimir

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Fwd: MalformedInputException: Input length = 1

2023-01-20 Thread Karl Heinz Marbaise



Accidentially not included the list...


 Forwarded Message 
Subject: Re: MalformedInputException: Input length = 1
Date: Fri, 20 Jan 2023 13:50:52 +0100
From: Karl Heinz Marbaise 
Reply-To: i...@soebes.de
To: Tom Corcoran 

Hi,
On 18.01.23 17:23, Tom Corcoran wrote:

Hi,

I am working on upgrading my use of the openapi-generator-maven-plugin for
Spring Boot 3. My API gets generated and includes the expected pom.xml &
gradle elements (I only used the former).

Anyway then your plugin is used to copy 62 resourees,
maven-resources-plugin:3.3.0 and I get the message:

  [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources
(default-resources) on project ABC: filtering
  ...\src\main\resources\v1\gradle\wrapper\gradle-wrapper.jar to
...\target\classes\v1\gradle\wrapper\gradle-wrapper.jar failed with
MalformedInputException: Input length = 1

Any ideas are much appreciated!!



Why is a JAR file in your src/main/resources directory? (binary file?)
does not make sense nor can you filter a binary file correctly...

That is the reason.

Kind regards
Karl Heinz Marbaise

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: MalformedInputException: Input length = 1

2023-01-20 Thread Greg Chabala
>
>  [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources
> (default-resources) on project ABC: filtering
>  ...\src\main\resources\v1\gradle\wrapper\gradle-wrapper.jar to
> ...\target\classes\v1\gradle\wrapper\gradle-wrapper.jar failed with
> MalformedInputException: Input length = 1
>
> Any ideas are much appreciated!!
>

Maybe don't check JARs into your source code.

On Fri, Jan 20, 2023 at 5:39 AM Delany  wrote:

> Hi Tom,
> You can turn off filtering if you don't need it. The docs suggest having
> separate folders for plaintext/binary resources
>
> https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
>


Re: MalformedInputException: Input length = 1

2023-01-20 Thread Delany
Hi Tom,
You can turn off filtering if you don't need it. The docs suggest having
separate folders for plaintext/binary resources
https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html


MalformedInputException: Input length = 1

2023-01-20 Thread Tom Corcoran
Hi,

I am working on upgrading my use of the openapi-generator-maven-plugin for
Spring Boot 3. My API gets generated and includes the expected pom.xml &
gradle elements (I only used the former).

Anyway then your plugin is used to copy 62 resourees,
maven-resources-plugin:3.3.0 and I get the message:

 [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources
(default-resources) on project ABC: filtering
 ...\src\main\resources\v1\gradle\wrapper\gradle-wrapper.jar to
...\target\classes\v1\gradle\wrapper\gradle-wrapper.jar failed with
MalformedInputException: Input length = 1

Any ideas are much appreciated!!