It's not a secret anymore!
The moose likes Ant, Maven and Other Build Tools and the fly likes Unable to build the JUNIT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Unable to build the JUNIT" Watch "Unable to build the JUNIT" New topic

Unable to build the JUNIT

Mukund Patil

Joined: Feb 12, 2009
Posts: 16

Hello Experts,

I have created the junit plugin "" to test the code of "" plugin, For which I have created the ant code, but while building the junit plugin its giving me following error message -

and more imports issues.....

No errors in eclipse found.

MANIFEST.MF file is -

Please suggest any resolution....

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32844

What technology are you using to build? It doesn't look like Ant or Maven.

Also, is the jar (or loose Java files) that contain those imports in your classpath?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Vyacheslav Petc

Joined: Nov 17, 2013
Posts: 5
Do you use OSGI and Eclipse for development? Type of your project is "eclipse plugin"?
If I'm right, in target platform (see window->preferences->plugin development->target platform) you have junit dependeny (bundle).
You can see that contains import of junit packages. Hense junit contains in target platform.
But ant does not know about junit dependency and ant haven't it in classpath. Therefore ant can't compile your project and you get compilation error.
You must add junit into ant classpath
Mukund Patil

Joined: Feb 12, 2009
Posts: 16

I am using the ant script to build the plugin. where to find the class path.
The structure of my project is


Both the plugins is in eclipse, not jar for the main plugin.
I agree. Here's the link:
subject: Unable to build the JUNIT
jQuery in Action, 3rd edition