Maven 1

Can't use two times a multiprojects in 2 differents goals

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.1-beta-3
  • Fix Version/s: 1.1-beta-3
  • Component/s: None
  • Labels:
    None
  • Environment:
    1.1-beta-3 from trunk
  • Testcase included:
    yes
  • Number of attachments :
    0

Description

in the plugins-site project (in plugins and in the sandbox) we have two goals:

plugins:build-all-sites which calls multiproject:site (to create the main site) and the goal "site" through a multiproject:goal (to create each plugin site)
plugins:deploy-all-sites which calls site:${maven.site.deploy.method}deploy (to deploy the main site) and the goal site:${maven.site.deploy.method}deploy through multiproject:goal (to deploy each plugin site)

In the plugins root project we have the same goals which call the ones in the plugins-site (with maven:maven)

I tried to create a goal to call these two goals successively.

<goal 
  name="plugins:build-and-deploy-all-sites" 
  description="Build and deploy the web site for all plugins and for the root site" 
  prereqs="plugins:build-all-sites,plugins:deploy-all-sites"/>
<goal 
  name="plugins:build-and-deploy-all-sites2" 
  description="Build and deploy the web site for all plugins and for the root site">
  <attainGoal name="plugins:build-all-sites"/>
  <attainGoal name="plugins:deploy-all-sites"/>
</goal>

If I call these goals from the project plugins-site or if I call the 2 goals from the command line (maven plugins:build-all-sites plugins:deploy-all-sites) I receive this error :

BUILD FAILED
File...... file:/d:/Data/maven-1/cache/maven-multiproject-plugin-1.5-SNAPSHOT/plugin.jelly
Element... maven:param-check
Line...... 215
Column.... -1
A goal to run must be specified, e.g.
maven -Dgoal=clean multiproject:goal

This error happens when the multiproject is called in plugins:deploy-all-sites to deploy all plugins sites.
I displayed the value of the variable goal just before the attainGoal and the value is correct

If we run the goals build-and-deploy-all-sites and build-and-deploy-all-sites2 from the plugins root we have the same error
But if we call "maven plugins:build-all-sites plugins:deploy-all-sites" it works.

Activity

Hide
Arnaud Heritier added a comment -

Another weird behaviour :
If we have :

<goal name="plugins:build-all-sites" description="Create the web site for all plugins and for the root site">
    <!-- We don't use the aggregate mode thus we manually generate all sites -->
    <j:set var="goal" value="site"/>
    <attainGoal name="multiproject:goal"/>
    <!-- And we generate & deploy the root site -->
    <attainGoal name="multiproject:site"/>
  </goal>

instead of

<goal name="plugins:build-all-sites" description="Create the web site for all plugins and for the root site">
    <!-- And we generate & deploy the root site -->
    <attainGoal name="multiproject:site"/>
    <!-- We don't use the aggregate mode thus we manually generate all sites -->
    <j:set var="goal" value="site"/>
    <attainGoal name="multiproject:goal"/>
  </goal>

we have this error :

BUILD FAILED
File...... file:/D:/OSS/Maven/1.X/SCM/plugins-sandbox/trunk/maven.xml
Element... maven:maven
Line...... 32
Column.... -1
Unable to obtain goal [plugins:build-all-sites] -- file:/d:/Data/maven-1/cache/maven-site-plugin-1.7-SNAPSHOT/plugin.jelly:38:-1: <attainGoal> No Project available
    Total time   : 2 minutes 8 seconds
    Finished at  : Saturday, March 11, 2006 12:52:28 AM CET

But in the second case, the linkcheck isn't generated for plugins

Show
Arnaud Heritier added a comment - Another weird behaviour : If we have :
<goal name="plugins:build-all-sites" description="Create the web site for all plugins and for the root site">
    <!-- We don't use the aggregate mode thus we manually generate all sites -->
    <j:set var="goal" value="site"/>
    <attainGoal name="multiproject:goal"/>
    <!-- And we generate & deploy the root site -->
    <attainGoal name="multiproject:site"/>
  </goal>
instead of
<goal name="plugins:build-all-sites" description="Create the web site for all plugins and for the root site">
    <!-- And we generate & deploy the root site -->
    <attainGoal name="multiproject:site"/>
    <!-- We don't use the aggregate mode thus we manually generate all sites -->
    <j:set var="goal" value="site"/>
    <attainGoal name="multiproject:goal"/>
  </goal>
we have this error :
BUILD FAILED
File...... file:/D:/OSS/Maven/1.X/SCM/plugins-sandbox/trunk/maven.xml
Element... maven:maven
Line...... 32
Column.... -1
Unable to obtain goal [plugins:build-all-sites] -- file:/d:/Data/maven-1/cache/maven-site-plugin-1.7-SNAPSHOT/plugin.jelly:38:-1: <attainGoal> No Project available
    Total time   : 2 minutes 8 seconds
    Finished at  : Saturday, March 11, 2006 12:52:28 AM CET
But in the second case, the linkcheck isn't generated for plugins
Hide
Lukas Theussl added a comment -

Arnaud: I cannot reproduce any of the above, is that still an issue for you?

Show
Lukas Theussl added a comment - Arnaud: I cannot reproduce any of the above, is that still an issue for you?
Hide
Arnaud Heritier added a comment -

Neither do I. I can't reproduce it.

Show
Arnaud Heritier added a comment - Neither do I. I can't reproduce it.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: