Showing posts with label Gradle. Show all posts
Showing posts with label Gradle. Show all posts

Monday, August 10, 2015

Gradle - [Fatal Error] jsp-* Already seen doctype.


■ When Refresh Dependencies was executed, the following error occurred.
BUILD SUCCESSFUL

Total time: 0.337 secs
[Fatal Error] jsp-api-2.1-6.1.14.pom:2:10: Already seen doctype.
[Fatal Error] jsp-2.1-6.1.14.pom:2:10: Already seen doctype.
[Fatal Error] servlet-api-2.5-6.1.14.pom:2:10: Already seen doctype.
[Fatal Error] jaxb-api-2.1.pom:2:10: Already seen doctype.
[Fatal Error] jasper-compiler-5.5.23.pom:2:10: Already seen doctype.
[Fatal Error] jasper-runtime-5.5.23.pom:2:10: Already seen doctype.
[Fatal Error] jsp-api-2.1-6.1.14.pom:2:10: Already seen doctype.
[Fatal Error] jsp-2.1-6.1.14.pom:2:10: Already seen doctype.
[Fatal Error] servlet-api-2.5-6.1.14.pom:2:10: Already seen doctype.
[Fatal Error] jasper-compiler-5.5.23.pom:2:10: Already seen doctype.
[Fatal Error] jasper-runtime-5.5.23.pom:2:10: Already seen doctype.

■ Before change
repositories {
    mavenLocal()
    mavenCentral()
}

■ After change
repositories {
    mavenCentral()
    mavenLocal()
}

■ Try to execute it again.
BUILD SUCCESSFUL

Total time: 0.653 secs

Thursday, April 16, 2015

Gradle - Quick start web - new!

@ This is new version
@ If you want to develop your project in localhost,
     I recommend JettyRun in Gradle.

■ It can make your project deploy automatically.
■  File>New>Project
■  Gradle>Gradle Project


   ■ Project name: gradleJetty
   ■ Sample project: Java Quickstart


■  Open the build.gradle and Add the follew plugins
  (Delete sourceCompatibility = 1.5)
   ->apply plugin: 'war'
     apply plugin: 'jetty'
     sourceCompatibility = '1.7'
     targetCompatibility = '1.7'


■  Make the directory webapp


■  Make the index file index.html


■  Move to the project home
$ gradle jettyRun


■  Can access the follow URL
http://localhost:8080/gradleJetty

■  If you want to change http port, add this into the build.gradle
jettyRun {   httpPort = 9000
  reload = 'automatic'
  scanIntervalSeconds = 2
  // Change http://localhost:9000/gradleJetty for http://localhost:9000 
  contextPath = ''
}

■  You need to change the Classpath compiled like this.

@ Enjoy to develop your project

Saturday, May 31, 2014

Install - Gradle

@ Download one of the Gradle distributions from the Gradle web site
$ wget https://services.gradle.org/distributions/gradle-1.12-bin.zip

@ Unpacking the file packaged as a ZIP
$ unzip ./gradle-1.12-bin.zip

@ Move the files to where you want
mv ./gradle-1.12 ../gradle

@ Add the following entries to your profile
$ vi ./.profile
#---------------------------------------------------------------
export GRADLE_HOME=/usr/local/gradle
export PATH=$GRADLE_HOME/bin:$PATH
#---------------------------------------------------------------

@ Execute this
$ source ./.profile

Saturday, May 24, 2014

Gradle - install IDE on Eclipse

1. In Eclipse Open Help >> Install New Software
2. Paste a Gradle update site link into the "Work with" text box.
    -> http://dist.springsource.com/release/TOOLS/gradle
4. Click the Add button at the top of the screen.
5. Ensure that the option "Group Items by Category" is enabled.
6. Select the Gradle IDE of "Extensions / Gradle Integration".
7. Click "Next". This may take a while.















8. Review the list of software that will be installed. Click "Next" again.















9. Review and accept licence agreements and Click "Finish".















Thank you
https://github.com/spring-projects/eclipse-integration-gradle/

@If you want to install the editor in Groovy, this is
http://groovy.codehaus.org/Eclipse+Plugin

Tuesday, February 25, 2014

Gradle - How to implement Maven's profile mechanism in Gradle

@/config/staging/resources

final String DEFAULT_PROFILE = 'staging'
allprojects {
    if (!project.hasProperty('profile') || !profile) {
        ext.profile = DEFAULT_PROFILE
    }
    sourceSets {
        main {
            resources {
                srcDir "config/${profile}/resources"
            }
        }
    }
}

@ Command
$ gradle zip -Pprofile=staging

Monday, December 9, 2013

Gradle - Add the jars to the dependencies in Eclipse


You need to install the [https://github.com/spring-projects/eclipse-integration-gradle]
I installed this version[http://dist.springsource.com/release/TOOLS/gradle]

build.gradle

$ gradle cleanEclipse eclipse

You can see jars file in the Eclipse

Thursday, November 28, 2013

Gradle - Release Script on Jenkins

You just put the following this to the Execute shell of the Post Steps on Jenkins.

Also, you need to configure the following option on Jenkins.
Build > invoke Gradle script > Invoke Gradle Gradle Version >> Default
Build > invoke Gradle script > Tasks >> zip

Gradle - Sample build.gradle for Batch

This Gradle file is for batch.

Friday, November 8, 2013

Link - Gradle

@Plug-in in Eclipse
http://www.kaczanowscy.pl/tomek/2010-03/gradle-ide-integration-eclipse-plugin

@Multi-modules
http://blog.tamashumi.com/2012/11/muliti-module-gradle-project-with-ide.html