Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to convert from maven to gradle for a project that uses wro4j #2

Open
Bwvolleyball opened this issue Oct 7, 2019 · 6 comments

Comments

@Bwvolleyball
Copy link

I am attempting to use this wro4j-gradle-plugin while trying to create a gradle build from the maven build in the spring-petclinic project.

I've attempted to follow the documentation in wro4j-gradle-plugin-sample without much success.

I cannot get the gradle build to successfully inherit compilation of petclinic.less from bootstrap.less, and I don't know how to set a destination location for the final css file via this plugin.

I'm hoping to get some pointers / feedback about what could be wrong with my plugin configuration here.

The stack trace doesn't say much, other than confirm it doesn't seem to know about bootstrap:

* What went wrong:
Execution failed for task ':compileWebPetclinic'.
> Could not compile less. 24 error(s) occurred:
  ERROR 181:3 Could not find mixin named ".label-success".
   180: .deployment-status-deployed {
   181:   .label-success;
   182: }
  
  ERROR 185:3 Could not find mixin named ".label-warning".
   184: .deployment-status-incomplete {
   185:   .label-warning;
   186: }
  
  ...


* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileWebPetclinic'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:166)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:163)

Any advice is appreciated!

@tejassheth
Copy link

Hello

I went through your code, I am also trying to do the same, But I am also facing the issues , Can you please provide some reference document of demo sample from where you took the reference?

I also did some research and came across https://mvnrepository.com/artifact/ro.isdc.wro4j/wro4j-maven-plugin/1.8.0 plugin which can be used with gradle. Can you also look into this if you find anything ?

Help is much appreciated..!

@Bwvolleyball
Copy link
Author

I don't really know if using the maven plugin from gradle is the right choice. The reference is directly from the spring boot sample project that I had forked, not much else. You can look at the pending PRs referenced in this issue if you want, it had snippets that were somewhat useful, but nothing fully worked. spring-projects/spring-petclinic#236

@luckymagic7
Copy link

I faced same issue.

I thinks gradle needs the plugin that passes the wro.xml file's PATH when compile less to css.

@IlyaAI
Copy link
Collaborator

IlyaAI commented Feb 19, 2021

Unfortunately, I have no time to support wro4j-gradle-pluging project now. You are welcome to fork and publish you own version.

@dsyer
Copy link

dsyer commented May 11, 2021

I made it work here if anyone is interested: https://github.com/dsyer/spring-petclinic/tree/gradle. This plugin is not as flexible as it could be with source and target locations, but since the Petclinic only has one wro4j bundle we can make it work.

@erikson879
Copy link

Hi @Bwvolleyball, could you find a solution way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants