jbake-org / jbake-gradle-plugin

A Gradle plugin for JBake
Other
46 stars 21 forks source link

bakeInit gradle task is downloading to the temp folder but not getting copied to the src folder in Windows #65

Open fazeem84 opened 2 years ago

fazeem84 commented 2 years ago

The build is not executed without adding without adding commons-configuration, so added this dependency in build script configuration to execute it successfully.


buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath  'commons-configuration:commons-configuration:1.10'
    }
}

plugins {
    id 'org.jbake.site' version '5.5.0'
}
bakeInit {
    template = 'freemarker'
}

and build executed without any failure, but the template are not getting generated in the JBake folder

image

but it seems template's are downloaded and extracted in temp folder

image

so issue seems to be in init.groovy

image

`

hoplite82 commented 2 years ago

Had the same issue. Copied per Hand to src in Projekt and the gradle task bake worked. But bakePreview not. The buildfolder was saved in .gradle/temp

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath  'commons-configuration:commons-configuration:1.10'
    }
}

plugins {
    id 'org.jbake.site' version '5.5.0'
    id 'groovy'
    id 'java-library'
}
repositories {
    mavenCentral()
    jcenter()
}
jbake {
   srcDirName = 'src/jbake'
   destDirName = 'jbakeOut'
   clearCache = true
}

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bakePreview'.
> Cannot set readonly property: level for class: org.gradle.internal.logging.services.DefaultLoggingManager

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings
jmini commented 2 years ago

Same error for me while running gradle bakeInit, following the README.adoc file:

https://github.com/jbake-org/jbake-gradle-plugin/blob/130c2df2309da1373778910862b330bab47b8c7d/README.adoc#L48-L55

Got:

> Task :bakeInit FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bakeInit'.
> java.lang.ClassNotFoundException: org.apache.commons.configuration.CompositeConfiguration

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 632ms

You need to configure the buildscript section as explained by @fazeem84.