Page 1 of 1

[Tutorial] L2J from SVN in NetBeans 7

Posted: Sun Oct 09, 2011 11:07 am
by HorridoJoho
1. Preface
NetBeans 7 installed out of the box with SVN functionality, i didn't need to install anything else expect NetBeans 7 itself.


2. Checkout from SVN
In menu go to Team -> Subversion and click on Checkout.... The Checkout dialog opens and the only field you need to fill is the Repository URL:
Click on Next > to get to the next step. Choose the Repository Folders(s) to checkout and click on Finish to checkout the selected folder(s). Don't create a project from the checked out sources when you're asked!


3. Import Eclipse projects
-> (To make it simple choose the same folder for Project to Import and Destination Folder. It will avoid build.xml confusion. NetBeans 7 will prefix it's own files which would be named like the Eclipse ones with "nb-")
In menu go to File -> Import Project and click on Eclipse Project.... The Import Eclipse Project dialog opens and if you want to import your whole Eclipse workspace into NetBeans 7 choose Import Projects from Workspace. But that's not out goal since we checked out the L2J sources from SVN with NetBeans 7 and not Eclipse. So choose Import Project ignoring Project Dependencies. Now you select the Project to Import(checkout folder where eclipse project file resides in) and Destination Folder(where you want the NetBeans 7 settings and project files to be stored). For L2J_DataPack NetBeans 7 will report import issues(can't find jar libraries). Just close the opened Import Issues dialog. Now another dialog opens where you click on Resolve Problems.... In the next dialog you click on Resolve... to browse for one of the missing jar libraries. When the location of one is choosen the rest should be resolved automatically. Now you can close this dialog.


4. Additional required changed
Now that we have L2J_Server and L2J_DataPack projects imported we have to make some changes. We don't want the Java editor to report errors where no errors are. Since we did import single Eclipse projects the Source/Binary Format defaults to JDK 5(this informations are saved in workspace settings). Right click the projects and click on Properties. Now go to Categories -> Sources and set the Source/Binary Format to JDK 7. Do this changes on L2J_DataPack and L2J_Server.


5. Compile and Build
To compile the projects with the build.xml provided in SVN you have to go into the Files windows, right click build.xml, go to Run Target and click on dist.
Everything is a usual and you will have your zip files in the build folders.
Image


6. Apply patches
To apply patches, do not right click on the project itself, but on it's Source Packages otherwise NetBeans 7 will try to apply the patch on the NetBeans 7 created folder and not on the source checked out from SVN and that will fail i
guess :). So to apply a patch select the Source Package you want to apply the patch to and in menu go to Team -> Apply Diff Patch....


That's all, happy NetBeaning :)

Re: [Tutorial] L2J from SVN in NetBeans 7

Posted: Sun Oct 09, 2011 12:32 pm
by UnAfraid
Looks nice could be moved in FAQ / Wiki

Re: [Tutorial] L2J from SVN in NetBeans 7

Posted: Sun Oct 09, 2011 7:06 pm
by Aikimaniac
I think the right area for such stuff should be http://www.l2jserver.com/wiki/Main_Page