Does IntelliJ IDEA support indirect classpath referene in META-INF/MANIFEST.MF/Class-Path: property?
I used glassfish v3 to develop ejb 3.1 program. and import gf-client.jar to classpath. but it could not find the jars referenced by gf-client.jar, the META-INF/MANIFEST.MF as follows:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: Apache Maven
Archiver-Version: Plexus Archiver
Built-By: java_re
Build-Jdk: 1.6.0_10
Package: org.glassfish.appclient.client.acc
Main-Class: org.glassfish.appclient.client.AppClientFacade
PreMain-Class: org.glassfish.appclient.client.acc.agent.AppClientConta
inerAgent
Class-Path: ../modules/woodstox-osgi.jar ../modules/tools.jar ../modul
es/glassfish-corba-asm.jar ../modules/glassfish-corba-codegen.jar ../
modules/glassfish-corba-csiv2-idl.jar ../modules/glassfish-corba-newt
imer.jar ../modules/glassfish-corba-omgapi.jar ../modules/glassfish-c
orba-orb.jar ../modules/glassfish-corba-orbgeneric.jar ../modules/aut
o-depends.jar ../modules/config.jar ../modules/config-types.jar ../mo
dules/hk2.jar ../modules/hk2-core.jar ../modules/osgi-adapter.jar ../
modules/tiger-types-osgi.jar ../modules/grizzly-comet.jar ../modules/
grizzly-config.jar ../modules/grizzly-framework.jar ../modules/grizzl
y-http.jar ../modules/grizzly-http-servlet.jar ../modules/grizzly-por
tunif.jar ../modules/grizzly-rcm.jar ../modules/grizzly-utils.jar ../
modules/pkg-client.jar ../modules/jaxb-osgi.jar ../modules/webservice
s-osgi.jar ../modules/activation.jar ../modules/el-api.jar ../modules
/mail.jar ../modules/endorsed/webservices-api-osgi.jar ../modules/end
orsed/jaxb-api-osgi.jar ../modules/junit.jar ../modules/javax.persist
ence.jar ../modules/org.eclipse.persistence.antlr.jar ../modules/org.
eclipse.persistence.asm.jar ../modules/org.eclipse.persistence.core.j
ar ../modules/org.eclipse.persistence.jpa.jar ../modules/org.eclipse.
persistence.jpa.modelgen.jar ../modules/org.eclipse.persistence.oracl
e.jar ../modules/bean-validator.jar ../modules/endorsed/javax.annotat
ion.jar ../modules/javax.ejb.jar ../modules/javax.enterprise.deploy.j
ar ../modules/javax.jms.jar ../modules/javax.management.j2ee.jar ../m
odules/javax.resource.jar ../modules/javax.security.auth.message.jar
../modules/javax.security.jacc.jar ../modules/javax.servlet.jar ../mo
dules/javax.servlet.jsp.jar ../modules/javax.transaction.jar ../modul
es/admin-core.jar ../modules/admin-util.jar ../modules/cli-framework.
jar ../modules/config-api.jar ../modules/monitoring-core.jar ../modul
es/acc-config.jar ../modules/gf-client-module.jar ../modules/amx-core
.jar ../modules/amx-j2ee.jar ../modules/annotation-framework.jar ../m
odules/common-util.jar ../modules/container-common.jar ../modules/gla
ssfish-api.jar ../modules/glassfish-ee-api.jar ../modules/glassfish-n
aming.jar ../modules/internal-api.jar ../modules/stats77.jar ../modul
es/connectors-inbound-runtime.jar ../modules/connectors-internal-api.
jar ../modules/connectors-runtime.jar ../modules/work-management.jar
../modules/glassfish.jar ../modules/kernel.jar ../modules/deployment-
common.jar ../modules/deployment-javaee-core.jar ../modules/dol.jar .
./modules/dtds.zip ../modules/schemas.zip ../modules/ejb-container.ja
r ../modules/ejb-internal-api.jar ../modules/asm-all-repackaged.jar .
./modules/ldapbp-repackaged.jar ../modules/management-api.jar ../modu
les/flashlight-agent.jar ../modules/flashlight-framework.jar ../modul
es/gmbal.jar ../modules/jms-core.jar ../modules/orb-connector.jar ../
modules/orb-iiop.jar ../modules/eclipselink-wrapper.pom ../modules/jp
a-connector.jar ../modules/persistence-common.jar ../modules/cmp-inte
rnal-api.jar ../modules/appclient.security.jar ../modules/ejb.securit
y.jar ../modules/security.jar ../modules/websecurity.jar ../modules/w
ebservices.security.jar ../modules/jta.jar ../modules/jts.jar ../modu
les/transaction-internal-api.jar ../modules/el-impl.jar ../modules/js
p-impl.jar ../modules/war-util.jar ../modules/web-cli.jar ../modules/
web-core.jar ../modules/web-glue.jar ../modules/web-gui-plugin-common
.jar ../modules/web-naming.jar ../modules/jsr109-impl.jar ../modules/
mimepull.jar ../../mq/lib/imq.jar ../../mq/lib/imqadmin.jar ../../mq/
lib/imqutil.jar ../../mq/lib/fscontext.jar ../lib/install/application
s/jmsra/imqjmsra.jar ../lib/install/applications/__ds_jdbc_ra/__ds_jd
bc_ra.jar ../lib/install/applications/__cp_jdbc_ra/__cp_jdbc_ra.jar .
./lib/install/applications/__xa_jdbc_ra/__xa_jdbc_ra.jar ../lib/insta
ll/applications/__dm_jdbc_ra/__dm_jdbc_ra.jar ../../javadb/lib/derby.
jar ../../javadb/lib/derbyclient.jar ../../javadb/lib/derbynet.jar ..
/../javadb/lib/derbytools.jar ../../javadb/lib/derbyrun.jar ../lib/in
stall/applications/jaxr-ra/jaxr-ra.jar
thanks in advance!
请先登录再写评论。
IDEA doesn't take manifest.mf into account when searching for classes. If you want to use classes from some jar in your code you need to add that jar
as a library in Project Structure dialog.
>
>
>
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
I actually ran into this problem today. I do wish IntelliJ would have this option to automaticlly import the entries in Class-Path in a MANIFEST.MF as the External Libraries. A standalone java program and jar with proper MANIFEST works on command line, but then IDE is not is a bit annoying. Also this feature works as expected in Eclipse. So it's a bummer IntelliJ not able to do this.
@saltnight5, do you know if this is still an issue, and did you find a work-around? Hopefully you'll get this message as I don't see any way to contact someone directly on this forum.
If it is still an issue, is there a ticket I can track on YouTrack?
if anyone is interested, it's at https://youtrack.jetbrains.com/issue/IDEA-130132