Organizando a casa

789 views
729 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
789
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Organizando a casa

  1. 1. Organizando a casaJosino Rodrigues Neto josino.neto@rise.com.br josinon@gmail.com
  2. 2. O que vamos usar• Java• Maven• Tomcat 6• Hudson• Artifactory• SVN
  3. 3. Instalando o Java• Instalem o JDK nas suas máquinas• Adicionem a variável de ambiente JAVA_HOME• Adicionem “%JAVA_HOME%bin” no final da variável PATH• Executem no console o comando “javac”
  4. 4. Instalando o Maven• Extraia a pasta do maven em algum lugar no seu computador• Adicione a variável de ambiente MAVEN_HOME apontando para a pasta de instalação do maven• Adicionem “%MAVEN_HOME%bin” no final da variável PATH• Abra o prompt e execute “mvn -version”
  5. 5. Criando um projeto maven“mvn archetype:create -DgroupId=br.com.rise-DartifactId=AppMaven”“cd AppMaven”“mvn package”“cd AppMaven/target”“java –cp java -cp AppMaven-1.0-SNAPSHOT.jarbr.com.rise.App”
  6. 6. Criando um projeto maven“mvn site”“mvn eclipse:eclipse”Importem o projeto para o eclipse
  7. 7. Criação fácil de infra-estruturamvn archetype:create-DgroupId=com.ts.sample.s2 -DartifactId=starter-DarchetypeGroupId=org.apache.struts-DarchetypeArtifactId=struts2-archetype-starter-DarchetypeVersion=2.0.11.2-SNAPSHOT-DremoteRepositories=http://people.apache.org/maven-snapshot-repository
  8. 8. Um pouco do POM<dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.15</version> </dependency><dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>3.3.2.GA</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>3.4.0.GA</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-commons-annotations</artifactId> <version>3.3.0.ga</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.4.0.GA</version> </dependency>
  9. 9. <repositories> <repository> <id>central</id> <url>http://localhost:8080/artifactory/repo</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>snapshots</id> <url>http://localhost:8080/artifactory/repo</url> <releases> Maven com <enabled>false</enabled> </releases> </repository> artifactory, fácil de configurar</repositories><pluginRepositories> <pluginRepository> <id>central</id> <url>http://localhost:8080/artifactory/plugins-release</url> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> (Façam Ctrl+C e Ctrl+V disso) <pluginRepository> <id>snapshots</id> <url>http://localhost:8080/artifactory/plugins-snapshot</url> <releases> <enabled>false</enabled> </releases> </pluginRepository></pluginRepositories>
  10. 10. Vamos à prática ...

×