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 222424 - order of jars in j2ee.platform.classpath differs per platform
Summary: order of jars in j2ee.platform.classpath differs per platform
Status: RESOLVED DUPLICATE of bug 207047
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-19 20:10 UTC by gvaleika
Modified: 2013-07-10 06:29 UTC (History)
1 user (show)

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 gvaleika 2012-11-19 20:10:04 UTC
nbproject/project.properties j2ee.platform.classpath property depends on user environment. There is no way to configure its value to make it compatible to other team member's environmnents. It causes a lot of unnecessary version control system trafic.

Easy solution would be to move this setting to nbproject/private/private.properties. Together with j2ee.server.instance, j2ee.server.domain, j2ee.server.home properties.

It works ok if placed there until nbproject/project.properties file is regenerated. Then it is moved back to nbproject/project.properties file.

Problem is mentioned in http://forums.netbeans.org/topic44652.html and http://stackoverflow.com/questions/8957913/netbeans-project-properties-file-different-between-mac-and-windows

Still no workaround found.
Comment 1 David Konecny 2012-11-21 02:08:52 UTC
This should not happen. The problem is that server plugin, glassfish in this case, returns the server jars in different order on different platforms. Considering the order of jars on classpath does matter I would think that GF plugin returns them always in the same order. But it the order does not matter then GF plugin should sort them and return them always in the same order regardless of platform.
Comment 2 gvaleika 2012-11-21 12:23:20 UTC
(In reply to comment #1)
> This should not happen. The problem is that server plugin, glassfish in this
> case, returns the server jars in different order on different platforms.
> Considering the order of jars on classpath does matter I would think that GF
> plugin returns them always in the same order. But it the order does not matter
> then GF plugin should sort them and return them always in the same order
> regardless of platform.

Exactly. 

I'm using not glassfish but tomcat. Same NB versions installed in linux and widnows. Libraries order is different. My idea is if setting would go to private/private.properties everybody would be happy.
Comment 3 David Konecny 2012-11-21 19:48:29 UTC
(In reply to comment #2)
> I'm using not glassfish but tomcat.

I see, the stackoverflow link mentioned GlassFish. In Tomcat case this is duplicate of issue 207047.

> My idea is if setting would go to
> private/private.properties everybody would be happy.

It was like that in the past but current state is or should be improvement. On continual builders like Hudson all you have to do is to setup j2ee.server.home property to point to your server installation folder and your build should just work. If j2ee.platform.classpath property was defined in private.properties then you would have to initialize j2ee.platform.classpath property with list of server jars which you actually have no idea which they are.

*** This bug has been marked as a duplicate of bug 207047 ***
Comment 4 gvaleika 2012-11-21 19:56:33 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I'm using not glassfish but tomcat.
> 
> I see, the stackoverflow link mentioned GlassFish. In Tomcat case this is
> duplicate of issue 207047.
> 
> > My idea is if setting would go to
> > private/private.properties everybody would be happy.
> 
> It was like that in the past but current state is or should be improvement. On
> continual builders like Hudson all you have to do is to setup j2ee.server.home
> property to point to your server installation folder and your build should just
> work. If j2ee.platform.classpath property was defined in private.properties
> then you would have to initialize j2ee.platform.classpath property with list of
> server jars which you actually have no idea which they are.

I don't use any continual builder. I have problem with stock NB environment - NB, Tomcat, web project and ant. 

Movement of j2ee.platform.classpath setting from private.proterties to project.properties happens automatically without my control. Problem actually is that there is no way to say NB not to do this.

It would help if NB would respect j2ee.platform.classpath in private properties and didn't mess with it if it is defined in private.properties.
Comment 5 reinert 2013-07-09 22:32:55 UTC
This is not solved for me.

We're using git and my team has Netbeans 7.3 and 7.3.1 and also different SO's. 

In all these cases Netbeans changes the j2ee.platform.classpath property in the project.properties file even if is the same value!
Comment 6 Petr Hejl 2013-07-10 06:29:13 UTC
(In reply to comment #5)
> This is not solved for me.
> 
> We're using git and my team has Netbeans 7.3 and 7.3.1 and also different SO's. 
> 
> In all these cases Netbeans changes the j2ee.platform.classpath property in the
> project.properties file even if is the same value!

Please do not reopen duplicates. Reopen the original issue #207047 and specify the server you are using.

*** This bug has been marked as a duplicate of bug 207047 ***