22/10/15 Gradle 2. Gradle. Gradle is an advanced build tool of general purpose base on Groovy

Documentos relacionados
Transcript name: 1. Introduction to DB2 Express-C

Pesquisa Qualitativa do Início ao Fim (Métodos de Pesquisa) (Portuguese Edition)

PL/SQL: Domine a linguagem do banco de dados Oracle (Portuguese Edition)

As 100 melhores piadas de todos os tempos (Portuguese Edition)

Um olhar que cura: Terapia das doenças espirituais (Portuguese Edition)

TDD Desenvolvimento Guiado por Testes (Portuguese Edition)

Dermatologia Clínica. Guia Colorido Para Diagnostico e Tratamento (Em Portuguese do Brasil)

O guia do enxoval do bebê nos Estados Unidos: Dicas e segredos da maior especialista de compras em Miami, Orlando e Nova York (Portuguese Edition)

Curso Completo de Memorização (Portuguese Edition)

Guia para Formacao de Analistas de Processos: Gestão Por Processos de Forma Simples (Portuguese Edition)

Como Falar no Rádio - Prática de Locução Am e Fm (Portuguese Edition)

A dança do corpo vestido: Um estudo do desenvolvimento do figurino de balé clássico até o século XIX (Portuguese Edition)

How to use the system. Meike Borstelmann

Comportamento Organizacional: O Comportamento Humano no Trabalho (Portuguese Edition)

Planning for and Managing Devices in the Enterprise: Enterprise Management Suite (EMS) & On-Premises Tools (20398)

Software Testing with Visual Studio 2013 (20497)

Biscuit - potes (Coleção Artesanato) (Portuguese Edition)

O sistema único de assistência social no Brasil: uma realidade em movimento (Portuguese Edition)

Aprendi A Fazer Sexo Na Bíblia (Portuguese Edition)

Meditacao da Luz: O Caminho da Simplicidade

Os 7 Hábitos das Pessoas Altamente Eficazes (Portuguese Edition)

Transformando Pessoas - Coaching, PNL e Simplicidade no processo de mudancas (Portuguese Edition)

O Livro de Receitas do Menino Maluquinho - Com as receitas da Tia Emma (Portuguese Edition)

Ética na Propaganda (Portuguese Edition)

PL/SQL: Domine a linguagem do banco de dados Oracle (Portuguese Edition)

Labrador: Guia prático ilustrado (Coleção Pet Criador) (Portuguese Edition)

Dilogo Brasil Livro Texto: Curso Intensivo De Portugues Para Estrangeiros (Dialogo Brasil) (Portuguese Edition)

Estatística Aplicada: Administração, Economia e Negócios (Portuguese Edition)

Como testar componentes eletrônicos - volume 1 (Portuguese Edition)

O princípio 80/20: Os segredos para conseguir mais com menos nos negócios e na vida (Portuguese Edition)

Medicina e Meditação - Um Médico Ensina a Meditar (Portuguese Edition)

A Bíblia do Pregador - Almeida Revista e Atualizada: Com esboços para sermões e estudos bíblicos (Portuguese Edition)

Holding Familiar: visão jurídica do planejamento societário, sucessório e tributário (Portuguese Edition)

A necessidade da oração (Escola da Oração) (Portuguese Edition)

Métodos Formais em Engenharia de Software. VDMToolTutorial

Já Chegou Aos Confins Da Terra. E Agora? (Portuguese Edition)

A ENTREVISTA COMPREENSIVA: UM GUIA PARA PESQUISA DE CAMPO (PORTUGUESE EDITION) BY JEAN-CLAUDE KAUFMANN

Gestão da comunicação - Epistemologia e pesquisa teórica (Portuguese Edition)

Bíblia do Obreiro - Almeida Revista e Atualizada: Concordância Dicionário Auxílios Cerimônias (Portuguese Edition)

CIS 500 Software Foundations Fall September(continued) IS 500, 8 September(continued) 1

Introdução A Delphi Com Banco De Dados Firebird (Portuguese Edition)

O candomblé e seus orixás (Coleção Autoconhecimento) (Portuguese Edition)

As revoluções russas e o socialismo soviético (Portuguese Edition)

Alfabetizar letrando na biblioteca escolar (Coleção biblioteca básica de alfabetização e letramento) (Portuguese Edition)

Poder sem limites - o caminho do sucesso pessoal pela programação neurolinguística

