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

The Archive Base Latest Questions

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

I have one Maven module responsible with building some docs out of several other

  • 0

I have one Maven module responsible with building some docs out of several other modules (wars). All works fine -> at build i combine several plugins like javadoc, wadl, assembly, etc. to perform what I want. Now it seems i need to build the same doc for multiple versions (so we have doc for both trunk and older versions). I tried to use profiles like the config below. The problem is that even both profiles are active, each plugin executes only once (even though they have different execution ids). Any idea why and how I can trigger each plugin to run once per profile?

<dependencies>
  <!-- common dependencies -->
</dependencies>
<properties>
  <!-- ${versionToBuild} is defined by each profile -->
  <output.name>doc-${versionToBuild}</output.name> 
  <!-- other common properties or based on a property defined by profile -->
</properties>
 <build>
    <pluginManagement>
        <plugins>
        <!-- configuration for plugins based on $versionToBuild -->
        </plugins>
    </pluginManagement>
 </build>
 <profiles>
   <profile>
     <id>doc-for-1.1</id>
     <activation>
       <activeByDefault>true</activeByDefault>
     </activation>
     <properties>
       <versionToBuild>1.1-SNAPSHOT</versionToBuild>
     </properties>
     <dependencies>
       <!-- the artefacts of my project in v1.1 -->
     </dependencies>
     <build>
       <plugins>
         <plugin>
           <artifactId>maven-javadoc-plugin</artifactId>
         </plugin>
         <plugin>
           <groupId>com.sun.jersey.contribs</groupId>
           <artifactId>maven-wadl-plugin</artifactId>
         </plugin>
       <plugins>
     </build>
   </profile>
   <profile>
     <id>doc-for-1.2</id>
     <activation>
       <activeByDefault>true</activeByDefault>
     </activation>
     <properties>
       <versionToBuild>1.2-SNAPSHOT</versionToBuild>
     </properties>
     <dependencies>
       <!-- the artefacts of my project in v1.2 -->
     </dependencies>
     <build>
       <plugins>
         <plugin>
           <artifactId>maven-javadoc-plugin</artifactId>
         </plugin>
         <plugin>
           <groupId>com.sun.jersey.contribs</groupId>
           <artifactId>maven-wadl-plugin</artifactId>
         </plugin>
       <plugins>
     </build>
   </profile>
 </profiles> 
  • 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-23T00:51:06+00:00Added an answer on May 23, 2026 at 12:51 am

    I don’t think you can do what you want without going against the grain of how Maven works. It does trickery to merge overlapping plugin configurations such as yours. You could bind each plugin to different phase to its default (ensuring they are different for v1.1 and v1.2), but it’s very hacky.

    Instead, I advise having separate branches on your source control for v1.1 and v1.2, instead of the POM being coupled so tightly to the version history. You would just build the doc for each version by checking out the appropriate branch.

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

Sidebar

Related Questions

I have a maven-managed project with some modules. One module contains some native codes
I have a multi-module (maven) spring build. All the modules publish some beans, and
I'm writing an application that consists of several maven modules. All of them have
Using maven 3.0.4 I have a multi-module maven project, with some modules producing war
I have a maven multi-module project. One of this modules (compiled as .jar )
I have a multi-module project using Maven. On one of the modules I have
I have a multi module Maven project, one of its modules has the main
I have a multi module maven project. One of the modules is a reusable
I have a maven project with several modules, One of these modules produces a
I have a project that consists of several modules (app. 10-12). I use maven

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.