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.

Bug 270504 - autogenerated j2ee.platform.classpath in project.properties causing git conflicts due to different JDKs
Summary: autogenerated j2ee.platform.classpath in project.properties causing git confl...
Status: NEW
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 8.2
Hardware: Macintosh (x86) Mac OS X
: P3 normal with 1 vote (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-27 12:12 UTC by roben
Modified: 2017-07-10 12:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roben 2017-04-27 12:12:49 UTC
There are already closed reports about similar issues which are stated to be resolved. More often than not I get conflicts or local modification alerts when merging or just switching branches because Netbeans created a slightly different project.properties file because of a diverging j2ee.platform.classpath property. It seems that he is using OpenJDK in contrast to my Oracle JDK installation, but still this should not cause any troubles and is no relevant information to be in repository at all. Maybe this single property should be placed in the private properties, or better skipped entirely from theses files if it is automatically generated anyways?

This is my coworkers j2ee.platform.classpath:

j2ee.platform.classpath=${j2ee.server.home}/modules/system/layers/base/javax/orb/api/main/openjdk-orb-8.0.6.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/ejb/api/main/jboss-ejb-api_3.2_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/transaction/api/main/jboss-transaction-api_1.2_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/batch/api/main/jboss-batch-api_1.0_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/security/auth/message/api/main/jboss-jaspi-api_1.1_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/security/jacc/api/main/jboss-jacc-api_1.5_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/jms/api/main/jboss-jms-api_2.0_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/faces/api/main/jsf-api-2.2.14.jar:${j2ee.server.home}/modules/system/layers/base/javax/faces/api/main/create-a-new-social-notes-application-from-scratch.odt:${j2ee.server.home}/modules/system/layers/base/javax/servlet/jstl/api/main/jboss-jstl-api_1.2_spec-1.1.3.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/servlet/api/main/jboss-servlet-api_3.1_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/servlet/jsp/api/main/jboss-jsp-api_2.3_spec-1.0.1.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/validation/api/main/validation-api-1.1.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/xml/rpc/api/main/jboss-jaxrpc-api_1.1_spec-1.0.1.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/xml/ws/api/main/jboss-jaxws-api_2.2_spec-2.0.3.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/xml/bind/api/main/jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/xml/soap/api/main/jboss-saaj-api_1.3_spec-1.0.3.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/mail/api/main/javax.mail-1.5.5.jar:${j2ee.server.home}/modules/system/layers/base/javax/jws/api/main/jsr181-api-1.0-MR1.jar:${j2ee.server.home}/modules/system/layers/base/javax/management/j2ee/api/main/jboss-j2eemgmt-api_1.1_spec-1.0.1.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/resource/api/main/jboss-connector-api_1.7_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/ws/rs/api/main/jboss-jaxrs-api_2.0_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/wsdl4j/api/main/wsdl4j-1.6.3.jar:${j2ee.server.home}/modules/system/layers/base/javax/enterprise/api/main/cdi-api-1.2.jar:${j2ee.server.home}/modules/system/layers/base/javax/enterprise/concurrent/api/main/jboss-concurrency-api_1.0_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/persistence/api/main/hibernate-jpa-2.1-api-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/websocket/api/main/jboss-websocket-api_1.1_spec-1.1.1.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/interceptor/api/main/jboss-interceptors-api_1.2_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/annotation/api/main/jboss-annotations-api_1.2_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/inject/api/main/javax.inject-1.jar:${j2ee.server.home}/modules/system/layers/base/javax/el/api/main/jboss-el-api_3.0_spec-1.0.7.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/activation/api/main/activation-1.1.1.jar:${j2ee.server.home}/modules/system/layers/base/org/glassfish/javax/enterprise/concurrent/main/javax.enterprise.concurrent-1.0.jar:${j2ee.server.home}/modules/system/layers/base/org/glassfish/javax/el/main/javax.el-impl-3.0.1-b08-jbossorg-1.jar:${j2ee.server.home}/modules/system/layers/base/org/glassfish/javax/json/main/javax.json-1.0.3.jar

And mine:

j2ee.platform.classpath=${j2ee.server.home}/modules/system/layers/base/javax/enterprise/concurrent/api/main/jboss-concurrency-api_1.0_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/enterprise/api/main/cdi-api-1.2.jar:${j2ee.server.home}/modules/system/layers/base/javax/inject/api/main/javax.inject-1.jar:${j2ee.server.home}/modules/system/layers/base/javax/interceptor/api/main/jboss-interceptors-api_1.2_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/websocket/api/main/jboss-websocket-api_1.1_spec-1.1.1.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/orb/api/main/openjdk-orb-8.0.6.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/el/api/main/jboss-el-api_3.0_spec-1.0.7.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/activation/api/main/activation-1.1.1.jar:${j2ee.server.home}/modules/system/layers/base/javax/annotation/api/main/jboss-annotations-api_1.2_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/xml/soap/api/main/jboss-saaj-api_1.3_spec-1.0.3.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/xml/ws/api/main/jboss-jaxws-api_2.2_spec-2.0.3.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/xml/bind/api/main/jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/xml/rpc/api/main/jboss-jaxrpc-api_1.1_spec-1.0.1.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/ws/rs/api/main/jboss-jaxrs-api_2.0_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/ejb/api/main/jboss-ejb-api_3.2_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/management/j2ee/api/main/jboss-j2eemgmt-api_1.1_spec-1.0.1.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/jms/api/main/jboss-jms-api_2.0_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/servlet/jsp/api/main/jboss-jsp-api_2.3_spec-1.0.1.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/servlet/jstl/api/main/jboss-jstl-api_1.2_spec-1.1.3.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/servlet/api/main/jboss-servlet-api_3.1_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/security/auth/message/api/main/jboss-jaspi-api_1.1_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/security/jacc/api/main/jboss-jacc-api_1.5_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/jws/api/main/jsr181-api-1.0-MR1.jar:${j2ee.server.home}/modules/system/layers/base/javax/faces/api/main/jsf-api-2.2.14.jar:${j2ee.server.home}/modules/system/layers/base/javax/persistence/api/main/hibernate-jpa-2.1-api-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/wsdl4j/api/main/wsdl4j-1.6.3.jar:${j2ee.server.home}/modules/system/layers/base/javax/validation/api/main/validation-api-1.1.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/mail/api/main/javax.mail-1.5.5.jar:${j2ee.server.home}/modules/system/layers/base/javax/transaction/api/main/jboss-transaction-api_1.2_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/batch/api/main/jboss-batch-api_1.0_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/javax/resource/api/main/jboss-connector-api_1.7_spec-1.0.0.Final.jar:${j2ee.server.home}/modules/system/layers/base/org/glassfish/javax/enterprise/concurrent/main/javax.enterprise.concurrent-1.0.jar:${j2ee.server.home}/modules/system/layers/base/org/glassfish/javax/el/main/javax.el-impl-3.0.1-b08-jbossorg-1.jar:${j2ee.server.home}/modules/system/layers/base/org/glassfish/javax/json/main/javax.json-1.0.3.jar
Comment 1 roben 2017-04-27 13:14:59 UTC
My coworker just told me that he is also using the oracle JDK. But I don't think that this is the issue here anyways. This property caused problems again and again and should be moved somewhere else.
Comment 2 abasc 2017-07-10 12:21:38 UTC
We also has this problem at my company. We were trying to make all kinds of workaround, but could not find any acceptable solution. Even if there are same hardware, same JDK, same NetBeans and same Wildfly server version on two computers, it could change this property.

Solution ideas:
1. place the property somewhere into the private properties of the project
2. do not include this property anywhere in the project, but get it in build time
3. place a button somewhere which forces the property to be updated, otherwise NetBeans should NOT update this property

Personally I prefer the third solution, but if it causes too much issues elsewhere, it could be a patch as well. We will use it, others not, everyone happy :)