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 8654981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:55:15+00:00 2026-06-12T14:55:15+00:00

I have a project MyProject which has a dependency on configuration in another project,

  • 0

I have a project MyProject which has a dependency on configuration in another project, BaseProject. Inside BaseProject I have dependencies to many different projects like ErrorLogging, PerformanceLogging, etc… I want to be able to build the top level project (MyProject) and have it filter all the spring xml files in those projects that it has as dependencies. I’m not having any luck. I can see the beans but they are not being filtered. Some of the beans are being filtered with default filters defined in their own poms but non are using the filters from MyProject.

MyProject – This contains the filter files and imports the config from the other projects.

BaseProject – Has spring beans defined which require filtering.

ErrorLogging – Has spring beans defined which require filtering.

When I run a package from MyProject all the spring files are correctly extracted into the jar file but they still contain the property placeholder values ${error.logging.host} for example… The beans in MyProject are correctly filtered. The alternative to this is to define the beans in MyProject but there are about 10 of these projects which use BaseProject and it’s beans and I do not want to have to redefine them across 10 seperate projects.

If anyone could shed any light on this issue it’d be great. Thanks

Edit :

To make this clearer, I have a spring beans xml definition inside of the project ErrorLogging called errors-config.xml which defines beans for connecting to databases. This just has place holders for the connection details which should be provided by the filter.properties file that is inside of MyProject.

errors-config.xml is imported as a resource into baseproject-config.xml which sits inside of the BaseProject. Base project and it’s config file are imported to MyProject.

I then build MyProject using Maven and I would like the property placeholders inside of errors-config.xml to be replaced with the values in the filter.properties in MyProject. MyProject can successfully filter it’s own files but not those of ErrorsLogging project. ErrorsLogging seems to pick up filters from it’s own src/main/resources folder instead of that of MyProject.

  • 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-06-12T14:55:16+00:00Added an answer on June 12, 2026 at 2:55 pm

    You can achieve that by unpacking all the dependencies, filtering and packing again, the whole process depends on the structure of your project, for a basic configuration this may suffices:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
            <execution>
                <id>unpack-dependencies</id>
                <!--unpack all the dependencies to the target of this project-->        
                <phase>initialize</phase>
                <inherited>false</inherited>
                <goals>
                    <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                    <includeGroupIds>${pom.groupId}</includeGroupIds>
                    <overWrite>true</overWrite>
                    <outputDirectory>${project.build.directory}/${artifactId}</outputDirectory>
                    <includes>**/*.properties,**/*.xml</includes>
                </configuration>
            </execution>
        </executions>
    </plugin>
    <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
            <descriptors>
                <descriptor>${config.maven.plattform.resources}/assembly/zip.xml</descriptor>
            </descriptors>
        </configuration>
        <executions>
            <execution>
                <id>zip</id>
                <phase>package</phase>
                <inherited>true</inherited>
                <goals>
                    <goal>assembly</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
    

    This should work as long as you have correctly defined the correct filtering of the resources (which takes places later and also uses the maven-resources-plugin).

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

Sidebar

Related Questions

I have a django project which is laid out like this... myproject apps media
I have maven-gwt project. It has lots of dependencies which is usual by a
I have an experimental NServiceBus project running which has: MyProject.Core - message publisher using
My project has many dependencies that I've referenced from other projects. I am now
I have ListView in my project which has ListItems as in the form of
My project has a remote dependency which is really just a zip of certain
I have a project that has a few dependencies on other Jars. I currently
I have a Symfony2 project which uses composer, and I'd like to use this
If I have 2 java projects in my RAD. Project #1 has a class
In my project which I'm doing, I have to find if my word document

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.