Inspections & global libraries

Hi,

I still have not figured out how to run inspections on projects that use global
libraries. The FAQ says something about setting library.* properties, but it
doesn't explain what they actually have to be set to. What if a library
references multiple JARs?

Is there already a plan when the improved runner-configuration for inspections
will be available?

Thanks,
Sascha

7 comments
Comment actions Permalink

Hello Sascha,

Unfortunately in current version you can specify only one root per library.

Now we are working on unique interface for Ipr, Inspections and Duplicates
Runners with sections for JDK, Global Libraries and Path Variables Settings.

Thank you for your attention

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Hi,

I still have not figured out how to run inspections on projects that
use global libraries. The FAQ says something about setting library.*
properties, but it doesn't explain what they actually have to be set
to. What if a library references multiple JARs?

Is there already a plan when the improved runner-configuration for
inspections will be available?

Thanks,
Sascha



0
Comment actions Permalink

Hello Anna,

Unfortunately in current version you can specify only one root per library.


Ah, OK. With root, do you mean a single JAR i.e. something like
library.log4j=.../log4j-1.2.8.jar or a directory which includes all JARs inside?
(I think I already tried the latter one but it didn't work).

Now we are working on unique interface for Ipr, Inspections and
Duplicates Runners with sections for JDK, Global Libraries and Path
Variables Settings.


I know, and I'd be interested in when it will probably appear in the Agra EAP ;)

Sascha

0
Comment actions Permalink

Hello Sascha,

I expected library.log4j=.../log4j-1.2.8.jar

I think that Kir will answer you more accurately than me ;)

Thanks
-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Hello Anna,

>> Unfortunately in current version you can specify only one root per
>> library.
>>

Ah, OK. With root, do you mean a single JAR i.e. something like
library.log4j=.../log4j-1.2.8.jar or a directory which includes all
JARs inside? (I think I already tried the latter one but it didn't
work).

>> Now we are working on unique interface for Ipr, Inspections and
>> Duplicates Runners with sections for JDK, Global Libraries and Path
>> Variables Settings.
>>

I know, and I'd be interested in when it will probably appear in the
Agra EAP ;)

Sascha



0
Comment actions Permalink

Now we are working on unique interface for Ipr,

Inspections and

Duplicates Runners with sections for JDK, Global

Libraries and Path

Variables Settings.


I know, and I'd be interested in when it will
probably appear in the Agra EAP ;)


I hope you'll get it in a couple of weeks.

KIR

0
Comment actions Permalink

Hello Anna,

I expected library.log4j=.../log4j-1.2.8.jar


Hmm, that's what I tried. In my buildAgent.properties I've got

system.library.javax.servlet=/opt/buildagent/ext-libs/j2ee-1.4/src/javax.servlet.jar

and still e.g. the Javadoc inspections cannot find the servlet-classes ("Cannot
resolve symbol javax.servlet.http.HttpServletRequest"). Maybe this is related to
this exception that occurs a lot in the idea.log:

java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:89)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:96)
at
com.intellij.openapi.roots.impl.libraries.LibraryImpl.addRoot(LibraryImpl.java:70)
at
com.intellij.openapi.roots.impl.libraries.LibraryTableBase$LibraryModel.getLibraryByName(LibraryTableBase.java:45)
at
com.intellij.openapi.roots.impl.libraries.LibraryTableBase.getLibraryByName(LibraryTableBase.java:47)
at
com.intellij.openapi.deployment.LibraryLink.findLibrary(LibraryLink.java:65)
at
com.intellij.openapi.deployment.LibraryLinkImpl$LibraryInfoImpl.findLibrary(LibraryLinkImpl.java:0)
at
com.intellij.openapi.deployment.LibraryLinkImpl.getLibrary(LibraryLinkImpl.java:10)
at
com.intellij.openapi.deployment.LibraryLinkImpl.resolveElement(LibraryLinkImpl.java:9)
at
com.intellij.openapi.deployment.ModuleContainerImpl.getElements(ModuleContainerImpl.java:3)
at
com.intellij.openapi.deployment.ModuleContainerImpl.getElements(ModuleContainerImpl.java:142)
at
com.intellij.openapi.deployment.ModuleContainerImpl.getContainingModules(ModuleContainerImpl.java:143)

?

Sascha

0
Comment actions Permalink

Kirill Maximov (JetBrains) wrote:
>> I know, and I'd be interested in when it will
>> probably appear in the Agra EAP ;)


I hope you'll get it in a couple of weeks.


Thanks, looking forward to it ;)

Sascha

0
Comment actions Permalink

Hello Sascha,

Hello Anna,

>> I expected library.log4j=.../log4j-1.2.8.jar
>>

Hmm, that's what I tried. In my buildAgent.properties I've got

system.library.javax.servlet=/opt/buildagent/ext-libs/j2ee-1.4/src/jav
ax.servlet.jar

and still e.g. the Javadoc inspections cannot find the servlet-classes
("Cannot resolve symbol javax.servlet.http.HttpServletRequest"). Maybe
this is related to this exception that occurs a lot in the idea.log:

java.lang.Throwable
at
com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:89)
at
com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:96)
at
com.intellij.openapi.roots.impl.libraries.LibraryImpl.addRoot(LibraryI
mpl.java:70)
at
com.intellij.openapi.roots.impl.libraries.LibraryTableBase$LibraryMode
l.getLibraryByName(LibraryTableBase.java:45)
at
com.intellij.openapi.roots.impl.libraries.LibraryTableBase.getLibraryB
yName(LibraryTableBase.java:47)
at
com.intellij.openapi.deployment.LibraryLink.findLibrary(LibraryLink.ja
va:65)
at
com.intellij.openapi.deployment.LibraryLinkImpl$LibraryInfoImpl.findLi
brary(LibraryLinkImpl.java:0)
at
com.intellij.openapi.deployment.LibraryLinkImpl.getLibrary(LibraryLink
Impl.java:10)
at
com.intellij.openapi.deployment.LibraryLinkImpl.resolveElement(Library
LinkImpl.java:9)
at
com.intellij.openapi.deployment.ModuleContainerImpl.getElements(Module
ContainerImpl.java:3)
at
com.intellij.openapi.deployment.ModuleContainerImpl.getElements(Module
ContainerImpl.java:142)
at
com.intellij.openapi.deployment.ModuleContainerImpl.getContainingModul
es(ModuleContainerImpl.java:143)
?

Sascha


Yes, it is the point.

Thank you

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"


0

Please sign in to leave a comment.