[Building Sakai] master pom and passing down profiles

Matthew Jones matthew at longsight.com
Thu May 3 13:55:31 PDT 2012


You must be reverting to the case where
"All profiles that are active by default are automatically deactivated when
a profile in the POM is activated on the command line or through its
activation config. " -
https://maven.apache.org/guides/introduction/introduction-to-profiles.html

In order to avoid this in many tools, we opted to make profile activation
via property rather than activating via profile.

So for instance in evaluation
<id>sakai2.9</id>
  <activation>
      <property><name>sakai2.9</name></property>
</activation>
. . .
The pom has an activation property of sakai2.9

So to avoid disabling the defaults (if you don't want to disable the
defaults) you could activate this with the property -Dsakai2.9

You can also pass in all of the defaults in the profile like
-Pdefault1,default2,default3,sakai2.9

Then it will make sure to reactivate those default profiles.

Otherwise you'd probably have to build evaluation all by itself, maybe with
a separate top level pom with just the <module>pack</module> and you might
get evaluation. All pack (bin) really does though is a sakai deploy to a
tmp directory, and creates an archive out of it which is essentially this
alias (which when run in a tool folder deploys to a tmp directory and tgz's
up that tmp directory)

alias c="export TOMTMP=/tmp/`date +\%N` && mvn -Dmaven.tomcat.home=\$TOMTMP
clean install sakai:deploy && printf \"Deployed to %s\n\" \$TOMTMP && pushd
. && cd \$TOMTMP && tar zcvf \$TOMTMP.tgz * && popd && printf \"Created
%s\n\" \$TOMTMP.tgz"

On Thu, May 3, 2012 at 4:20 PM, Adam York <yorkadam at umich.edu> wrote:

> I'm trying to build sakai 2.9 vanillia with two contrib tools (evaluation
> and hierarchy) and then packing them up using the pack tool.
>
> *I was wondering if there was anyway using the master pom to build sakai
> while also passing down profiles to specific tools?  *We'd like to avoid
> having to make any changes to the contrib tools we are building but it's
> currently using another profile as default that are invoked when we build
> via the master pom. This occurs even if I globally pass down the right
> profile by the command line....of course that isn't a good idea either
> because I don't want to accidentally call anything but the default profiles
> in the other tools I am building.
>
> master pom...
> //snip
> <profile>
>             <id>evaluation</id>
>             <activation>
>                 <activeByDefault>true</activeByDefault>
>             </activation>
>             <modules>
> *                <module>evaluation</module>  <= defaults to sakai2.7
> profile, we need to use sakai2.9*
>                 <module>hierarchy</module>
>             </modules>
>         </profile>
> //snip
>
> I know there is a pom guru out there somewhere....
>
> --
> Thank You,
>
> Adam York
> Teaching & Learning
> University of Michigan
> Information and Technology Services
> (734)615-2549
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120503/adb9bf09/attachment.html 


More information about the sakai-dev mailing list