How to import properties and targets from ant build file properly?

前端 未结 2 429
孤独总比滥情好
孤独总比滥情好 2021-01-27 11:41

I want to make project with two modules. App and server. Server depends on app. When I compile server I want to include class files from app into the build. But it resolves clas

2条回答
  •  不知归路
    2021-01-27 12:19

    A simple approach would be the following: In the build.xml for app instead of

    
    

    use

    
    

    If you specify a property by location (and with a relative path), ant resolves the path relative to your current project. With this notation, ant first goes up a directory level and then down to the app dir, which is right from both of your projects.

    A better approach would be to put the settings used by both build scripts in a separate property file and include this file from both builds.

提交回复
热议问题