Showing posts with label ANT. Show all posts
Showing posts with label ANT. Show all posts

Jul 27, 2016

Issues During Code Build in Eclipse

Problem

If you are facing issue during Build a project in Eclipse and you cannot see anything in Problems perspective of eclipse after you checkout project from SVN Repository.

Solution

Please follow the steps as below to successfully checkout the project and build in eclipse.
Note : We are not referring to ANT Build in eclipse.
Steps :
  1. Checkout the project from SVN repository. By giving correct SVN path.
  2. On the Select Wizard Screen on eclipse, select as Java Project.
  3. Give Name to the project and select current used JRE and click finish.
  4. After project is successfully check out, right click on the project and select "Properties".
  5. Select Java BUILD Path from Left Menu and click add Folders.
  6. Select all "Src" folders from all modules present in your Project.
  7. Click "OK".
  8. Instead of "Build Automatically" "Clean" Manual Build is Recommended.
  9. Now you can see problems in your perspective.
  10. Go Ahead and add specific libraries required for compilation.

Could not load definitions from resource net/sf/antcontrib/antcontrib.properties

error

When click on build.xml and running ant build. Getting following error :
[taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

APPLIES TO:

Oracle Commerce Platform - Version 9.4 and later
Information in this document applies to any platform.

Solution

Please follow the steps below to get rid of above issue.
Important steps to be followed and are mandatory.

  1. Install ANT on to your machine drive.
  2. Make sure class path for ant is set to ANT_HOME
  3. In lib folder of ANT_HOME copy jar file names "ant-contrib-0.6".
  4. In build.xml at line number <exact line number> where it say's "
    <taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath>
    <pathelement location="" /> <taskdef>
  5. Give correct location of jar files. e.g "C:\apache-ant-1.8.4\lib\ant-contrib-0.6.jar".
  6. Try running ANT build again.