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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:45:29+00:00 2026-06-17T09:45:29+00:00

I’m developing a web application using Eclipse Juno and Maven-WTP plugin. This application has

  • 0

I’m developing a web application using Eclipse Juno and Maven-WTP plugin. This application has a header image and I also have two Maven profiles. Those profiles permit changing the header image, because they point to a different directory, where the image is located. That’s how they are configured:

<profile>
    <id>local</id>
    <properties>
        <imagen.cabecera.dir>src/main/resources/styles/headers/example1</imagen.cabecera.dir>
    </properties>
</profile>

<profile>
    <id>local2</id>
    <properties>
        <imagen.cabecera.dir>src/main/resources/styles/headers/example2</imagen.cabecera.dir>
    </properties>
</profile>

The idea is when I change the active profile in my .m2/settings.xml to have the header file changed as well. The active profile is configured like that:

<activeProfiles>
    <!--make the profile active all the time -->
    <activeProfile>nexus</activeProfile>
    <activeProfile>local</activeProfile>
</activeProfiles>

If I change the active profile and do mvn clean install everything works like a charm in project’s target directory. However, the problem comes with Maven-WTP plugin. This plugin is taking the file from webapp/images directory, and looks like when I change the active profile is not getting the new one. It seems the WTP plugin is not updating the file here, so I get the old one displayed in the browser, even I do a clean install. This is my pom.xml configuration:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <executions>
        <execution>
            <id>copy-resources</id>
            <phase>process-resources</phase>
            <goals>
                <goal>copy-resources</goal>
            </goals>
            <configuration>
                <outputDirectory>${project.build.directory}</outputDirectory>
                <resources>
                    <resource>
                        <directory>${imagen.cabecera.dir}</directory>
                        <includes>
                            <include>cabecera.jpg</include>
                        </includes>
                        <targetPath>${project.build.directory}/header</targetPath>
                    </resource>
                </resources>
            </configuration>
        </execution>
    </executions>
</plugin>

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <executions>
        <execution>
            <id>default-war</id>
            <configuration>
                <webResources>
                    <resource>
                        <directory>${project.build.directory}/header</directory>
                        <includes>
                            <include>cabecera.jpg</include>
                        </includes>
                        <targetPath>/images</targetPath>
                    </resource>
                </webResources>
            </configuration>
        </execution>
    </executions>
</plugin>

Does anybody know about 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-06-17T09:45:29+00:00Added an answer on June 17, 2026 at 9:45 am

    The Maven Eclipse WTP Plugin is getting the data to deploy from webapp directory. The clue is that this directory is not being cleaned when executing mvn clean install, because Maven only cleans target directory. The trick is forcing Maven to clean the resources I’m going to update too.

    <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.5</version>
        <configuration>
            <filesets>
                <fileset>
                    <directory>src/main/webapp/images</directory>
                    <includes>
                        <include>cabecera.jpg</include>
                    </includes>
                </fileset>
            </filesets>
        </configuration>
    </plugin>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am using JSon response to parse title,date content and thumbnail images and place
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.