NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
difficult
Joined: 04 Jan 2009 Posts: 52
|
Posted: Tue Jun 21, 2011 11:01 am Post subject: How to decide a maven project also is a web application project? |
|
|
| There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans? |
|
| Back to top |
|
 |
Milos Kleint Posted via mailing list.
|
Posted: Tue Jun 21, 2011 11:09 am Post subject: [platform-dev] Re: There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans? |
|
|
It's not clear to me what problem you are trying to solve.
based on packaging maybe? or anything else from the resolved
MavenProject instance (like a maven plugin configuration).
Please note however that your own LookupProvider implementation and
it's content will probably clash with the default maven.j2ee module
(which is bridging the maven and j2ee support codebases)
Milos
On Tue, Jun 21, 2011 at 1:01 PM, difficult <address-removed> wrote:
| Quote: | There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans?
|
|
|
| Back to top |
|
 |
difficult
Joined: 04 Jan 2009 Posts: 52
|
Posted: Wed Jun 22, 2011 10:38 am Post subject: Re: [platform-dev] Re: There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans? |
|
|
| Milos Kleint wrote: | It's not clear to me what problem you are trying to solve.
based on packaging maybe? or anything else from the resolved
MavenProject instance (like a maven plugin configuration).
Please note however that your own LookupProvider implementation and
it's content will probably clash with the default maven.j2ee module
(which is bridging the maven and j2ee support codebases)
Milos
On Tue, Jun 21, 2011 at 1:01 PM, difficult <address-removed> wrote:
| Quote: | There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans?
|
|
I am develping a plugin for netbeans which extend the web project type.like the example show in NetBeans Project Type Extension Module Tutorial ,I implement my LookupProvider and in method createAdditionalLookup,if this is a web application, a new lookup item will add to the lookup.I want do this same if the project is a maven web project, but How can't I deside a project is a maven web project? |
|
| Back to top |
|
 |
Milos Kleint Posted via mailing list.
|
Posted: Wed Jun 22, 2011 11:03 am Post subject: [platform-dev] Re: How to decide a maven project also is a web application project? |
|
|
in your LookupProvider implementation you would grab the
NbMavenProject instance from the project's base lookup and get
MavenProject instance from it. then just getPackaging() == "war" and
you got your maven web project.
for a more complex example code, see
http://hg.netbeans.org/main-golden/file/c981ede67f8d/maven.j2ee/src/org/netbeans/modules/maven/j2ee/J2eeLookupProvider.java
Milos
On Wed, Jun 22, 2011 at 12:39 PM, difficult <address-removed> wrote:
| Quote: |
Milos Kleint wrote:
| Quote: | It's not clear to me what problem you are trying to solve.
based on packaging maybe? or anything else from the resolved
MavenProject instance (like a maven plugin configuration).
Please note however that your own LookupProvider implementation and
it's content will probably clash with the default maven.j2ee module
(which is bridging the maven and j2ee support codebases)
Milos
On Tue, Jun 21, 2011 at 1:01 PM, difficult <address-removed> wrote:
| Quote: | There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans?
|
|
I am develping a plugin for netbeans which extend the web project type.like the example show in NetBeans Project Type Extension Module Tutorial (http://platform.netbeans.org/tutorials/nbm-projectextension.html),I implement my LookupProvider and in method createAdditionalLookup,if this is a web application, a new lookup item will add to the lookup.I want do this same if the project is a maven web project, but How can't I deside a project is a maven web project?
|
|
|
| Back to top |
|
 |
Geertjan Wielenga Posted via mailing list.
|
Posted: Wed Jun 22, 2011 11:51 am Post subject: [platform-dev] Re: How to decide a maven project also is a web application project? |
|
|
On 06/22/2011 12:39 PM, difficult wrote:
| Quote: | Milos Kleint wrote:
| Quote: | It's not clear to me what problem you are trying to solve.
based on packaging maybe? or anything else from the resolved
MavenProject instance (like a maven plugin configuration).
Please note however that your own LookupProvider implementation and
it's content will probably clash with the default maven.j2ee module
(which is bridging the maven and j2ee support codebases)
Milos
On Tue, Jun 21, 2011 at 1:01 PM, difficult<address-removed> wrote:
| Quote: | There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans?
|
|
I am develping a plugin for netbeans which extend the web project type
|
But why? What is it that you are trying to create?
Gj
| Quote: | .like the example show in NetBeans Project Type Extension Module Tutorial (http://platform.netbeans.org/tutorials/nbm-projectextension.html),I implement my LookupProvider and in method createAdditionalLookup,if this is a web application, a new lookup item will add to the lookup.I want do this same if the project is a maven web project, but How can't I deside a project is a maven web project?
|
|
|
| Back to top |
|
 |
|
|
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 can attach files in this forum You can download files in this forum
|
|