-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support for Gradle project #74
Comments
@ledj0304 the problem of NetBeans recognizing a directory as the wrong project type is a known limitation, see Bug 256094 and Bug 269297. Unfortunaltely I am not a Gradle user and I don't know the internals of NetBeans Gradle support. The NB Spring Boot was deliberately made with Maven project support in mind. If someone with more Gradle and Gradle on NetBeans expertise will contribute I would be more than happy to include it. |
Hello Alex,
Thanks for the quick answer.
I have tried the following simple workaround:
a) generate the project as a Maven project
b) run .gradle init to initialize the directory as a Gradle project.
c) rename pom.xml to maven-pom.xml
d) in your nbm plugin, hardcode "maven-pom.xml' string inthe Initializr and
recompile and install.
The rationale is the following:
Leave the pom as a configuration source for your plugin, allowing NB to
display the SpringBoot templates while using Gradle for the build.
a) as NB will display a Maven project as soon as it detects a pom.xml, we
either have to rename the pom (to either a constant name or a configurable
name or path) or move it to another directory (maybe .nb-gradle initiated
by the NB gradle plugin). Doing so causes NB to apply the Gradle module
logic instead of the Maven module (this works fine).
b) When your module scans for the pom-xml configuration, if pom is not in
root directory, use the alternate pom name or path.
Unfortunately, my hack did not work as it seems that the pom.xml is
defaulted somewhere else in the call stack, probably in the maven module.
Maybe that will inspire you for a quick hack. In the meantime, I use the NB
terminal window to manually drive the build.
Thanks for your kind attention,
Jacques
…On Sun, Feb 19, 2017 at 9:42 AM, Alessandro Falappa < ***@***.***> wrote:
@ledj0304 <https://github.com/ledj0304> the problem of NetBeans
recognizing a directory as the wrong project type is a known limitation,
see Bug 256094 <https://netbeans.org/bugzilla/show_bug.cgi?id=256094> and Bug
269297 <https://netbeans.org/bugzilla/show_bug.cgi?id=269297>.
Unfortunaltely I am not a Gradle user and I don't know the internals of
NetBeans Gradle support. The NB Spring Boot was deliberately made with
Maven project support in mind.
If someone with more Gradle and Gradle on NetBeans expertise will
contribute I would be more than happy to include it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF1Q2TKuHaKpYAag8waMJ6nf6LLcNmRrks5reFTQgaJpZM4MEl8P>
.
|
@AlexFalappa @ledj0304
Anyway your plugin is very nice and it would be great to have Gradle support. |
The recently released NetBeans 11 added support for the Gradle build system. |
Hello,
I use Gradle. I don't mind having a POM in the same directory so the plugin can detect and display the SpringBoot options in the New... menus. The problem is when a POM is detected by other NB plugins, it turns to project into a Maven project instead of a Gradle project.
I forked the plugin sources and tried to rename the pom but no can do.
How could I fix this?
Thanks,
Jacques
The text was updated successfully, but these errors were encountered: