NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

project.properties Win vs Mac

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
markwagoner



Joined: 23 Jan 2009
Posts: 77

PostPosted: Tue Oct 05, 2010 12:17 pm    Post subject: project.properties Win vs Mac Reply with quote

I have a Windows desktop at work but I use a Macbook from home or while traveling. I am using a SubVersion server to keep everything in synch.

For some reason, NetBeans on Windows keeps re-writting the j2ee.platform.classpath element of the project.properties file to use '\' as the path separator while NetBean Mac then re-writes it to use '/'

For example:

on Windows
Code:

j2ee.platform.classpath=${j2ee.server.home}\\lib\\annotations-api.jar:${j2ee.server.home}\\lib\\catalina-ant.jar:${j2ee.server.home}\\lib\\catalina-ha.jar:${j2ee.server.home}\\lib\\catalina-tribes.jar:${j2ee.server.home}\\lib\\catalina.jar:${j2ee.server.home}\\lib\\derbyclient.jar:${j2ee.server.home}\\lib\\el-api.jar:${j2ee.server.home}\\lib\\jasper-el.jar:${j2ee.server.home}\\lib\\jasper.jar:${j2ee.server.home}\\lib\\jsp-api.jar:${j2ee.server.home}\\lib\\jt400.jar:${j2ee.server.home}\\lib\\mail.jar:${j2ee.server.home}\\lib\\ojdbc6.jar:${j2ee.server.home}\\lib\\servlet-api.jar:${j2ee.server.home}\\lib\\tomcat-coyote.jar:${j2ee.server.home}\\lib\\tomcat-dbcp.jar:${j2ee.server.home}\\lib\\tomcat-i18n-es.jar:${j2ee.server.home}\\lib\\tomcat-i18n-fr.jar:${j2ee.server.home}\\lib\\tomcat-i18n-ja.jar:${j2ee.server.home}\\lib\\ucp.jar:${j2ee.server.home}\\bin\\tomcat-juli.jar


and Mac
Code:

j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/derbyclient.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/jt400.jar:${j2ee.server.home}/lib/mail.jar:${j2ee.server.home}/lib/ojdbc6.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/ucp.jar:${j2ee.server.home}/bin/tomcat-juli.jar


This is not a big deal but is does mean svn has to perform needless commits to the repository. This only seems to be an issue with j2ee.platform.classpath. All of the other elements seem to use '/' as the path separator.

Is there any way to stop this?
Back to top
Mark Wade
Posted via mailing list.





PostPosted: Tue Oct 05, 2010 9:18 pm    Post subject: project.properties Win vs Mac Reply with quote

On Oct 5, 2010, at 8:17 AM, markwagoner wrote:

Quote:
This is not a big deal but is does mean svn has to perform needless
commits to the repository. This only seems to be an issue with
j2ee.platform.classpath. All of the other elements seem to use '/'
as the path separator.

Is there any way to stop this?


Exclude that file from committing to svn?

Mark Wade
address-removed
Back to top
markwagoner



Joined: 23 Jan 2009
Posts: 77

PostPosted: Wed Oct 06, 2010 12:00 pm    Post subject: Reply with quote

I can't do that because if a change is made at the project level (such as adding an external jar) then it won't be replicated to the server.

This file is added to the repository by NetBeans by default, so there is probably other reasons as well.
Back to top
ooBartez



Joined: 03 May 2010
Posts: 1

PostPosted: Fri Jan 07, 2011 5:55 pm    Post subject: Reply with quote

Did you resolve this issue?

I'm having the same problem with Windows and Linux. We use both OS's for development and the file gets modified in almost every commit because of a few lines.

The affected properties in our project:
j2ee.platform.classpath
j2ee.platform.embeddableejb.classpath
j2ee.platform.wscompile.classpath
j2ee.platform.wsgen.classpath
j2ee.platform.wsimport.classpath
j2ee.platform.wsit.classpath

Perhaps the properties should be moved to nbproject/private which is ignored by SVN?
Back to top
markwagoner



Joined: 23 Jan 2009
Posts: 77

PostPosted: Mon Jan 10, 2011 12:42 pm    Post subject: Reply with quote

No, it is still doing this for me also. I haven't tried NB 7 yet to see if that fixes it.
Back to top
predi



Joined: 25 Aug 2011
Posts: 9

PostPosted: Thu Aug 25, 2011 10:41 am    Post subject: Reply with quote

Perhaps this workaround would work for you: create two netbeans projects which reference the same source code and libraries. That way you can use the apropriate project on different platforms and still rely on svn. It is up to you to keep the projects synchronized though. You can modify project.properties to reference the same relative path to a folder which contains the source code/libraries.
I admit it's a little iffy, but it would work. And separating source code/libraries from it's project is a good thing to do anyways. I don't get the need of netbeans to "enclose" everything.
Or you can wait for netbeans projects to become platform independent.
Back to top
pcooke2002



Joined: 17 May 2011
Posts: 4

PostPosted: Thu Aug 25, 2011 11:19 pm    Post subject: Reply with quote

i know this has been the old solution started a million years ago.

but the old tried and true work around is require everyone to have the same OS as the target production server. If your target is unix/linux then the mac should be fine. just reformat your pc's to use linux

If your server is windows, run an emulator on your mac.

Sometime brute force is simple simple solution.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo