You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Target servers of web project are not retained when upgrading #9410
I have multiple apache tomcat servers and multiple maven web projects. Every projects targets one servers. When I download a new Netbeans version and import data from an older versions, the target servers of these project are not imported and they all target the first server of the list.
Language / Project Type / NetBeans Component
Maven Web application projects
How to reproduce
Import configuration from an older NB version
Did this work correctly in an earlier version?
No / Don't know
Operating System
All
JDK
All
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
I can work on this, but I need some input first.
I found out the target server of maven web projects are saved in the file var/attributes.xml (which is not imported in the migration):
would it be ok to migrate the file? it contains other data
if it's not ok, which is the right place to save server data?
Seems the properties for deployment are spread over two files:
inside the project I find a nb-configuration.xml which holds:
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--This file contains additional configuration written by modules in the NetBeans IDE.The configuration is intended to be shared among all the users of project andtherefore it is assumed to be part of version control checkout.Without this configuration present, some functionality in the IDE may be limited or fail altogether.-->
<propertiesxmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--Properties that influence various parts of the IDE, especially code formatting and the like. You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.That way multiple projects can share the same settings (useful for formatting rules for example).Any value defined here will override the pom.xml file value but is only applicable to the current project.-->
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>10-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>Tomcat</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
<org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>ide</org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>
</properties>
</project-shared-configuration>
in the attributes.xml I find the attribute AuxilaryConfiguration for the project directory, after decoding:
I think the implementation can be found in org.netbeans.modules.maven.j2ee.JavaEEProjectSettingsImpl. I see there settings for the profile and the server id. And that makes sense to me:
the target server is dependend on the local installation, so it is stored in the users preferences outside the project
the target profile ("Jakarta EE 10") is a setting that is shared and thus stored in the project
The property names that are the basis for the xml elements can be found in org.netbeans.modules.maven.j2ee.MavenJavaEEConstants.
Not sure if that is really helpful. The original question was "Should var/attributes.xml be migrateable"? Looking at the above data and the also the data I saw in my normal runtime var/attributes.xml, I think yes, it would make sense.
@NicolaIsotta you make a valid point. On the one hand I saw attributes that give me thought (as you mentioned references into cache), on the other hand there are attributes that should be migrated because people expect attributes you set once to be carried over.
Activity
matthiasblaesing commentedon Jun 8, 2026
Seems the properties for deployment are spread over two files:
nb-configuration.xmlwhich holds:attributes.xmlI find the attributeAuxilaryConfigurationfor the project directory, after decoding:I think the implementation can be found in
org.netbeans.modules.maven.j2ee.JavaEEProjectSettingsImpl. I see there settings for the profile and the server id. And that makes sense to me:The property names that are the basis for the xml elements can be found in
org.netbeans.modules.maven.j2ee.MavenJavaEEConstants.Not sure if that is really helpful. The original question was "Should
var/attributes.xmlbe migrateable"? Looking at the above data and the also the data I saw in my normal runtimevar/attributes.xml, I think yes, it would make sense.NicolaIsotta commentedon Jun 9, 2026
I've checked my attributes.xml. In addition to the server entries, some are like this one:
Is it safe to migrate, considering the hardcoded cache path?
I'll make some tests
matthiasblaesing commentedon Jun 9, 2026
@NicolaIsotta you make a valid point. On the one hand I saw attributes that give me thought (as you mentioned references into cache), on the other hand there are attributes that should be migrated because people expect attributes you set once to be carried over.
TL;DR: I think this needs testing.