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

Improvement: allow grails-profile plugin contains groovy source files #95

Closed
rainboyan opened this issue Mar 19, 2022 · 3 comments
Closed

Comments

@rainboyan
Copy link
Contributor

Current version grails profile Gradle plugin don't allow project contain groovy source files, when apply groovy plugin, it has below errors.

FAILURE: Build failed with an exception.

* Where:
Build file '/grails-demos/web-profile-command-demo/build.gradle' line: 12

* What went wrong:
A problem occurred evaluating root project 'web-profile-command-demo'.
> Failed to apply plugin 'org.grails.grails-profile'.
   > Cannot add task 'processResources' as a task with that name already exists.

Demo project

Environment:

  • Grails 5.1.2
  • Java OpenJDK 64-Bit Server VM Zulu11.54+23-CA (build 11.0.14+9-LTS, mixed mode)
@rainboyan
Copy link
Contributor Author

I create a Grails Profile project which contains custom Step and Command, it's a very useful feature since Grails 3.0.
I modified some of the code to implement this feature in branch 4.0.x, If anyone is interested, discussions and feedback are welcome, and I hope Grails become better and powerful.

@rainboyan rainboyan closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2022
@puneetbehl
Copy link
Contributor

It seems like one or more Gradle plugins are trying to add a task with same name which is not possible. I would need to look into details for more information. Also, I have noticed that the sample application is using “org.grails.internal.grails-profile-publish" which is only meant to be used internally by us and not meant for the community. The designs and decision for this plugin are solely based on internal Grails project and may change frequently. So, I would recommend removing it and instead use Gradle “maven-publish” plugin directly for publishing the profiles.

Another thing is that the sample application is using older version of Grails and Grails Gradle Plugin. I think it would be worth trying to update to latest.

@rainboyan
Copy link
Contributor Author

It seems like one or more Gradle plugins are trying to add a task with same name which is not possible. I would need to look into details for more information.

Yes, 'processResources' conflicts with the same task name from Groovy Plugin.

Another thing is that the sample application is using older version of Grails and Grails Gradle Plugin. I think it would be worth trying to update to latest.

There was another error when updated to 5.1.2, #94

@rainboyan rainboyan reopened this Dec 15, 2022
@rainboyan rainboyan closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2023
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

2 participants