Java EE依赖Maven

时间:2013-11-26 11:54:58

标签: maven java-ee

我有一个使用glassfish4作为运行时的EJB项目,我想使用eclipse将此项目转换为maven。当我按下转换按钮时,很多依赖项被添加到新创建的pom文件中。我在maven中使用了install命令以便下载那些依赖但却无法找到它们,我相信这些依赖是来自glassfish运行时,我是否必须添加它们?它们是否存在或者添加javaee api就足够了,而不是那些依赖。

修改 的pom.xml

    <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>org.itunit.itunit</groupId>
  <artifactId>itunit-core</artifactId>
  <version>1.0.2-SNAPSHOT</version>
  <dependencies>
    <dependency>
      <groupId>org.glassfish.main.common</groupId>
      <artifactId>glassfish-api</artifactId>
      <version>4.0</version>
    </dependency>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>javax.annotation-api</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api-osgi</artifactId>
      <version>2.2.7</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.metro</groupId>
      <artifactId>webservices-api-osgi</artifactId>
      <version>2.3</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.ha</groupId>
      <artifactId>ha-api</artifactId>
      <version>3.1.8</version>
    </dependency>
    <dependency>
      <groupId>javax.batch</groupId>
      <artifactId>javax.batch-api</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>javax.ejb</groupId>
      <artifactId>javax.ejb-api</artifactId>
      <version>3.2</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.el</artifactId>
      <version>3.0.0</version>
    </dependency>
    <dependency>
      <groupId>javax.enterprise.concurrent</groupId>
      <artifactId>javax.enterprise.concurrent-api</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.enterprise.concurrent</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>javax.enterprise.deploy</groupId>
      <artifactId>javax.enterprise.deploy-api</artifactId>
      <version>1.6</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.faces</artifactId>
      <version>2.2.2</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.hk2.external</groupId>
      <artifactId>javax.inject</artifactId>
      <version>2.1.92</version>
    </dependency>
    <dependency>
      <groupId>javax.interceptor</groupId>
      <artifactId>javax.interceptor-api</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>javax.jms</groupId>
      <artifactId>javax.jms-api</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>javax.json</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>com.sun.mail</groupId>
      <artifactId>javax.mail</artifactId>
      <version>1.5.0</version>
    </dependency>
    <dependency>
      <groupId>javax.management.j2ee</groupId>
      <artifactId>javax.management.j2ee-api</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>javax.resource</groupId>
      <artifactId>javax.resource-api</artifactId>
      <version>1.7</version>
    </dependency>
    <dependency>
      <groupId>javax.security.auth.message</groupId>
      <artifactId>javax.security.auth.message-api</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>javax.security.jacc</groupId>
      <artifactId>javax.security.jacc-api</artifactId>
      <version>1.5</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>javax.servlet.jsp-api</artifactId>
      <version>2.3.1</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.web</groupId>
      <artifactId>javax.servlet.jsp</artifactId>
      <version>2.3.2</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet.jsp.jstl</groupId>
      <artifactId>javax.servlet.jsp.jstl-api</artifactId>
      <version>1.2.1</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.web</groupId>
      <artifactId>javax.servlet.jsp.jstl</artifactId>
      <version>1.2.2</version>
    </dependency>
    <dependency>
      <groupId>javax.transaction</groupId>
      <artifactId>javax.transaction-api</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>javax.websocket</groupId>
      <artifactId>javax.websocket-api</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>javax.ws.rs-api</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>javax.xml.registry</groupId>
      <artifactId>javax.xml.registry-api</artifactId>
      <version>1.0.5</version>
    </dependency>
    <dependency>
      <groupId>javax.xml.rpc</groupId>
      <artifactId>javax.xml.rpc-api</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.ext</groupId>
      <artifactId>jersey-bean-validation</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-client</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-common</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-grizzly2-http</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet-core</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.containers.glassfish</groupId>
      <artifactId>jersey-gf-cdi</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.containers.glassfish</groupId>
      <artifactId>jersey-gf-ejb</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-jackson</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-jettison</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-json-processing</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-moxy</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-multipart</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.media</groupId>
      <artifactId>jersey-media-sse</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.main.web</groupId>
      <artifactId>jersey-mvc-connector</artifactId>
      <version>4.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.ext</groupId>
      <artifactId>jersey-mvc-jsp</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.ext</groupId>
      <artifactId>jersey-mvc</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-server</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>org.eclipse.persistence.oracle</artifactId>
      <version>2.5.0-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.main.webservices</groupId>
      <artifactId>webservices-connector</artifactId>
      <version>4.0</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.metro</groupId>
      <artifactId>webservices-extra-jdk-packages</artifactId>
      <version>2.3</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.metro</groupId>
      <artifactId>webservices-osgi</artifactId>
      <version>2.3</version>
    </dependency>
    <dependency>
      <groupId>org.glassfish.main.security</groupId>
      <artifactId>webservices.security</artifactId>
      <version>4.0</version>
    </dependency>
  </dependencies>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <resources>
      <resource>
        <directory>src</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

0 个答案:

没有答案