On Jun 24, 2008, at 7:47 AM, Aaron Evans wrote:

This would be with my old maven 1 build (still on JS 2.1, haven't had
time to upgrade).

If in 2.1.3 modifying the existing portlet.xml in place works, that
will be fine.

The only problem with that is that in order to automate that task as
part of our build process, we'll have to take a copy of portlet.xml
and apply our change, save that in our SVN repo and use maven or ant
to copy it out to the installed jetspeed instance post-install.  This
is fine except we'll have to remember to re-apply our change for every
subsequent jetspeed upgrade.

If only ant/maven could handle XML/DOM manipulation. :)

One source of confusion for me though was in my generated portal
project (maven1 genapp goal), I can find no trace of the
jetspeed-layouts app. So I couldn't even modify it before I do the
final install.

Does the maven build just pull down a copy of the jetspeed layouts war
from a maven repository as part of the installation?

yes, it will pull it out of your local repository first

the goals j2:pam.layoutdeploy is available to you:

  <goal name="j2:pam.layoutdeploy">
    <j:set var="maven.war.final.name" value="jetspeed-layouts"/>
    <attainGoal name="j2:localdeploy"/>
  </goal>

as is a more generic:

  <goal name="j2:localdeploy">
      <j:set var="j2.war.groupId" value="${plugin.groupId}"/>
      <j:set var="j2.war.version" value="${jetspeed.version}"/>
      <j:set var="isLocalWarDeploy" value="true"/>
      <attainGoal name="j2:warDeploy"/>
  </goal>

so you could write your own goal in your custom maven.xml:

  <goal name="custom-localdeploy">
      <j:set var="maven.war.final.name" value="jetspeed-layouts"/>
      <j:set var="j2.war.groupId" value="${plugin.groupId}"/>
      <j:set var="j2.war.version" value="${jetspeed.version}"/>
      <j:set var="isLocalWarDeploy" value="true"/>
      <attainGoal name="j2:warDeploy"/>
  </goal>

Im looking at the j2:warDeploy goal, it does some useful tasks, like infusing the jetspeed container
however it requires properties to be set

<!-- warDeploy allows you to deploy arbitrary wars to the portal deploy folder, optionally downloading it from remote repositories if not available yet
       Required properties to set:
       - maven.war.final.name
       - j2.war.groupId
       - j2.war.version
    -->
  <goal name="j2:warDeploy">


You may want to just take the j2:warDeploy goal, copy it into your custom maven.xml, and modify it for your needs

Reply via email to