Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JAVA supports platform "Dependent" concept?

Tags:

java

maven

I found this following log in my console while doing "MAVEN INSTALL" on my project,

[INFO] Search took 70ms
[INFO] Theme "VAADIN\themes\mytheme" updated
[INFO] 
[INFO] --- vaadin-maven-plugin:7.5.10:compile-theme (default) @ MyUI ---
[INFO] Updating theme VAADIN\themes\mytheme
[INFO] Theme "VAADIN\themes\mytheme" compiled
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ MyUI ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
          resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- vaadin-maven-plugin:7.5.10:resources (default) @ MyUI ---
[INFO] auto discovered modules [com.ui.AppWidgetset]
[INFO] 3 source files from GWT module com.ui.AppWidgetset

What is the “Platform dependent” Concept they are talking about here? JAVA supports the concept of Platform Independency due to JVM , so which “feature” of JAVA(I am calling this a feature) makes it print this line in the Console?

This means all my files are encrypted (Through SEE), if I put my WAR in non-encrypted machine(if key is different) then application may not be run?

JAVA should not have allowed this "feature".

Please note: I maybe thinking this in a totally incorrect manner, or I am missing something right in front of my eyes. Apologies, but still wanted to clear it.

like image 422
DeepN Avatar asked Feb 15 '26 06:02

DeepN


1 Answers

At the time of Building the project Maven plugins may copy resources. That is why it is showing this warning. If you want to make it independent you can add the following to the pom file

<project>
  ...
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  ...
</project>

This is actually a frequently asked question in maven.

This or a similar warning is emitted by a plugin that processes plain text files but has not been configured to use a specific file encoding. So eliminating the warning is simply a matter of finding out which plugin emits it and how to configure the file encoding for it. This is as easy as adding the following property to your POM (or one of its parent POMs):

like image 53
dasrohith Avatar answered Feb 16 '26 21:02

dasrohith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!