ATLAS COLORIDO DE ANATOMIA VETERINáRIA DE EQUINOS (EM PORTUGUESE DO BRASIL) BY STANLEY H. ASHDOWN RAYMOND R. DONE

Introdução A Delphi Com Banco De Dados Firebird (Portuguese Edition)

Todos os caminhos levam a Roma (Portuguese Edition)

TDD Desenvolvimento Guiado por Testes (Portuguese Edition) Kent Beck

Mitologia - Deuses, Heróis e Lendas (Portuguese Edition)

Ganhar Dinheiro Em Network Marketing (Portuguese Edition)

Abraçado pelo Espírito (Portuguese Edition)

Como escrever para o Enem: roteiro para uma redação nota (Portuguese Edition)

Atividade Física Adaptada: Qualidade de Vida para Pessoas com Necessidades Especiais (Portuguese Edition)

Bíblia do Obreiro - Almeida Revista e Atualizada: Concordância Dicionário Auxílios Cerimônias (Portuguese Edition)

Livro do Desassossego

O Jardim Secreto - Coleção Reencontro Infantil (Em Portuguese do Brasil)

Mitologia - Deuses, Heróis e Lendas (Portuguese Edition)

Conversação Para Viagem - Inglês (Michaelis Tour) (Portuguese Edition)

Bíblia de Estudo Conselheira - Gênesis: Acolhimento Reflexão Graça (Portuguese Edition)

Guerra Irregular: terrorismo, guerrilha e movimentos de resistência ao longo da história (Portuguese Edition)

Evangelho Segundo O Espiritismo (Em Portugues do Brasil)

Bases Bioquímicas e Fisiológicas da Nutrição: nas Diferentes Fases da Vida, na Saúde e na Doença (Portuguese Edition)

Grandes Mistérios da História: A teoria da conspiração e os segredos por trás dos acontecimentos (Portuguese Edition)

Farmacologia na Pratica de Enfermagem (Em Portuguese do Brasil)

Java para iniciantes (Portuguese Edition)

Vaporpunk - A fazenda-relógio (Portuguese Edition)

Medicina Integrativa - A Cura pelo Equilíbrio (Portuguese Edition)

Erros que os Pregadores Devem Evitar (Portuguese Edition)

Pesquisa de Marketing: Uma Orientação Aplicada (Portuguese Edition)

Addition of Fields in Line Item Display Report Output for TCode FBL1N/FBL5N

Scientific data repositories: the USP experience

Poder sem limites - o caminho do sucesso pessoal pela programação neurolinguística

Princípios de Direito Previdenciário (Portuguese Edition)

GERENCIAMENTO DA ROTINA DO TRABALHO DO DIA-A-DIA (EM PORTUGUESE DO BRASIL) BY VICENTE FALCONI

Transtorno de Personalidade Borderline Mais de 30 segredos para retomar sua vida Ao lidar com TPB (Portuguese Edition)

Aposentadoria e INSS: Entenda como funcionam e defenda-se (Coleção Seus Direitos) (Portuguese Edition)

Adoção: guia prático doutrinário e processual com as alterações da Lei n , de 3/8/2009 (Portuguese Edition)

Editorial Review. Users Review

OpenStereo: open source, cross-platform software for structural geology analysis

Job title: RIT Academy (Estágio Profissional em Telecomunicações/Informática)

Biossegurança: uma abordagem multidisciplinar (Portuguese Edition)

PL/SQL: Domine a linguagem do banco de dados Oracle (Portuguese Edition)

Espionagem e Vigilância Eletrônica (Portuguese Edition)

Dermatologia Clínica. Guia Colorido Para Diagnostico e Tratamento (Em Portuguese do Brasil)

Da Emoção à Lesão: um Guia de Medicina Psicossomática (Portuguese Edition)

Conceitos de Linguagens de Programação (Portuguese Edition)

Empreendedorismo: Dando Asas ao Espírito Empreendedor (Portuguese Edition)

A Bíblia do Pregador - Almeida Revista e Atualizada: Com esboços para sermões e estudos bíblicos (Portuguese Edition)

Planejamento de comunicação integrada (Portuguese Edition)

Tratado de Enfermagem Médico Cirúrgica (Em Portuguese do Brasil)

Statecharts Yakindu Tool

Aplicações Java para a web com JSF e JPA (Portuguese Edition)

