user14636
user14636

Reputation: 398

Sharing source between two Netbeans projects

I have an existing Java project in Netbeans (a JSF web application). I'd like to experiment with GWT in a separate project - put pull in source from the original project. Is there any way to share source between two Netbeans projects.

When I attempt to add the source directory from the original project into the new the IDE complains that the source is already part of another project.

Upvotes: 3

Views: 3367

Answers (3)

James Schek
James Schek

Reputation: 17960

Alternatively, try moving the source folder outside both project folders. Then add the source to each project. Do not have both projects open at the same time.

Upvotes: 0

James Schek
James Schek

Reputation: 17960

Use source control. With CVS, use modules. With Subversion, use svn:externals.

Upvotes: 0

asalamon74
asalamon74

Reputation: 6170

If you're only experimenting then copy the necessary part of the existing project to a different directory. Of course changes won't be synchronized later.

If you'd like to keep both projects alive then create a separate project with the common code, and use it as a library.

Upvotes: 3

Related Questions