<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Oct 9, 2008 at 4:15 AM, Dan Allen <span dir="ltr">&lt;<a href="mailto:dan.j.allen@gmail.com">dan.j.allen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The seam script (which we all call seam-gen) just got another upgrade<br>
tonight, this time focused on the build. Up to this point, the seam<br>
script has been a couple steps behind other project generation tools,<br>
such as Grails, because the user has been locked into having to run it<br>
from a Seam distribution directory. You may know from using Grails<br>
that their approach is to add grails to your PATH and set GRAILS_HOME<br>
and use it like a system command. I have an approach that falls<br>
somewhere in between and frankly is more intelligent.<br>
<br>
First and foremost, i have unlocked us from having to run the seam<br>
script from the Seam distribution directory. Now you can run it out of<br>
any directory on the computer and it will work as it does today<br>
(meaning your current working directory can be anywhere). Internally<br>
it figures out your current directory and the SEAM_HOME environment<br>
variable relative to the location of the script (there is really no<br>
reason to make the user set this environment variable, that is just a<br>
stupid requirement). More on the current working directory in a<br>
second. Btw, I also put in a check that the user has JAVA_HOME<br>
pointing to a JDK because otherwise the Ant build is going to fail<br>
anyway.</blockquote><div><br>Do you mean that the SEAM_HOME is figured out and set based on your current directory?&nbsp; I think you are missing a &quot;sets&quot; in there :-)&nbsp; This seems like a really good way to support&nbsp; multiple projects with seam gen without having to figure out some verbose arguments for the script in distribution directory.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
As you may know, I have been moving build.properties into the project<br>
as the file seam-gen.properties since last spring (really since Seam<br>
2.0). We just haven&#39;t done anything with it...until now. Here is the<br>
big enhancement.<br>
<br>
If your current working directory happens to be a directory that has a<br>
seam-gen.properties file AND and build.xml file, then the seam script<br>
recognizes that you are in a Seam project and operates using the<br>
seam-gen.properties file in that directory rather than the<br>
seam-gen/build.properties from the Seam distribution. If you put the<br>
seam script on your PATH, then you can simply enter a project and run<br>
&quot;seam generate&quot;. If you are too lazy to put it on your PATH, then you<br>
have to run something like &quot;~/projects/seam-trunk/seam generate&quot;.<br>
Either way, it will work. Btw, I also fixed the Windows batch script<br>
(which was really no fun at all. Windows sucks. It&#39;s like playing with<br>
those really big legos that you give 3 year olds).</blockquote><div><br>:-)<br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>

<br>
On top of that, the outputs after the generate command are aware of<br>
whether you are running the seam script outside a project or inside a<br>
project and thus tell you to use seam or ant respectively. For<br>
example, if you run &quot;seam generate&quot; from within a project, it will<br>
tell you to run &quot;ant restart&quot; (instead of &quot;seam restart&quot;) after it is<br>
done its work (no need to keep having to go through the seam script).</blockquote><div><br>Can a user also use &quot;seam restart&quot;?&nbsp; Some users may be used to using the seam script.<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
The next steps I guess are for JBossTools to use the<br>
seam-gen.properties inside the project (if it doesn&#39;t already). As far<br>
as JBossTools is concerned, it doesn&#39;t really care where the<br>
properties file is because it has the advantage of being aware of the<br>
workspace. Most of the upgrades here had to happen in the seam script.<br>
<br>
I am going to take this message and the previous one about the<br>
seam-gen upgrades and do a blog entry on <a href="http://in.relation.to" target="_blank">in.relation.to</a> in a day or<br>
so.<br>
<br>
Cheers,<br>
<br>
Dan<br>
<br>
--<br>
Dan Allen<br>
Software consultant | Author of Seam in Action<br>
<br>
<a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
<br>
NOTE: While I make a strong effort to keep up with my email on a daily<br>
basis, personal or other work matters can sometimes keep me away<br>
from my email. If you contact me, but don&#39;t hear back for more than a week,<br>
it is very likely that I am excessively backlogged or the message was<br>
caught in the spam filters. &nbsp;Please don&#39;t hesitate to resend a message if<br>
you feel that it did not reach my attention.<br>
_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>blog: <a href="http://in.relation.to/Bloggers/Jay">http://in.relation.to/Bloggers/Jay</a><br>
</div>