This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This issue was originally reported by Jiri Pejchal in 14/May/08 at codehaus.org - see more details at http://jira.codehaus.org/browse/MEVENIDE-633 Environment: windows xp, netbeans 6.1, maven plugin 3.1.1 =========== Description: =========== When I set encoding in Netbeans for a web project to UTF-8 and do a right click on project name in Projects: New -> New xhtml file and the file has no declared encoding in meta tag, than UTF-8 is used for that file. However when I right click on a maven project and create an xhtml file without encoding declaration in the meta tag, the platform encoding is used (cp-1250 in my case). I have maven plugin 3.1.1 and Project properties (right click on a maven project with letters 'ma') -> Sources -> Encoding set to UTF-8. With encoding declaration in the meta tag everything is OK, but I need to include the xhtml file to another one in facelets. ---------------------------------------------- Comment by Milos Kleint [ 14/May/08 02:33 PM ] ---------------------------------------------- where (which folder) are you creating the xhtml file? I'm wondering if setting this property "project.build.sourceEncoding" with value UTF-8 fixes your problem? I suppose the problem is in the fact that maven so far doesn't have a generic idea about projects encoding. so I'm trying to check the compiler plugin for sources/test sources (each can have different encodings) and then resources plugin for resource roots. any other source root is ignored I think (which reminds me we should check the source root of the website and assign encoding by content of site-plugin configuration) however it's changing now on maven side http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding, that's where the property is coming from. The property is currently used in the IDE if no "plugin specific" encodings are found. however the currently released versions of plugins don't make use of it AFAIK. ---------------------------------------------- Comment by Milos Kleint [ 14/May/08 02:43 PM ] ---------------------------------------------- project.build.sourceEncoding is meant to be added to pom.xml's <properties> element. ---------------------------------------------- Comment by Milos Kleint [ 14/May/08 03:38 PM ] ---------------------------------------------- http://fisheye.codehaus.org/changelog/mevenide/?cs=5273 special check for site-plugin and it's setting of encoding for files under src/site ---------------------------------------------- Comment by Jiri Pejchal [ 15/May/08 11:16 AM ] ---------------------------------------------- Setting project.build.sourceEncoding to UTF-8 has indeed fixed the problem. Thanks.
I think issue was filed before about rhtml file not being seeded with project encoding as per feq and answer was that it was not needed as per how ruby files were used - need to check about this. other created xml, html, jsp files in nb are created with encoding tag being that of the project, not of the locale user is running nb under. ken.frank@sun.com
project.build.sourceEncoding is now always set from the IDE's UI. Therefore all sources within the project will get that encoding value. closing as fixed since 7.0 m2