where to specify dependency for javax.xml.bind...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

where to specify dependency for javax.xml.bind...

Savitha Rajiv
Hi,

I am getting the following errors on compile:


    [javac] Compiling 63 source files to
C:\workspace\Root\build\target\classes
C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:17:
package javax.xml.bind does not exist
import javax.xml.bind.JAXBContext;
                      ^
C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:18:
package javax.xml.bind does not exist
import javax.xml.bind.JAXBException;
                      ^
C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:19:
package javax.xml.bind does not exist
import javax.xml.bind.Unmarshaller;
                      ^
C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:23:
cannot  resolve symbol
symbol  : class ComponentConfig
location: package config
import com.wiziotec.config.ComponentConfig;
                           ^
C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:24:
cannot resolve symbol
symbol  : class WizConfig
location: package config
import com.wiziotec.config.WizConfig;

The jar files for jaxb are all located in the
{basedir}/lib/jaxb directory. I have included this
path in the classpath. I have also specified the path
to the jars in the project.properties file. But
continue to get these errors.

Am i missing something?


               
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: where to specify dependency for javax.xml.bind...

Kenney Westerhof
On Thu, 5 May 2005, Savitha Rajiv wrote:


You have to set the following in project.properties:

maven.jar.override=on
maven.jar.jaxb=${basedir}/lib/jaxb/jaxb.jar  (for each of the jars)

And the following dependencies in project.xml:

<dependency>
  <id>jaxb</id>
  <jar>jaxb.jar</jar>
</dependency>

(for each of the jars).

But it's better to specify the dependencies fully in project.xml,
including the version, and copying the lib/jaxb/*.jar to your local
repository. You can specify an <url> tag in the dependency to indicate to
other users where to download the SUN jars from.

-- Kenney

> Hi,
>
> I am getting the following errors on compile:
>
>
>     [javac] Compiling 63 source files to
> C:\workspace\Root\build\target\classes
> C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:17:
> package javax.xml.bind does not exist
> import javax.xml.bind.JAXBContext;
>                       ^
> C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:18:
> package javax.xml.bind does not exist
> import javax.xml.bind.JAXBException;
>                       ^
> C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:19:
> package javax.xml.bind does not exist
> import javax.xml.bind.Unmarshaller;
>                       ^
> C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:23:
> cannot  resolve symbol
> symbol  : class ComponentConfig
> location: package config
> import com.wiziotec.config.ComponentConfig;
>                            ^
> C:\workspace\Root\src\com\wiziotec\common\lib\ConfigUtil.java:24:
> cannot resolve symbol
> symbol  : class WizConfig
> location: package config
> import com.wiziotec.config.WizConfig;
>
> The jar files for jaxb are all located in the
> {basedir}/lib/jaxb directory. I have included this
> path in the classpath. I have also specified the path
> to the jars in the project.properties file. But
> continue to get these errors.
>
> Am i missing something?
>
>
>
> Discover Yahoo!
> Stay in touch with email, IM, photo sharing and more. Check it out!
> http://discover.yahoo.com/stayintouch.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]