How to get the source code for the javax:javaee-api-6.0.jar

限于喜欢 提交于 2019-12-05 22:14:52

问题


I use the javax:javaee-api-6.0.jar maven artifact.

<dependency>
  <groupId>javax</groupId>
  <artifactId>javaee-api</artifactId>
  <version>6.0</version>
  <scope>provided</scope>
</dependency>

I would like to download its source code with the dependency:sources mvn goal. I was looking for the sources in the official maven repositories, but I still can't find it.

Could you give me a bit of advice on how can I achieve my object? Thank you.


回答1:


Mich is correct.

The purpose of the javaee-api module is to satisfy compile-time dependencies (That is why the Maven scope is set to provided). The module contains interface declarations (or contract) which must be satisfied by the J2EE container you plan to use.

If you really need/want to see the source code, I'd suggest taking a look at one of the open source J2EE containers.




回答2:


see if these are any good and if they work for you http://repo1.maven.org/maven2/org/apache/openejb/javaee-api/




回答3:


Try this: (it has sources attached)

  <dependency>
     <groupId>org.jboss.spec</groupId>
     <artifactId>jboss-javaee-6.0</artifactId>
     <version>3.0.3.Final</version>
     <scope>provided</scope>
     <type>pom</type>
  </dependency>

It pulls in a huge number of dependencies, but as they are all provided you do effectively not alter your artifact.



来源:https://stackoverflow.com/questions/7457810/how-to-get-the-source-code-for-the-javaxjavaee-api-6-0-jar

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!