Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6082659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:18:51+00:00 2026-05-23T11:18:51+00:00

I have created a java library project. The binaries are available at <project-dir>/bin .

  • 0

I have created a java library project. The binaries are available at <project-dir>/bin. The test classes are available at <project-dir>/bin/com/myproject/test. I need to exclude archiving of my test classes. So, I wrote the following code:

<target depends="build-all" name="build-dist">
    <jar destfile="app.jar" basedir="bin" excludes="com/myproject/test/*.class" />
</target>

This works fine. But in the archive the directory test is still available. How to remove this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:18:51+00:00Added an answer on May 23, 2026 at 11:18 am

    The best solution is to keep test Java and class files in different directories. So instead of compiling them into bin, compile them in a second step into bin-test. This also makes sure that the non-test code can’t see test classes (compilation will fail if you accidentally import a test in a production class).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a couple of java working sets for a project in my
I have a project that uses a Java library converted using IKVM . I
I have some projects: WebShared (Java Library project) WebExternal (GWT Web Application) WebInternal (GWT
I have a Java project which includes the Xerces library. When I process the
I have a java project with class having main method in package com.nik.mypackage. Only
I have 3 projects in Eclipse Helios. A (java project) B (Android library project)
I have a Java Web Services project that was created in an older version
I have created a java application for Debian Linux. Now I want that that
I have created a java application and packed it into a jar file on
I have created a java server, which takes screenshots, resizes them, and sends them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.