Greetings,

In my particular use-case, I was merely parsing DBus XML messages as part of a 
heart rate monitor app.  There's built-in support for that.

The error message that you've gotten earlier (I haven't worked on my Netbeans 
application since release 8.2) indicates to me that you won't get those OSGI 
deployed for free, but that you'd have to explicitly add them as dependencies 
to the final nbm-application pom.

While looking in my various pom.xml files in that application, I see that I 
had sometimes set the OSGI dependencies to false and other times to true.  
Unfortunately, I no longer remember why I made my specific choices.  

-- 
Mark A. Flacy
mfl...@verizon.net

On Saturday, January 16, 2021 10:06:56 PM CST Will Hartung wrote:
> On Sat, Jan 16, 2021 at 3:40 PM Mark A. Flacy <mfl...@verizon.net.invalid>
> 
> wrote:
> > Greetings,
> > 
> > Netbeans itself uses tons of XML internally; I've gotten away with just
> > importing xml-apis:xml-apis.  It probably matters what you are trying to
> > do,
> > of course.
> 
> Can you be more specific?
> 
> I'm using JAXB for Marshalling/Unmarshallng.
> 
> For OSGI dependencies, that's in the nbm-maven-plugin's configuration block.
> 
> 
> This worked for me. This is notably for just a unit test, so I'm not sure
> how much of the Module infrastructure is spooled up for this.
> 
> For the moment it seems to be working, hopefully I'll be running the module
> itself soon to see what happens.
> 
> Thanks.
> 
> Regards,
> 
> Will Hartung
> 
> > --
> > Mark A. Flacy
> > mfl...@verizon.net
> > 
> > On Saturday, January 16, 2021 1:38:23 PM CST Will Hartung wrote:
> > > I have a simple Maven NB module project, with Java 11, and I need to use
> > > XML.
> > > 
> > > I have these dependencies:
> > >         <dependency>
> > >         
> > >             <groupId>com.sun.activation</groupId>
> > >             <artifactId>javax.activation</artifactId>
> > >             <version>1.2.0</version>
> > >         
> > >         </dependency>
> > >         <dependency>
> > >         
> > >             <groupId>javax.xml.bind</groupId>
> > >             <artifactId>jaxb-api</artifactId>
> > >             <version>2.3.0</version>
> > >         
> > >         </dependency>
> > >         <dependency>
> > >         
> > >             <groupId>org.glassfish.jaxb</groupId>
> > >             <artifactId>jaxb-runtime</artifactId>
> > >             <version>2.3.0</version>
> > >         
> > >         </dependency>
> > > 
> > > During build, I get:
> > > 
> > > ==============================
> > > NBM Plugin generates manifest
> > > 
> > > Adding on module's Class-Path:
> > >     javax.annotation:jsr250-api:jar:1.0
> > >     org.glassfish.jaxb:jaxb-runtime:jar:2.3.0
> > >     org.glassfish.jaxb:jaxb-core:jar:2.3.0
> > >     org.glassfish.jaxb:txw2:jar:2.3.0
> > > 
> > > Adding OSGi bundle dependency - com.sun.activation:javax.activation
> > > Adding OSGi bundle dependency - javax.xml.bind:jaxb-api
> > > Project uses classes from transitive OSGi bundle
> > > com.sun.istack:istack-commons-runtime:jar:3.0.5 which will not be
> > > accessible at runtime.
> > > 
> > >     To fix the problem, add this module as direct dependency. For OSGi
> > > 
> > > bundles that are supposed to be wrapped in NetBeans modules, use the
> > > useOSGiDependencies=false parameter
> > > Project uses classes from transitive OSGi bundle
> > > org.jvnet.staxex:stax-ex:jar:1.7.8 which will not be accessible at
> > 
> > runtime.
> > 
> > >     To fix the problem, add this module as direct dependency. For OSGi
> > > 
> > > bundles that are supposed to be wrapped in NetBeans modules, use the
> > > useOSGiDependencies=false parameter
> > > Project uses classes from transitive OSGi bundle
> > > com.sun.xml.fastinfoset:FastInfoset:jar:1.2.13 which will not be
> > 
> > accessible
> > 
> > > at runtime.
> > > 
> > >     To fix the problem, add this module as direct dependency. For OSGi
> > > 
> > > bundles that are supposed to be wrapped in NetBeans modules, use the
> > > useOSGiDependencies=false parameter
> > > ==============================
> > > 
> > > Should I wrap the XML stuff into a module? How do I make one module
> > > dependent on another module with Maven? Or do I have to make a module
> > 
> > suite?
> > 
> > > For now this is a simple module, and I have no problem bundling the XML
> > > stuff for this simple test.
> > > 
> > > The message says: "use the useOSGiDependencies=false parameter" but I
> > 
> > have
> > 
> > > no idea where this parameter should be specified.
> > > 
> > > Regards,
> > > 
> > > Will Hartung
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> > For additional commands, e-mail: users-h...@netbeans.apache.org
> > 
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to