Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven resources plugin execution generates a warning with a vanilla project #24576

Closed
snicoll opened this issue Dec 20, 2020 · 1 comment
Closed
Assignees
Labels
type: bug A general bug
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Dec 20, 2020

Since the upgrade to 3.2.0 an vanilla project using our spring-boot-starter-parent outputs the following:

[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html

As we are filtering configuration files, we need to provide the encoding for properties file according to this note in the official documentation.

@snicoll snicoll added the type: bug A general bug label Dec 20, 2020
@snicoll snicoll added this to the 2.4.x milestone Dec 20, 2020
@snicoll
Copy link
Member Author

snicoll commented Dec 23, 2020

Adding the following makes the warning go away:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-resources-plugin</artifactId>
	<version>3.2.0</version>
	<configuration>
		<propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
	</configuration>
</plugin>

@snicoll snicoll self-assigned this Dec 23, 2020
@snicoll snicoll modified the milestones: 2.4.x, 2.4.2 Dec 23, 2020
Artur- added a commit to vaadin/skeleton-starter-flow-spring that referenced this issue Jan 11, 2021
This removes the following message on startup from all new projects
```
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html
```

See spring-projects/spring-boot#24576
Artur- added a commit to vaadin/skeleton-starter-flow-spring that referenced this issue Jan 15, 2021
This removes the following message on startup from all new projects
```
[INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html
```

See spring-projects/spring-boot#24576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant