Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuseQuickStart_pt
Articles
Articles_de
Articles_pt




JSPWiki v2.2.33

[RSS]


Hide Menu

DevelopmentEnvironment_pt


Difference between version 2 and version 1:

At line 1 changed 1 line.
This page describes how to setup your development environment to compile/deploy [AppFuse] or [StrutsResume] from the command line. After setting this up, you might want to checkout [HowTo Run Ant in Eclipse|AppFuseEclipse]. This is how I currently have things setup and what I advise clients to use when we use AppFuse as a baseline for webapp development.
Esta página descreve com podemos instalar um ambiente de desenvolvimento para compilar/publicar [AppFuse] ou [StrutsResume] da linha de comando. Após instalar isto, pode ser que você queira checar [Como rodar o Ant no Eclipse|AppFuseEclipse_pt]. Esta é a maneira que tenho atualmente instalado o AppFuse, quando o utilizo como uma linha base para desenvolvimento de aplicações web.
At line 3 changed 5 lines.
!Table of Contents
* [1] Download - links to download the JDK, J2EE, Tomcat, Ant and MySQL
* [2] Install - detailed instructions on where to extract/install all of the above packages
* [3] Configure - how to configure your environment variables
* [4] Additional Tips - other tools I recommend using
!Tabela de Conteúdos
* [1] Download - links para baixar o JDK, J2EE, Tomcat, Ant e MySQL
* [2] Instação - instruções detalhadas de onde extrair/instalar todos os pacotes acima
* [3] Configuração - como configurar suas variáveis de ambiente
* [4] Dicas Adicionais - outras ferramentas que recomendo o uso
At line 10 changed 4 lines.
# Download the latest JDK (J2SE SDK) from [http://java.sun.com]. As of 07/12/2005, this is [1.4.2_08|http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2sdk-1.4.2_08-oth-JPR&SiteId=JSC&TransactionId=noreg]. AppFuse should work with 1.5 if you'd like to use that. Here's [my experience|http://raibledesigns.com/page/rd?anchor=playing_with_jdk_5_0]. Note that Cactus has been removed from AppFuse in 1.6 and Cargo (used for testing JSPs) doesn't work with Tomcat 5.5.x yet.
# Download the [latest Tomcat release|http://jakarta.apache.org/site/binindex.cgi] from [http://jakarta.apache.org/tomcat]. At the time of this writing, it's [5.0.28|http://www.apache.org/dist/jakarta/tomcat-5/v5.0.28/]. __DON'T__ get the LE version or you'll have to add DBCP (database connection pool) and JavaMail (for e-mail) JARs.
# Download the [latest Ant release|http://ant.apache.org/bindownload.cgi] from [http://ant.apache.org]. AppFuse 1.6+ requires 1.6.2 or greater.
# Download the [latest MySQL release|http://dev.mysql.com/downloads/mysql/4.0.html] from [http://www.mysql.com]. Currently, this is 4.0.21.
# Baixe a última versão da JDK (J2SE SDK) de [http://java.sun.com]. Já que é 07/12/2005, a versão é [1.4.2_08|http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2sdk-1.4.2_08-oth-JPR&SiteId=JSC&TransactionId=noreg]. O AppFuse funciona com o 1.5 se você quiser utilizá-lo. Aqui está [minha experiência|http://raibledesigns.com/page/rd?anchor=playing_with_jdk_5_0]. Note que o Cactus foi removido do AppFuse na versão 1.6 e o Cargo (utilizado para testes JSPs) ainda não funciona com o Tomcat 5.5.x.
# Baixe o [último release do Tomcat|http://jakarta.apache.org/site/binindex.cgi] do [http://jakarta.apache.org/tomcat]. Atualmente, enquanto escrevo este, é [5.0.28|http://www.apache.org/dist/jakarta/tomcat-5/v5.0.28/]. __NÃO__ baixe a versão LE ou você terá que adicionar os JARs para o DBCP (pool de conexão de banco de dados) e para o JavaMail (para e-mail) JARs.
# Baixe o [último release do Ant|http://ant.apache.org/bindownload.cgi] do
[http://ant.apache.org]. AppFuse 1.6+ necessita 1.6.2 ou maior.
# Baixe o [último release do MySQL|http://dev.mysql.com/downloads/mysql/4.0.html] do [http://www.mysql.com]. Atualmente, é o 4.0.21.
At line 15 changed 1 line.
I usually put all these downloads in a "Downloads" folder - in fact, I plan on starting to pack around a CD with all of these libraries on them - nice to have when traveling to new clients and networks are slow.
Eu geralmente coloco todos estes downloads em uma pasta "Downloads" - na verdade, estou planejando empacotar um CD com todas estas bibliotecas nele - bom para se ter quando se está viajando para novos clientes e a rede é lenta.
At line 17 changed 2 lines.
!!Install [#2]
Make sure you have [WinZip|http://winzip.com] installed (for Windows) or gnutar for OS X before installing these packages.
!!Instalação [#2]
Certifique-se que você tem o [WinZip|http://winzip.com] instalado (para Windows) ou gnutar para OS X antes de instalar estes pacotes.
At line 20 changed 7 lines.
# Create a "Tools" and "SDKs" folder on your hard drive. On Windows, I create these at c:\Tools and c:\SDKs. On *nix, I usually do /opt/dev/tools and opt/dev/sdks.
# Create Environment variables for these folders - SDKS_HOME and TOOLS_HOME (optional)
# Install the J2SE SDK (a.k.a. JDK) in the SDKs directory - keeping the directory names intact.
# Install Tomcat in the Tools directory - I usually name the install directory "jakarta-tomcat-x" where x is the current version (i.e. 5.0.28).
# Unzip/Install Ant in the Tools directory - "apache-ant-x" is what I use for the directory name.
# Install MySQL in the Tools directory. I usually just leave it named "mysql".
# Create a "Source" directory on your hard drive (this is where we'll put all the source code for our projects). On *nix, I usually create a "dev" folder in my home directory.
# Crie as pastas "Tools" e "SDKs" em seu HD. No Windows, crio eles em c:\Tools e c:\SDKs. Em *nix, eu geralmente os crio em /opt/dev/tools e opt/dev/sdks.
# Crie variáveis de ambiente para estas pastas - SDKS_HOME e TOOLS_HOME (opcional)
# Instale o J2SE SDK (a.k.a. JDK) no diretório SDKs - mantendo os nomes dos diretórios intactos.
# Instale o Tomcat no diretório Tools - Eu geralmente nomeio o diretório de instalação como "jakarta-tomcat-x" onde x é a versão corrente (i.e. 5.0.28).
# Descompacte/Instale o Ant no diretório Tools - "apache-ant-x" é o que eu utilizo para o nome do diretório.
# Instale o MySQL no diretório Tools. Eu geralmente o nomeio "mysql".
# Crie um diretório "Source" em seu HD (aqui é onde colocaremos todo o nosso código para os nossos projetos). Em *nix, geralmente crio uma pasta "dev" em meu diretório home.
At line 28 changed 1 line.
At this point, you should have a directory structure that looks something like the following:
Neste ponto, você deve ter uma estrutura de diretório que parece com o seguinte:
At line 38 changed 1 line.
Now we'll configure all these tools so that your Operating System knows they're installed.
Agora vamos configurar todas estas ferramentas para que o nosso Sistema Operacional saiba que elas estão instaladas.
At line 40 changed 1 line.
!!Configure [#3]
!!Configuração [#3]
At line 42 changed 1 line.
I'll only show a Windows example and I'll assume the *nix folks are smart enough to figure it out for their system.
Vou mostrar somente um exemplo assumindo que os caras de *nix são espertos o suficiente para fazer tudo funcionar em seu sistema operacional.
At line 44 changed 4 lines.
# To set Environment Variables in Windows, either go to Control Panel -> System or right-click My Computer -> Properties.
# Click on the __Advanced__ Tab and then click the __Environment Variables__ button.
# Put focus on the second box (System Variables) by clicking on one of the existing values.
# Enter the following variables:
# Para setar as variáveis de ambiente no Windows, ou você vai para o Painel de Controle -> Sistema ou clica com o botão direito no Meu Computador -> Propriedades, ou ainda aperte o botão Windows+Pause.
# Clique na tab __Avançado__ e então clique no botão __Variáveis de Ambiente__.
# Coloque o foco na segunda caixa (Variáveis de Sistema) clicando em um dos valores existentes.
# Entre com as seguintes variáveis:
At line 55 changed 1 line.
** Append to the PATH variable: %JAVA_HOME%\bin;%ANT_HOME%\bin;%CATALINA_HOME%\bin;%MYSQL_HOME%\bin
** Adicione à variável PATH: %JAVA_HOME%\bin;%ANT_HOME%\bin;%CATALINA_HOME%\bin;%MYSQL_HOME%\bin
At line 57 changed 1 line.
You should now be able to open a command prompt and type "java -version", "ant -version" or "mysql" and not get errors.
Você agora já pode abrir a linha de comandos e digitar "java -version", "ant -version" ou "mysql" e não ter nenhum erro.
At line 59 changed 1 line.
!!Additional Tips [#4]
!!Dicas Adicionais [#4]
At line 61 changed 1 line.
* I use [Cygwin|http://www.cygwin.com] on Windows for running Ant and doing all command line things. I install it in %TOOLS_HOME%\cygwin. In my %HOME%\.profile file, I have the following items that might be useful:
* Eu utilizo [Cygwin|http://www.cygwin.com] no Windows para rodar o Ant e fazer todas as coisas necessárias em linhas de comando. Eu o instalo em %TOOLS_HOME%\cygwin. No meu arquivo %HOME%\.profile, adiciono os seguintes itens, que podem ser úteis:
At line 66 changed 1 line.
* I use [Eclipse|http://www.eclipse.org] on Windows for editing .java files. I install it in %TOOLS_HOME%\eclipse. I still use Ant to build and deploy, but the CVS versions of AppFuse and StrutsResume does contain the .classpath and .project files for Eclipse. Additionally, AppFuse has project files for [Intellij's IDEA|http://www.intellij.com] (version 4.5+). To see how you can run Ant in Eclipse, check out my [AppFuse with Eclipse HowTo|AppFuseEclipse].
* Eu uso [Eclipse|http://www.eclipse.org] em Windows para edição de arquivos .java. Eu o instalo em %TOOLS_HOME%\eclipse. Eu ainda utilizo Ant para construção e publicação, mas as versões em CVS do AppFuse e StrutsResume ainda contém os arquivos .classpath e .project para o Eclipse. Adicionalmente, AppFuse possui arquivos de projetos para [Intellij's IDEA|http://www.intellij.com] (versão 4.5+). Para ver como se pode rodar o Ant no Eclipse, veja meu [Como rodar o Ant no Eclipse|AppFuseEclipse_pt].
At line 68 changed 1 line.
If you're starting work at a new client, I also recommend you do the following to help your development process become more efficient. Most of my clients in the last couple years have not had these in place, that's why I recommend them here.
Se você está começando a trabalhar com um novo cliente, ainda recomento para você fazer o seguinte para ajudar seu processo de desenvolvimento a se tornar mais eficiente. A maioria de meus clientes nos últimos anos não tiveram isto em nenhum lugar, por isso estou recomendando isso aqui.
At line 70 changed 5 lines.
# Setup a source control system. I prefer <a href="http://cvshome.org">CVS</a> because I'm most familiar with it. A nice addon is [CVS Spam|http://www.badgers-in-foil.co.uk/projects/cvsspam/] for HTML-formatted check-in notifications.
# Setup a bug tracking system. Popular (free) choices are [Bugzilla|http://www.bugzilla.org/] and [Scarab|http://scarab.tigris.org/]. The best one I've seen is [JIRA|http://www.atlassian.com/software/jira/] ([demo|http://jira.atlassian.com/secure/Dashboard.jspa]), but I've yet to convince a client to shell out the $800 for it.
# Setup a Wiki. My favorite is [JSPWiki|http://www.jspwiki.org] - which is what this site uses. You can also [download this template|http://www.raibledesigns.com/wiki/templates/redman.tar.gz] if you like.
# Setup a development box to host the source control system, the bug tracking system, and a wiki. Install Tomcat on this box and [Anthill|http://www.urbancode.com/projects/anthill/default.jsp] for automated testing (I run both AppFuse and Struts-Resume on Anthill at home).
# (optional) Install [Roller|http://rollerweblogger.org/page/project] and use it to report your daily status and issues. This will allow your client (or supervisor) to track your progress.
# Instale um sistema de controle de versão. Eu prefiro <a href="http://cvshome.org">CVS</a> porque já sou mais acostumado a ele. Um bom addon é [CVS Spam|http://www.badgers-in-foil.co.uk/projects/cvsspam/] para notificações de check-in formatadas em HTML.
# Instale um sistema de rastreamento de bugs. Escolhas populares (free) são o [Bugzilla|http://www.bugzilla.org/] e [Scarab|http://scarab.tigris.org/]. O melhor que já vi é o [JIRA|http://www.atlassian.com/software/jira/] ([demo|http://jira.atlassian.com/secure/Dashboard.jspa]), mas ainda não convenci um cliente a pagar U$800 por ele.
# Instale um Wiki. Meu favorito é o [JSPWiki|http://www.jspwiki.org] - o qual este site utiliza. Você pode também [baixar este template|http://www.raibledesigns.com/wiki/templates/redman.tar.gz] se você gostar.
# Instale uma ''development box'' para hospedar o sistema de controle de versões, o sistema de rastreamento de bugs e o wiki. Instale o Tomcat nesta ''box'' e [Anthill|http://www.urbancode.com/projects/anthill/default.jsp] para testes automatizados (rodo tanto o AppFuse quanto Struts-Resume no Anthill em casa).
# (opcional) Instale [Roller|http://rollerweblogger.org/page/project] e o utilize para relatar o status diário e edições. Isto vai permitir a seu cliente (ou supervisor) acompanhar o seu progresso.

Back to DevelopmentEnvironment_pt, or to the Page History.