Quem mexeu no meu trema? (Portuguese Edition)

Rádio Escolar: uma experiência de letramento midiático (Coleção Trabalhando com... na escola Livro 4) (Portuguese Edition)

30 Páginas para mudar a sua vida (Portuguese Edition)

Breve Histórico do Pensamento Geográfico Brasileiro nos Séculos XIX e XX: 1 (Portuguese Edition)

Ortodontia: Princípios e Técnicas Atuais (Portuguese Edition)

Meu Filho é Alérgico! E Agora? (Portuguese Edition)

Transcrição:

Jadson Santos

22/10/15 Gradle 2 Gradle Gradle is an advanced build tool of general purpose base on Groovy

22/10/15 Gradle 3 Why use a build tool?

22/10/15 Gradle 4 Why do not use eclipse to build a system? You can not build automatically from everywhere with eclipse You will always need a person to build

22/10/15 Gradle 5 Make Makefile is used to compile, linking, assembly among other tasks such as cleaning up temporary files, executing commands, etc.

22/10/15 Gradle 6 Apache ANT The first widely build tool of the Java world Ant is extremely flexible and does not impose coding conventions or directory layouts to the Java projects

22/10/15 Gradle 7 Apache ANT Example

22/10/15 Gradle 8 Apache ANT Example

22/10/15 Gradle 9 Apache ANT Example

22/10/15 Gradle 10 Apache ANT Apache Ant cons Too flexible Write a lot of thing to do a simple build The projects have no a standard structure, everyone create your own structure

22/10/15 Gradle 11 Apache Maven Simple project setup that follows best practices - get a new project or module started in seconds Convention over Configuration Superior dependency management including automatic updating, dependency closures (also known as transitive dependencies)

22/10/15 Gradle 12 Apache Maven Project Structure

22/10/15 Gradle 13 Apache Maven Based on the concept of a Project Object Model (POM)

22/10/15 Gradle 14 Apache Maven Maven has a central repository http://mvnrepository.com/

22/10/15 Gradle 15 Apache Maven Apache Maven Central Repository

22/10/15 Gradle 16 Apache Maven Apache Maven Central Repository

22/10/15 Gradle 17 Apache Maven Apache Maven Central Repository 2º 1º Exist? 2º / 4º 3º Central Repository

22/10/15 Gradle 18 Apache Maven Apache Maven cons Too hard / rigid Use of XML in the build file Maven works great for 90% of the most common things, but complicates a lot for those 10% of specifics things of your project

22/10/15 Gradle 19 Apache Maven Apache Maven cons

22/10/15 Gradle 20 Why Gradle? Gradle combines good parts of both tools and builds on top of them with DSL and other improvements It has Ant s power and flexibility Maven s life-cycle and ease of use

22/10/15 Gradle 21 Why Gradle?

22/10/15 Gradle 22 Why Gradle?

22/10/15 Gradle 23 Why Gradle?

22/10/15 Gradle 24 Why Gradle? https://gradle.org/maven_vs_gradle/

22/10/15 Gradle 25 Who is using Gradle?

22/10/15 Who is using Gradle? Gradle 26

22/10/15 Gradle 27 Gradle Introduction The script of the Gradle is a groovy script with a DSL to facilitated the tasks necessary to build Instead with groovy language of fors and ifs, the Gradle DSL helps you

22/10/15 Gradle 28 DSL = Domain Specific Language Small languages to solve a very specific problem Example: SQL SQL is an easer way to recovery data, instead use generic languages: for(int i = 0 ; i < qtddiscente; i++){ } if(discentecollection[i].getmatricula() == 2013106430) discentes.add(new Object[].{discenteCollection[i].getId(), discentecollection[i].getmatricula(), discentecollection[i].getanoingresso()}); return discentes;

22/10/15 Gradle 29 Gradle DSL https://docs.gradle.org/current/dsl/

22/10/15 Gradle 30 Gradle Introduction Gradle is composed of two concepts: Projects and Tasks A Project may represent the creation of a jar or a deploy of an application on the server. Each project is composed of several Tasks Tasks represent some atomic job.

22/10/15 Gradle 31 Gradle Introduction Example of a gradle task

22/10/15 Gradle 32 Gradle Introduction Like ANT, it allows you to setup default tasks and dependencies between tasks.

