Problems getting my ANT builds to work after OS upgrade

前端 未结 2 1472
轮回少年
轮回少年 2021-01-14 04:36

I recently upgraded my system from Mint12 to Mint14 and had severe issues with getting my old projects to work nicely on the new system. To summarize it all:

  • G
2条回答
  •  离开以前
    2021-01-14 05:09

    I see the first problem:

    [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
    

    This is telling me that you have a task some where in your build.xml file, and that it can no longer find the missing optional Ant jar.

    My theory: In your old Ant version under $ANT_HOME/lib, you installed the Ant-Contrib jar. Since this directory is in Ant's $CLASSPATH by default, you didn't have to specify it in your task line, so it looks like this:

    
    

    I always recommend that you always put these optional task jars into your project. This way, no one has to install these jars in order for them to work since they're already in the project:

    • Make a directory /home/my_userid/new_workspace/my_project/antlib/ac, so your project will have a directory antlib/ac in it.
    • In this directory, download and install ant-contrib-1.03.jar
    • Now change your to include this jar in its classpath.

    It should look like this:

    
    
    
    
        
            
                                                            
提交回复
热议问题