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

  • SEARCH
  • Home
  • 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 7517091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:20:13+00:00 2026-05-30T01:20:13+00:00

In the following senario I’m wrapping an external jar file (read a dependency I’ve

  • 0

In the following senario

I’m wrapping an external jar file (read a dependency I’ve no control over) and wrapping this in a service to be exposed over RMI.

I’d like my service interface to also be exported as a maven dependency however as it will be returning classes defined in the dependency this means that the dependency itself will be used as a dependency of my service interface.

Unfortunatly the origional jar file contains many classes that are not relevant to my exposed service.

Is it possible to depend on just a few classes in that jar file in maven (possibly by extracting and repackaging the few classes that are relevant)?

  • uberbig_irrelevant.jar
    • com.uberbig.beans <– Need this package or a few classes in it.
    • com.uberbig.everythingElse

Service project includes all of uberbig jar. But exposes a service BeanService which has a call which returns an insance of com.uberbig.beans.IntrestingLightWeightSerialiasbleBean.

Service interface project needs to have a bean definition that looks like

interface BeanFetcher {
   public IntrestingLightWeightSerialiasbleBean fetchBeanById(long beanId);
}

So ideally my serviceInterface jar file would only include the BeanFetcher interface. The definition of IntrestingLightWeightSerialiasbleBean and any direct dependencies of IntrestingLightWeightSerialiasbleBean.

The project is for use internally and won’t be publically exposed so there should be no problems repackaging so long as the repackaged bean definitions are binary and searially compatable with the external jar file.

Any Suggestions?

Possibly related question Maven depend on project – no jar but classes

Maybe I could use something from the dependency:copy section of the maven-dependency-plugin but I haven’t figured out how to do that.

  • 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-30T01:20:14+00:00Added an answer on May 30, 2026 at 1:20 am

    I think you got the plugin right, but not the goal. You should use dependency:unpack instead.

    You should be able to use an inclusion filter to extract only the classes you need, and then repack them into your own jar. (The service interface jar if you do it in the service interface project, but you can just as well set up a separate project.)

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

Sidebar

Related Questions

Suppose I have the following senario: Trunk is my main development line where programmers
The following scenario is given: /Collection1 (a number of users are subscribed to this
Consider following scenario during development - We change WCF service contracts very frequently. There
I have the following scenario: I have to import a CSV file to a
In the following scenario: APP_HOME=/Users/me/Documents/workspace/Mimer/bin javac -cp $APP_HOME/lib/*.jar:: BCClient.java Assuming $APP_HOME/lib contains all the
This is my replace method in java but unble to replace for following. It
Given the following scenario Start off with this structure: Trunk\blah\ Tag\ I branch Trunk
consider following scenario input string = WIPR.NS i have to replace this with WIPR2.NS
I was wondering if anyone had any luck with the following senario in flex.
I need to know how to write a SQL statement for the following senario;

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.