22/10/15 Gradle 33 Gradle Introduction But will I have to go back to the ANT times and program every step of my build? No! Gradle supports the notion of plugins, like Maven

22/10/15 Gradle 34 Gradle Introduction Tasks of the Java Plugin

22/10/15 Gradle 35 Gradle Introduction Like Maven, Gradle uses Convention over Configuration Imagine what is the Gradle project Structure? The same of Maven J

22/10/15 Gradle 36 Gradle Introduction Dependency management is a critical feature of every build Transitive dependency management Support for non-managed dependencies Support for custom dependency definitions Full Compatibility with Maven and Ivy Integration with existing dependency management infrastructure

22/10/15 Gradle 37 Gradle in the SINFO Projects 8º 2º 3º 7º 5º / 9º 4º 1º Exist? 2º / 6º http://jenkins.info.ufrn.br/artifactory Maven Central Repository

22/10/15 Gradle 38 Gradle in practice Version of the System, at each build this value needs to be update

22/10/15 Gradle 39 Gradle in practice Information about the source code Group and Version of the artfact generated

22/10/15 Gradle 40 Gradle in practice Source Folders of your application

22/10/15 Gradle 41 Gradle in practice Maven Central Repository Others Repositories

22/10/15 Gradle 42 Gradle in practice Creating 4 own configurations Some configuration include the dependences of others No cache this dependences

22/10/15 Gradle 43 Gradle in practice Inside system dependences Outside system dependences Dependences Copied to deploy in JBOSS Dependences Can not be Copied to JBOSS

22/10/15 Gradle 44 Gradle in practice To generated an EAR from complex project structure, it was created some tasks Here we define the order how theses tasks will execute

22/10/15 Gradle 45 Gradle in practice Create the sigevento.war Copy to the EAR the dependences and META-INF directory

22/10/15 Gradle 46 Gradle in practice The power of Gradle make specific tasks that just exists in your systems

22/10/15 Gradle 47 Gradle in practice Configure the Eclipse class path. Configure Build Path any more!

22/10/15 Gradle 48 Gradle in practice Dependence of the Gradle script

22/10/15 Gradle 49 Gradle in practice Use the org.hidetake.ssh to make deploy of a system You can deploy in several serves Can execute something

22/10/15 Gradle 50 Gradle in practice Plugin the publish in the artifactory server Information of the JAR in the repository

22/10/15 Gradle 51 Gradle in practice Plugin to run tomcat embed in your application. Application Server any more! Dependences of embed tamcat

22/10/15 Gradle 52 Gradle in practice Integration of Gradle with Flyway Update database automatically

22/10/15 Gradle 53 Gradle Eclipse Plugin Windows -> Eclipse Market -> Gradle IDE pack

22/10/15 Gradle 54 Gradle Eclipse Plugin Executing Gradle in the Eclipse 1o Run As -> gradle build Gradle build

22/10/15 Gradle 55 Gradle Eclipse Plugin Executing Gradle in the Eclipse 2o Run As -> Gradle GUI -> Select the tasks

22/10/15 Gradle 56 Gradle Eclipse Plugin Executing Gradle in the Eclipse 3o Gradle -> Tasks Quick Launcher -> Type the tasks

22/10/15 Gradle 57 Gradle Eclipse Plugin Gradle dependences in the Eclipse

22/10/15 Gradle 58 Gradle Integration with Jenkins Jenkins is an award-winning, cross-platform, continuous integration and continuous delivery application that increases your productivity. Use Jenkins to build and test your software projects continuously making it easier for developers to integrate changes to the project

22/10/15 Gradle 59 Gradle Integration with Jenkins Jenkins basically schedule jobs (threads) to execute some task http://jenkins.info.ufrn.br/

22/10/15 Gradle 60 Gradle Integration with Jenkins

22/10/15 Gradle 61 Gradle Integration with Jenkins Projects that generated a JAR to be publish in artefactory

22/10/15 Gradle 62 Gradle Integration with Jenkins Projects that generated a EAR are deployed in JBOSS

22/10/15 Gradle 63 Gradle Integration with Jenkins Projects that generated a EAR are deployed in JBOSS

22/10/15 Gradle 64 Mudanças no Ambiente da SINFO Ambiente de Desenvolvimento Antigo Arquitetura SIGAA EntidadesComuns ServicoesIntegrados SIGRH SharedResources SIPAC LIBS JBOSS

