Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One of the best practices regarding building applications is to have one jar per project. <br/>Maven, for example, uses this as default. You can trick it to do otherwise, but it is better to join them instead of "fight" them.<br/></p> <p><a href="http://maven.apache.org/guides/mini/guide-using-one-source-directory.html" rel="nofollow">http://maven.apache.org/guides/mini/guide-using-one-source-directory.html</a> <br/> <a href="http://www.sonatype.com/people/2010/01/how-to-create-two-jars-from-one-project-and-why-you-shouldnt/" rel="nofollow">http://www.sonatype.com/people/2010/01/how-to-create-two-jars-from-one-project-and-why-you-shouldnt/</a></p> <p>So, in your case you should create 6 projects: Server, Client1, Client2, ServerClient1Common, ServerClient2Common, ClientCommon</p> <p>In order to select the classes needed, I don't think there is a tool, and probably you should know better what is the common functionality. Create the Common projects, and add them to the build path - dependencies. Then start moving your classes into the Common project, leaving them in the same package. <br/><br/> For example, create ServerClient1Common project.<br/> For Client1, go to Configure Build Path -> Projects. Add ServerClient1Common. Remove all references to Server Project.<br/> For Server, go to Configure Build Path -> Projects. Add ServerClient1Common. Remove all references to Client1 Project.</p> <p>You should now have a lot of missing classes/imports. Try to solve them one by one.</p> <p>At the end, you should be able compile the 3 projects and to obtain the jars you mentioned.</p> <p>PS: Other strategies (like one uber-project with different build targets, or 3 projects with entwined ant/maven builders) are messier. There is maybe one exception - another way of splitting the classes, but I do not know if it applies to you: client1.jar, client1-interface.jar, client2.jar, client2-interface.jar, server.jar, server-interface.jar. This way you could use 3 projects with each having two target jars. To run client2.jar you will need server-interface.jar</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload