NetBeans Forums

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

Netbeans RCP Application with Maven

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
Iwud H8u
Posted via mailing list.





PostPosted: Sat Jul 25, 2009 9:16 pm    Post subject: Netbeans RCP Application with Maven Reply with quote

Hi,

I am trying to build a maven based modular application based on the Netbeans
RCP. The new 'Maven Project' wizard is really useful in creating the
application and the modules for this. However, I am having issues with how
Maven and NetBeans resolve dependencies.

I have read the information on
http://mojo.codehaus.org/nbm-maven-plugin/index.html about Maven transitive
and Netbeans runtime dependencies and I believe I've configured my project
correctly, however I still get BUILD FAILURE messages when building my
application.

The structure of my project is somewhat like this.

RCPApplication (Maven-nbm-application packaging)
--- Module 1 (Maven nbm packaging)
--- Module 2 (Maven nbm packaging) <--- dependency on Module 1
--- Module 3 (Maven nbm packagin) < --- dependency on Module 2

Of these, modules 1 and 3 use Hibernate and I have added Hibernate (and all
transitive dependencies) to Module 1 as regular Maven dependencies. However
I would like Module 3 to be able to use the Hibernate libraries packaged in
Module 1 without having to declare them again. I know for a pure Netbeans
application, I could have used a Wrapper module to share the Hibernate
libraries between Modules 1 and 3. But how do I set this up when I am using
Maven to generate a Netbeans RCP without having to declare the dependencies
in Maven once in each module?

I am slightly at my wits end now with messages like ----> '[WARNING] There
are transitive dependencies that were not included in the module's
Class-Path because they were resolved as part of another NetBeans module.'
.... :-(

Any help/suggestions will be gladly appreciated!

Cheers,
Jay
--
View this message in context: http://www.nabble.com/Netbeans-RCP-Application-with-Maven-tp24661755p24661755.html
Sent from the Netbeans RCP/Platform Users (Open API) mailing list archive at Nabble.com.
Back to top
mkleint
Posted via mailing list.





PostPosted: Sun Jul 26, 2009 5:25 am    Post subject: Netbeans RCP Application with Maven Reply with quote

have you defined the hibernate packages as public in module1? that's
done by the
configuration/publicPackages element in the plugin's pom section?
Then in module2 and module3 you only need to depend on module1, not the
hibernate jars directly.

Milos

Iwud H8u wrote:
Quote:
Hi,

I am trying to build a maven based modular application based on the Netbeans
RCP. The new 'Maven Project' wizard is really useful in creating the
application and the modules for this. However, I am having issues with how
Maven and NetBeans resolve dependencies.

I have read the information on
http://mojo.codehaus.org/nbm-maven-plugin/index.html about Maven transitive
and Netbeans runtime dependencies and I believe I've configured my project
correctly, however I still get BUILD FAILURE messages when building my
application.

The structure of my project is somewhat like this.

RCPApplication (Maven-nbm-application packaging)
--- Module 1 (Maven nbm packaging)
--- Module 2 (Maven nbm packaging) <--- dependency on Module 1
--- Module 3 (Maven nbm packagin) < --- dependency on Module 2

Of these, modules 1 and 3 use Hibernate and I have added Hibernate (and all
transitive dependencies) to Module 1 as regular Maven dependencies. However
I would like Module 3 to be able to use the Hibernate libraries packaged in
Module 1 without having to declare them again. I know for a pure Netbeans
application, I could have used a Wrapper module to share the Hibernate
libraries between Modules 1 and 3. But how do I set this up when I am using
Maven to generate a Netbeans RCP without having to declare the dependencies
in Maven once in each module?

I am slightly at my wits end now with messages like ----> '[WARNING] There
are transitive dependencies that were not included in the module's
Class-Path because they were resolved as part of another NetBeans module.'
.... :-(

Any help/suggestions will be gladly appreciated!

Cheers,
Jay
Back to top
Iwud H8u
Posted via mailing list.





PostPosted: Mon Jul 27, 2009 3:28 pm    Post subject: Netbeans RCP Application with Maven Reply with quote

Hi Milos,

I have since read the 'Definitive guide to Netbeans platform' book and
decided that it was more useful to separate out my dependencies into a
separate module. So now I have a 'dependencies-module' which both 'module1'
and 'module3' should be able to use.

I then used your suggestion (as I understood it to include the packages
under hibernate' as 'public packages in the the 'manifest.mf' file in the
location ---> Other sources/nbm/manifest.mf in my maven module. However this
still does not resolve my problem. Is this where the listing of public
packages needs to go?

Thanks so much,
Jay


mkleint-3 wrote:
Quote:

have you defined the hibernate packages as public in module1? that's
done by the
configuration/publicPackages element in the plugin's pom section?
Then in module2 and module3 you only need to depend on module1, not the
hibernate jars directly.

Milos

Iwud H8u wrote:
Quote:
Hi,

I am trying to build a maven based modular application based on the
Netbeans
RCP. The new 'Maven Project' wizard is really useful in creating the
application and the modules for this. However, I am having issues with
how
Maven and NetBeans resolve dependencies.

I have read the information on
http://mojo.codehaus.org/nbm-maven-plugin/index.html about Maven
transitive
and Netbeans runtime dependencies and I believe I've configured my
project
correctly, however I still get BUILD FAILURE messages when building my
application.

The structure of my project is somewhat like this.

RCPApplication (Maven-nbm-application packaging)
--- Module 1 (Maven nbm packaging)
--- Module 2 (Maven nbm packaging) <--- dependency on Module 1
--- Module 3 (Maven nbm packagin) < --- dependency on Module 2

Of these, modules 1 and 3 use Hibernate and I have added Hibernate (and
all
transitive dependencies) to Module 1 as regular Maven dependencies.
However
I would like Module 3 to be able to use the Hibernate libraries packaged
in
Module 1 without having to declare them again. I know for a pure Netbeans
application, I could have used a Wrapper module to share the Hibernate
libraries between Modules 1 and 3. But how do I set this up when I am
using
Maven to generate a Netbeans RCP without having to declare the
dependencies
in Maven once in each module?

I am slightly at my wits end now with messages like ----> '[WARNING]
There
are transitive dependencies that were not included in the module's
Class-Path because they were resolved as part of another NetBeans
module.'
.... :-(

Any help/suggestions will be gladly appreciated!

Cheers,
Jay





--
View this message in context: http://www.nabble.com/Netbeans-RCP-Application-with-Maven-tp24661755p24682742.html
Sent from the Netbeans RCP/Platform Users (Open API) mailing list archive at Nabble.com.
Back to top
mkleint
Posted via mailing list.





PostPosted: Mon Jul 27, 2009 7:22 pm    Post subject: Netbeans RCP Application with Maven Reply with quote

Iwud H8u wrote:
Quote:
Hi Milos,

I have since read the 'Definitive guide to Netbeans platform' book and
decided that it was more useful to separate out my dependencies into a
separate module. So now I have a 'dependencies-module' which both 'module1'
and 'module3' should be able to use.

I then used your suggestion (as I understood it to include the packages
under hibernate' as 'public packages in the the 'manifest.mf' file in the
location ---> Other sources/nbm/manifest.mf in my maven module. However this
still does not resolve my problem. Is this where the listing of public
packages needs to go?


you can put in the manifest, the plugin will keep all items you declare
in the manifest (never overwrite) or you can put in the nbm-maven-plugin
configuration.

if the problem persists and you are sure you haven't done a typo, the
feel free to post the error message and pom snippets or send to me
privately. it might be a bug. Also check you never declare dependency on
non-module dependency in the module2 and module3

Milos
Quote:
Thanks so much,
Jay


mkleint-3 wrote:

Quote:
have you defined the hibernate packages as public in module1? that's
done by the
configuration/publicPackages element in the plugin's pom section?
Then in module2 and module3 you only need to depend on module1, not the
hibernate jars directly.

Milos

Iwud H8u wrote:

Quote:
Hi,

I am trying to build a maven based modular application based on the
Netbeans
RCP. The new 'Maven Project' wizard is really useful in creating the
application and the modules for this. However, I am having issues with
how
Maven and NetBeans resolve dependencies.

I have read the information on
http://mojo.codehaus.org/nbm-maven-plugin/index.html about Maven
transitive
and Netbeans runtime dependencies and I believe I've configured my
project
correctly, however I still get BUILD FAILURE messages when building my
application.

The structure of my project is somewhat like this.

RCPApplication (Maven-nbm-application packaging)
--- Module 1 (Maven nbm packaging)
--- Module 2 (Maven nbm packaging) <--- dependency on Module 1
--- Module 3 (Maven nbm packagin) < --- dependency on Module 2

Of these, modules 1 and 3 use Hibernate and I have added Hibernate (and
all
transitive dependencies) to Module 1 as regular Maven dependencies.
However
I would like Module 3 to be able to use the Hibernate libraries packaged
in
Module 1 without having to declare them again. I know for a pure Netbeans
application, I could have used a Wrapper module to share the Hibernate
libraries between Modules 1 and 3. But how do I set this up when I am
using
Maven to generate a Netbeans RCP without having to declare the
dependencies
in Maven once in each module?

I am slightly at my wits end now with messages like ----> '[WARNING]
There
are transitive dependencies that were not included in the module's
Class-Path because they were resolved as part of another NetBeans
module.'
.... :-(

Any help/suggestions will be gladly appreciated!

Cheers,
Jay





Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users 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 can 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