Include Java project as library

后端 未结 9 1923
眼角桃花
眼角桃花 2021-02-10 13:48

I have three projects in my eclipse workspace:

EventKitchenCore
EventKitchenDesktop
EventKitchenAndroid

EventKitchenCore contains

9条回答
  •  眼角桃花
    2021-02-10 14:33

    Eclipse has builtin Ant support. You can make use of it to automatically create a JAR of the current project and put it in a folder of another project.

    Provided that EventKitchenAndroid and EventKitchenCore projects are both in the same workspace, create a build.xml file in EventKitchenCore project which contains just this:

    
    
        
            
        
    
    

    To test it, select the file in Eclipse and press Ctrl+F11 to run it as Ant build file. If it works the way you want, then you can tell Eclipse to automatically execute this build file everytime the project is built. Go to the project properties of EventKitchenCore and in the Builders property, click Import... and select the build.xml file you just created.

    Now, it will be executed everytime the project is built. You can manually force the build of a project by pressing Ctrl+B. See also the video demo I just created.

提交回复
热议问题