Anders Hammar wrote: > > No, you create a third project which is a standard jar Maven project. > There > you but those Java classes. This will produce a jar artifact, which you > declare a dependency to from both war projects. >
I've done this, as you've explained me here. But I have one problem yet. If I save data in jar object from 1-st war for the 2-nd war, the 2-nd war cannot acces they. My object is the singleton. 1 protected static Controller controller; 2 3 public static Controller getInstance() { 4 if(controller == null) { 5 controller = new Controller(); 6 } 7 return controller; 8 } If I debug 1-st war and then 2-nd one, I see that 2-nd war also goes into row 5. So both wars works with different objects. Can you explain me how can I solve this? Thank you in advance. Best Regards, -sipungora -- View this message in context: http://maven.40175.n5.nabble.com/How-to-access-classes-from-war-dependency-tp4362127p4373647.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org