NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Netbeans Plugin-Development and dependent Plugins

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers
View previous topic :: View next topic  
Author Message
38leinaD



Joined: 07 Oct 2016
Posts: 4

PostPosted: Fri Oct 07, 2016 9:22 pm    Post subject: Netbeans Plugin-Development and dependent Plugins Reply with quote

Hi,
I am currently looking into the netbeans gradle plugin https://github.com/kelemen/netbeans-gradle-project and am wondering what is the right way to actually test/run the plugin in my development enviornment when it depends on another plugin? I.e. this plugin depends on Groovy-Grails Plugin.
I am not sure if the situation is complicated by the fact that the netbeans-gradle-project actually builds itself by a groovy build.
What i habe been doing up to know is:

1. "gradle run" t build and run the IDE with the netbeans-gradle-project installed.
2. Due to the dependency on Groovy-Grails plugin it tells me about the missing dependency on startup so, the plugin is deactivated.
3. I install the Groovy-Grails plugin manually via teh plugin manager
4. I run "gradle run" again.

I assume when i will do a clean build i have to install the plugin again. Also, it seems like manual work that should be possible to do in an automated way.

Can someone give me a hint how other people go about developing plugins that have dependcies on other plugin? Does no even have to be specifially for gradle-based build. Maybe i can interpolate how others are solving it for ant/maven-based plugin-build...

Thanks in advance,
Daniel
Back to top
geertjan



Joined: 22 Jan 2014
Posts: 979

PostPosted: Sat Oct 08, 2016 9:09 am    Post subject: Netbeans Plugin-Development and dependent Plugins Reply with quote

Hi Attila,

Can you help?

Gj

On 7-10-2016 23:22, 38leinaD wrote:
Quote:
Hi,
I am currently looking into the netbeans gradle plugin https://github.com/kelemen/netbeans-gradle-project and am wondering what is the right way to actually test/run the plugin in my development enviornment when it depends on another plugin? I.e. this plugin depends on Groovy-Grails Plugin.
I am not sure if the situation is complicated by the fact that the netbeans-gradle-project actually builds itself by a groovy build.
What i habe been doing up to know is:

1. "gradle run" t build and run the IDE with the netbeans-gradle-project installed.
2. Due to the dependency on Groovy-Grails plugin it tells me about the missing dependency on startup so, the plugin is deactivated.
3. I install the Groovy-Grails plugin manually via teh plugin manager
4. I run "gradle run" again.

I assume when i will do a clean build i have to install the plugin again. Also, it seems like manual work that should be possible to do in an automated way.

Can someone give me a hint how other people go about developing plugins that have dependcies on other plugin? Does no even have to be specifially for gradle-based build. Maybe i can interpolate how others are solving it for ant/maven-based plugin-build...

Thanks in advance,
Daniel



Back to top
attila.kelemen



Joined: 10 Apr 2015
Posts: 11

PostPosted: Sun Oct 09, 2016 8:46 am    Post subject: Netbeans Plugin-Development and dependent Plugins Reply with quote

Hi,

I can speak for the Gradle plugin since I'm the author: I personally install a version of NetBeans which already contains the Groovy plugin, so there is simply no such issue for me. If I run the project in NB, it will work without any adjustment. In the general case, I'm not sure but you should look at  Radim's NBM plugin (https://github.com/radimk/gradle-nbm-plugin). I don't know if it supports what you want or not because I have never took my time to port my build to use his plugin. However, even if his plugin does not properly support such dependencies, my recommendation is to add support there.


As for other build tools: If I remember correctly, the Ant build is able to recognize such dependencies, if you have the other modul's sources. And for Maven, you have to depend on the .jar of the modul and I think it will work but you might check out the Gradle JavaEE support project at https://github.com/hildo/netbeans-gradle-javaee-project. That said, someone else is most likely capable of answering how the NB module system should work.


bye,
Attila Kelemen


2016-10-08 11:08 GMT+02:00 geertjan wielenga <address-removed ([email]address-removed[/email])>:
Quote:
Hi Attila,

Can you help?

Gj

On 7-10-2016 23:22, 38leinaD wrote:
Quote:
Hi,
I am currently looking into the netbeans gradle plugin https://github.com/kelemen/netbeans-gradle-project and am wondering what is the right way to actually test/run the plugin in my development enviornment when it depends on another plugin? I.e. this plugin depends on Groovy-Grails Plugin.
I am not sure if the situation is complicated by the fact that the netbeans-gradle-project actually builds itself by a groovy build.
What i habe been doing up to know is:

1. "gradle run" t build and run the IDE with the netbeans-gradle-project installed.
2. Due to the dependency on Groovy-Grails plugin it tells me about the missing dependency on startup so, the plugin is deactivated.
3. I install the Groovy-Grails plugin manually via teh plugin manager
4. I run "gradle run" again.

I assume when i will do a clean build i have to install the plugin again. Also, it seems like manual work that should be possible to do in an automated way.

Can someone give me a hint how other people go about developing plugins that have dependcies on other plugin? Does no even have to be specifially for gradle-based build. Maybe i can interpolate how others are solving it for ant/maven-based plugin-build...

Thanks in advance,
Daniel





Back to top
38leinaD



Joined: 07 Oct 2016
Posts: 4

PostPosted: Mon Oct 10, 2016 7:01 am    Post subject: Reply with quote

>> And for Maven, you have to depend on the .jar of the modul and I think it will work but you might check out the Gradle JavaEE support project at https://github.com/hildo/netbeans-gradle-javaee-project. That said, someone else is most likely capable of answering how the NB module system should work.

Funny that you say Gradle javaEE plugin because that is exactly where i had the question. It gave me the exact problem that when i run the ide from the build the first time, the gradle and groovy plugins where not installed. then i installed them manually from the plugins menu and restarted the ide without clean build and it work.

So, i have have to check again if you say it should in general be working because i though i experienced the same problem also for your gradle plugin that the groovy stuff was missing.

Let me check again and provide an update.

Cheers,
Daniel
Back to top
38leinaD



Joined: 07 Oct 2016
Posts: 4

PostPosted: Mon Oct 10, 2016 8:16 pm    Post subject: Reply with quote

Hi,
I have tried it again.
- For gradle-java-plugin it works. It has the groovy plugin installed.
- For gradle-javaee-plugin it does not work. It is missing the gradle-java-plugin

Can you maybe eleborate why it is working for your gradle-plugin but not for the gradle-javaee-plugin that is based on your plugin?
When running gradle-javaee i get an error saying "the module named org.netbeans.gradle.project was needed and not found".

the gradle-javaee-plugin is maven-based and has your plugin in the dependencies:
<dependency>
<groupId>com.github.kelemen</groupId>
<artifactId>netbeans-gradle-plugin</artifactId>
<version>1.3.0</version>
</dependency>

So, that should be fine.

But i am not sure i understand how it works for the groovy-plugin dependency on your gradle java plugin. Why do i here not have the same problem with the groovy base plugin?
how does your plugin pulls in the dependency to the groovy-plugin exactly when building and running it via "the play button in the ide"...

The only reference i see is in the
nbm { friendPackages {
requires('cnb.org.netbeans.modules.groovy.kit');

I cannot find a dependency in the "dependencies" section.

Would be great if yoy can point me in the right direction...

Cheers,
Daniel
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo