You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "matthiasblaesing (via GitHub)" <gi...@apache.org> on 2026/06/08 18:59:42 UTC

Re: [I] Target servers of web project are not retained when upgrading [netbeans]

matthiasblaesing commented on issue #9410:
URL: https://github.com/apache/netbeans/issues/9410#issuecomment-4652419293

   Seems the properties for deployment are spread over two files:
   
   - inside the project I find a `nb-configuration.xml` which holds:
     ```xml
     <?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 and
     therefore 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.
     -->
         <properties xmlns="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:
     ```xml
     <?xml version="1.0" encoding="UTF-8"?>
     <project-private>
         <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
             <org-netbeans-modules-maven-j2ee.netbeans_2e_deployment_2e_server_2e_id>tomcat101:home=/home/matthias/bin/apache-tomcat-10</org-netbeans-modules-maven-j2ee.netbeans_2e_deployment_2e_server_2e_id>
             <org-netbeans-modules-maven-j2ee.netbeans_2e_selected_2e_browser>default</org-netbeans-modules-maven-j2ee.netbeans_2e_selected_2e_browser>
         </properties>
     </project-private>
   
     ```
   
   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists