SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
Introduction to Apache
      Maven 3 and GWT 2.5-rc2



Juan Manuel Rojas R.
http://rhemsolutions.com/   Lima, Perú 12/10/2012
Maven
Is a build automation tool typically used for
Java projects.
Maven dynamically downloads Java libraries
and Maven plug-ins from one or more
repositories such as the Maven 2 Central
Repository search.maven.org
Maven use an XML file to describe the
software project being built, dependencies,
plugins, etc.
Plugins
mvn [plugin-name]:[goal-name]
POM.xml
(Project Object Model)
Installing the JDK
Windows
Download the JDK installer for Windows from http://www.oracle.
com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html

Run the installer

Add the bin directory of the installed JDK to the PATH environment variable, as
described here: http://www.java.com/en/download/help/path.xml

To verify the JDK installation, open the Command Prompt and type
java -version.
Install Apache Maven 3
1. Download http://maven.apache.
org/download.html
2. Unzip
3. Add bin directory to system path
4. In command line write
   mvn --version
The Maven Integration for Eclipse
(m2eclipse, Eclipse m2e)
Update Site
http://download.eclipse.org/technology/m2e/releases

Open eclipse
Help - Install New Software
Add
Name : m2e
Location: http://download.eclipse.org/technology/m2e/releases
Select all and Next
Using the Archetype
mvn archetype:generate -
DarchetypeGroupId=org.codehaus.mojo -
DarchetypeArtifactId=gwt-maven-plugin -
DarchetypeVersion=2.5.0-rc2
New Project
Run dev mode
Import
 in
 Eclipse
If Eclipse ask to install
a connector -> install
then restart eclipse
Add this lines
<extraJvmArgs>-XX:MaxPermSize=512m -Xmx1024m</extraJvmArgs>
<generateDirectory>${project.build.sourceDirectory}</generateDirectory>
<compilerArgument>-proc:none</compilerArgument>
required by JPA
Setting the locale
Add to GWT module
<extend-property name="locale" values="es_PE"/>
(after entry point)

In HTML file Header (src/main/webapp/FirstProject.html)
<meta name="gwt:property" content="locale=es_PE">

Rename
Messages_fr.properties to Messages_es_PE.properties
GWT task
mvn gwt:i18n
Generate Messages.java interfaz from
Messages.properties and Messages_es_PE.
properties

mvn gwt:run
Run Dev Mode. Firefox is recommended and
install the GWT Developer Plugin (don't update
your browser) GWT DevMode Plugin for Firefox 16
Optional parameter
mvn gwt:run -Dgwt.codeServerPort=9997
GWT task (Continuation)
mvn package
Build the war file of the application in target
directory.
GWT dev mode
Super dev mode
New in GWT 2.5. works in any browser, plugins
is not required.

Add to gwt module

<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>



remove or comment the last line in production
Super dev mode (Continuation)
Compile the application for first time
mvn package

Start the code server
mvn gwt:run-codeserver
or
mvn gwt:run-codeserver -Dgwt.codeServerPort=9876
The code server is ready.
Next, visit: http://localhost:9876/
Super dev mode (Continuation)
Add to bookmarks (Drag and Drop)
I am using Chrome
Super dev mode (Continuation)
Start the web server (without stop the server
code)
mvn gwt:run

We use jetty. e.g. Chrome
http://127.0.0.1:8888/FirstProject.html
without
?gwt.codesvr=127.0.0.1:9997(hosted mode)
Super dev mode (Continuation)
Dev Mode On

                          click




Dev Mode Off to clear cache
Super dev mode (Continuation)
Play with some changes to client code and test
with Dev Mode On. Update the browser is no
longer required
Super dev mode (Continuation)
Chrome Developer tools you can see the code
generated
Super dev mode (Continuation)
For see java code




Enable source maps in settings
Super dev mode (Continuation)
Recompile super dev mode with source maps
enabled.Click Dev Mode On
Super dev mode (Continuation)
References
http://en.wikipedia.org/wiki/Apache_Maven

https://developers.google.com/web-
toolkit/articles/superdevmode

http://tbroyer.posterous.com/how-does-gwts-
super-dev-mode-work
http://stackoverflow.
com/questions/11356714/getting-started-with-
the-superdevmode
http://www.youtube.com/watch?v=-xJl22Kvgjg

Más contenido relacionado

La actualidad más candente

Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsJohn Ferguson Smart Limited
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to MavenJoao Pereira
 
Release With Maven
Release With MavenRelease With Maven
Release With Maveneugenn
 
Testing with JUnit 5 and Spring
Testing with JUnit 5 and SpringTesting with JUnit 5 and Spring
Testing with JUnit 5 and SpringVMware Tanzu
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache MavenRajind Ruparathna
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 
Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Robert Scholte
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Robert Scholte
 
Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!Eric Wendelin
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - ExplainedSmita Prasad
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation ToolIzzet Mustafaiev
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for DummiesTomer Gabel
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2andyhot
 

La actualidad más candente (20)

Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yards
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to Maven
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Continuous delivery-with-maven
Continuous delivery-with-mavenContinuous delivery-with-maven
Continuous delivery-with-maven
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Release With Maven
Release With MavenRelease With Maven
Release With Maven
 
Testing with JUnit 5 and Spring
Testing with JUnit 5 and SpringTesting with JUnit 5 and Spring
Testing with JUnit 5 and Spring
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache Maven
 
Introduction to maven
Introduction to mavenIntroduction to maven
Introduction to maven
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)
 
Maven
MavenMaven
Maven
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)
 
Gradle in 45min
Gradle in 45minGradle in 45min
Gradle in 45min
 
Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2
 

Destacado

BluemixでGWTアプリケーションを動かす
BluemixでGWTアプリケーションを動かすBluemixでGWTアプリケーションを動かす
BluemixでGWTアプリケーションを動かすShisei Hanai
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13Fred Sauer
 
instalar postgresql php
instalar postgresql phpinstalar postgresql php
instalar postgresql phprhemsolutions
 
GWT Brand Guidelines 1.1
GWT Brand Guidelines 1.1GWT Brand Guidelines 1.1
GWT Brand Guidelines 1.1Arcbees
 
All about GWT
All about GWTAll about GWT
All about GWTEd Bras
 
GWT Training - Session 2/3
GWT Training - Session 2/3GWT Training - Session 2/3
GWT Training - Session 2/3Faiz Bashir
 
GWT Overview And Feature Preview - SV Web JUG - June 16 2009
GWT Overview And Feature Preview - SV Web JUG -  June 16 2009GWT Overview And Feature Preview - SV Web JUG -  June 16 2009
GWT Overview And Feature Preview - SV Web JUG - June 16 2009Fred Sauer
 
Develop Gwt application in TDD
Develop Gwt application in TDDDevelop Gwt application in TDD
Develop Gwt application in TDDUberto Barbini
 
GWT architecture best practices and lessons learned
GWT architecture best practices and lessons learnedGWT architecture best practices and lessons learned
GWT architecture best practices and lessons learnedpgt technology scouting GmbH
 
Web Development using jQuery
Web Development using jQueryWeb Development using jQuery
Web Development using jQueryBryan Basham
 
Java Generics: a deep dive
Java Generics: a deep diveJava Generics: a deep dive
Java Generics: a deep diveBryan Basham
 
Google Web Toolkit: a case study
Google Web Toolkit: a case studyGoogle Web Toolkit: a case study
Google Web Toolkit: a case studyBryan Basham
 
Overview of JPA (Java Persistence API) v2.0
Overview of JPA (Java Persistence API) v2.0Overview of JPA (Java Persistence API) v2.0
Overview of JPA (Java Persistence API) v2.0Bryan Basham
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScriptBryan Basham
 

Destacado (20)

Hibernate
HibernateHibernate
Hibernate
 
BluemixでGWTアプリケーションを動かす
BluemixでGWTアプリケーションを動かすBluemixでGWTアプリケーションを動かす
BluemixでGWTアプリケーションを動かす
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
 
Ireport
IreportIreport
Ireport
 
Zend_Acl
Zend_AclZend_Acl
Zend_Acl
 
instalar postgresql php
instalar postgresql phpinstalar postgresql php
instalar postgresql php
 
GWT Brand Guidelines 1.1
GWT Brand Guidelines 1.1GWT Brand Guidelines 1.1
GWT Brand Guidelines 1.1
 
All about GWT
All about GWTAll about GWT
All about GWT
 
GWT Training - Session 2/3
GWT Training - Session 2/3GWT Training - Session 2/3
GWT Training - Session 2/3
 
GWT Overview And Feature Preview - SV Web JUG - June 16 2009
GWT Overview And Feature Preview - SV Web JUG -  June 16 2009GWT Overview And Feature Preview - SV Web JUG -  June 16 2009
GWT Overview And Feature Preview - SV Web JUG - June 16 2009
 
GWT = easy AJAX
GWT = easy AJAXGWT = easy AJAX
GWT = easy AJAX
 
Develop Gwt application in TDD
Develop Gwt application in TDDDevelop Gwt application in TDD
Develop Gwt application in TDD
 
Secrets of the GWT
Secrets of the GWTSecrets of the GWT
Secrets of the GWT
 
GWT architecture best practices and lessons learned
GWT architecture best practices and lessons learnedGWT architecture best practices and lessons learned
GWT architecture best practices and lessons learned
 
Web Development using jQuery
Web Development using jQueryWeb Development using jQuery
Web Development using jQuery
 
GWT Reloaded
GWT ReloadedGWT Reloaded
GWT Reloaded
 
Java Generics: a deep dive
Java Generics: a deep diveJava Generics: a deep dive
Java Generics: a deep dive
 
Google Web Toolkit: a case study
Google Web Toolkit: a case studyGoogle Web Toolkit: a case study
Google Web Toolkit: a case study
 
Overview of JPA (Java Persistence API) v2.0
Overview of JPA (Java Persistence API) v2.0Overview of JPA (Java Persistence API) v2.0
Overview of JPA (Java Persistence API) v2.0
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 

Similar a Introduction maven3 and gwt2.5 rc2 - Lesson 01

Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolelliando dias
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxmoirarandell
 
Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management toolRenato Primavera
 
The WordPress developer's toolkit
The WordPress developer's toolkit The WordPress developer's toolkit
The WordPress developer's toolkit Ivelina Dimova
 
Enterprise Messaging Foundations
Enterprise Messaging FoundationsEnterprise Messaging Foundations
Enterprise Messaging FoundationsJeremy Deane
 
Magento 2 Development
Magento 2 DevelopmentMagento 2 Development
Magento 2 DevelopmentDuke Dao
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialRaghavan Mohan
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldDmitry Bakaleinik
 
Install spark on_windows10
Install spark on_windows10Install spark on_windows10
Install spark on_windows10Ajay Ohri
 
Getting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGetting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGirish Bapat
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Appschrisb206 chrisb206
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel ApplicationAfrimadoni Dinata
 
Professional deployment
Professional deploymentProfessional deployment
Professional deploymentIvelina Dimova
 
Omaha (Google Update) server
Omaha (Google Update) serverOmaha (Google Update) server
Omaha (Google Update) serverDmitry Lyfar
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Roberto Franchini
 

Similar a Introduction maven3 and gwt2.5 rc2 - Lesson 01 (20)

Build server
Build serverBuild server
Build server
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docx
 
Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management tool
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
 
Slim3 quick start
Slim3 quick startSlim3 quick start
Slim3 quick start
 
The WordPress developer's toolkit
The WordPress developer's toolkit The WordPress developer's toolkit
The WordPress developer's toolkit
 
Enterprise Messaging Foundations
Enterprise Messaging FoundationsEnterprise Messaging Foundations
Enterprise Messaging Foundations
 
Magento 2 Development
Magento 2 DevelopmentMagento 2 Development
Magento 2 Development
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
 
Install spark on_windows10
Install spark on_windows10Install spark on_windows10
Install spark on_windows10
 
Getting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydbGetting started with agile database migrations for java flywaydb
Getting started with agile database migrations for java flywaydb
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
Dockerize Laravel Application
Dockerize Laravel ApplicationDockerize Laravel Application
Dockerize Laravel Application
 
Professional deployment
Professional deploymentProfessional deployment
Professional deployment
 
Ddev workshop t3dd18
Ddev workshop t3dd18Ddev workshop t3dd18
Ddev workshop t3dd18
 
Omaha (Google Update) server
Omaha (Google Update) serverOmaha (Google Update) server
Omaha (Google Update) server
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!
 

Introduction maven3 and gwt2.5 rc2 - Lesson 01