我是新手,刚开始使用Maven,这可能是个愚蠢的问题。我的问题是我在Eclipse Luna版本中创建了一个动态Web项目。我已经在pom文件中添加了一些构件,JAXRS和DOM4J。它下载了所有的jar包。
我能够在代码中导入JAXRS类而不需要在lib文件中添加jaxrs。 但是我无法访问DOM4J类。我正在使用web-sphere作为我的服务器。
请帮我解决dom4j的问题。提前感谢您的帮助。
POM文件.. 我已经在本文中删除了一些条目。
我能够在代码中导入JAXRS类而不需要在lib文件中添加jaxrs。 但是我无法访问DOM4J类。我正在使用web-sphere作为我的服务器。
请帮我解决dom4j的问题。提前感谢您的帮助。
POM文件.. 我已经在本文中删除了一些条目。
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>.......</artifactId>
<version>1</version>
<build>
<defaultGoal>install</defaultGoal>
</build>
<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
.....
.....
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.5</version>
</dependency>
</dependencies>
</project>
我的类路径
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere Application Server v8.0 JRE">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path=".apt_generated">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.ibm.ws.ast.st.runtime.runtimeTarget.v80/WebSphere Application Server v8.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
</classpath>
我正在使用Websphere 8作为我的服务器。