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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:48:49+00:00 2026-06-05T02:48:49+00:00

I have a maven project , which needs to copy webapp/WEB-INF/ resources from another

  • 0

I have a maven project , which needs to copy webapp/WEB-INF/ resources from another maven project which is packaged as a war .
How do I do it ?
PLease suggest

  • 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-05T02:48:50+00:00Added an answer on June 5, 2026 at 2:48 am

    As Bittrance said, you should use the maven dependency plugin.

    The better way is to create project that include all your shared resources, probably a type zip, which is build up with the assembly plugin. This is the good “maven way”. It’s a better solution than unpacking a war.

    Then, refer it

        <dependency>
            <groupId>com.mygroup/groupId>
            <artifactId>my-dependencies</artifactId>
            <version>1.0.0</version>
            <type>zip</type>
        </dependency>
    

    Next, you use the maven dependency plugin to unpack your resources, in the directory of your choice (probably WEB-INF/ ?)

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
           <execution>
               <id>unpack-cfg-test-resources</id>
               <goals>
                    <goal>unpack-dependencies</goal>
               </goals>
               <phase>resources</phase>
                  <configuration>
                    <outputDirectory>${project.build.directory}/WEB-INF/</outputDirectory>
                                    <includeArtifacIds>my-resources</includeArtifacIds>
                    <excludeTypes>pom</excludeTypes>
                    <excludeTransitive>true</excludeTransitive>
                </configuration>
            </execution>
         </executions>
     </plugin>
    

    I’m not realy sure of this code snippet (written for another purpose), but this is an example.
    For more information, please follow this link : http://maven.apache.org/plugins/maven-dependency-plugin/

    If you can’t shared a common-project including your files, you can unpack war including only ftl (or whatever you want), but it’s not a realy clean solution 😉

    There is a lot of posts that deal with this subject :
    Unzip dependency in maven
    …
    Just try with the keywords maven-dependency-plugin, unpack 🙂

    Hope that will help you.

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

Sidebar

Related Questions

I have a maven project which won't compile due to an unresolvable reference from
Currently, I have a Maven project which inherits from a parent pom defining two
I have a maven project A which uses jar files of another project B
I have a maven project in Eclipse which has as a dependency another project
I have a maven web project that imported into eclipse. I have another maven
I have a hierarchical maven project, from which I am trying to build a
I have a Maven project which performs a number of time consuming tests as
I have a project which uses the following maven dependencies: <dependency> <groupId>com.dropbox</groupId> <artifactId>client2</artifactId> <version>1.3</version>
I have a maven multiple-module project, which is giving me headaches in the assembly:assembly
I have a project in which I used maven fail-safe plugin to run the

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.