Note that there are some explanatory texts on larger screens.

plurals
  1. POBuild classes in same package into separate jars
    text
    copied!<p>I have a server application and two Swing-based client applications. We're developing them in eclipse and there's a separate project for each.</p> <p>Many classes are shared. For example, the <code>my.server</code> package has some classes for both the server and the clients while others are for the server only. Although I prefer to put them in the same package because they are closely related and some of them rely on package visibility, I don't want to distribute classes that an application does not need as not only would it bloat the file size, but also it would be a security risk.</p> <p>At the moment, each of the server and the clients has the same jars, which is a mess. Ideally, I'd like to automatically create jars based on dependency as following.</p> <p>Server:</p> <ul> <li>server.jar: classes used by Server only</li> <li>server-client1-common.jar: classes shared by Server and Client 1</li> <li>server-client2-common.jar: classes shared by Server and Client 2</li> </ul> <p>Client 1:</p> <ul> <li>client1.jar: classes used by Client 1 only</li> <li>server-client1-common.jar: classes shared by Server and Client 1</li> <li>client-common.jar: classes shared by Client 1 and Client 2, but not Server</li> </ul> <p>Client 2:</p> <ul> <li>client2.jar: classes used by Client 2 only</li> <li>server-client2-common.jar: classes shared by Server and Client 2</li> <li>client-common.jar: classes shared by Client 1 and Client 2, but not Server</li> </ul> <p>I realize that you can do this manually using ant, but it would be a maintenance disaster. Is there a tool that takes care of such dependency automatically?</p>
 

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