22/10/15 Gradle 65 Mudanças no Ambiente da SINFO Ambiente de Desenvolvimento Antigo

22/10/15 Gradle 66 Mudanças no Ambiente da SINFO Ambiente de Produção Antigo SIGAA arq1.0.jar comum1.0.jar dto1.0.jar SIPAC arq2.0.jar comum2.0.jar dto2.0.jar SIGRH arq3.0.jar comum3.0.jar dto3.0.jar LIBS Hibernate.jar Asm.jar Jasper.jar *.jar JBOSS SharedResources

22/10/15 Gradle 67 Mudanças no Ambiente da SINFO Estrutura dos sistemas EAR SIGAA 3 JARS 1 WAR 1 META-INF

22/10/15 Gradle 68 Mudanças no Ambiente da SINFO Estrutura dos sistemas META-INF 1 META-INF 2

22/10/15 Gradle 69 Mudanças no Ambiente da SINFO META-INF 2 JARs da Arquitetura dentro do EAR *.class Outros Módulos

22/10/15 Gradle 70 Mudanças no Ambiente da SINFO Ambiente de Desenvolvimento Novo SIGAA lib *.jar SharedResources lib *.jar SIGRH lib *.jar SIPAC lib *.jar JBOSS

22/10/15 Gradle 71 Mudanças no Ambiente da SINFO Ambiente de Desenvolvimento Novo

22/10/15 Gradle 72 Mudanças no Ambiente da SINFO Ambiente de Produção Novo SIGAA lib *.jar SharedResources lib *.jar SIGRH lib *.jar Obs.: Fica no balanceador Só usa se você acessa a instância diretamente JBOSS SIPAC lib *.jar

22/10/15 Gradle 73 Mudanças no Ambiente da SINFO Nova Estrutura, apenas 1 META-INF eventos.jar

22/10/15 Gradle 74 Mudanças no Ambiente da SINFO Não precisa mais atualizar o arquivo.classpath

22/10/15 Gradle 75 Mudanças no Ambiente da SINFO Novo Arquivo application.xml

22/10/15 Gradle 76 Mudanças no Ambiente da SINFO Isolamento dos Sistemas (solução temporária)

22/10/15 Gradle 77 Mudanças no Ambiente da SINFO Desfazendo as mudanças 1. Arquivo application.xml: Retirar os diretórios libs, voltar o cabeçalho antigo 2. Remover arquivo jboss-classloading.xml 3. Arquivo jboss-app.jar: Retirar java2parentedelegation 4. Retornar o diretório META-INF externo 5. Fazer deploy do diretório LIBS, em vez dos *.jar dentro do projeto 6. Retirar dependências do gradle e adicionar manualmente no classpath o *.jar de LIBS e os projetos da arquitetura

22/10/15 Gradle 78 SIGEventos em Produção Diretório de Deploy Diretório LIBS Diretório LIBS comum do JBOSS

22/10/15 Gradle 79 Mudanças no Ambiente da SINFO Problemas O Isolamento do JBOSS 5.1.0 não funciona como deveria Existem vários conflitos das libs usadas hoje pela SINFO que não ocorriam quando as libs eram compartilhas e passaram a ocorrer quando tentou-se isolar Coisas do Tipo: Executa no windows, mas no Linux dá conflitos entre libs Alguns problemas para executar o Gradle no JDK 6.

22/10/15 Gradle 80 Sistemas Isolados Atualmente Arquitetura (svn) EntidadesComuns (svn) ServicosIntegrados (svn) SharedResources (svn) SigEventos (git) SIGRH (git) SIGAdmin (git) SIRI (svn) Todos esses devem ser abertos no Eclipse como projetos Gradle!!!

22/10/15 Gradle 81 Sistemas Isolados Atualmente Novo workspace:

22/10/15 Gradle 82 Let s Play with Gradle Gradle Project Example: https://github.com/jadsonjs/test

22/10/15 Gradle 83 70% 0%

22/10/15 Gradle 84 Gradle Pictures taken from https://pt.wikibooks.org/wiki/programar_em_c/makefiles https://solidsoft.wordpress.com/category/tricks-tips/ http://pt.slideshare.net/tomek_k/convention-overconfiguration-maven-3-polyglot-maven-gradle-and-ant https://kamaondev.wordpress.com/2013/09/16/porquevoce-deve-trocar-o-maven-pelo-gradle/

22/10/15 Gradle 85