[
https://issues.jboss.org/browse/JBIDE-9309?page=com.atlassian.jira.plugin...
]
Max Rydahl Andersen commented on JBIDE-9309:
--------------------------------------------
> 1) String url =
"https://repository.jboss.org/nexus/service/local/data_index?sha1=";
> Why is this hardcoded to
jboss.org index ?
> EAP source code won't be in here. It is also not necessarily available/correct if
you are using your own main nexus or artifactory server.
Is there any EAP Nexus indexer? If there is, we can add it.
No, but users might be using their own nexus and they might not have access to the
jboss.org location.
>It is also possible to add a preference so that a user could add
some other Nexus indexer in the case we plan to use this plugin to debug other,
non->>JBoss servers.
mkay.
> Can't it just use whatever mechanism standard m2e uses to
search for these across the repositories ?
That would be great, but m2e can't find sources if an archive
isn't in the Maven classpath container.
Yes I know that - but i'm pretty sure they don't use
jboss.org specific index to
resolve either and it seem to still work if you have it on maven classpath..
The Source lookup plugin works this way:
tries to find an artifact using a local maven repository indexer
tries to find an artifact using all the global maven repositories
M2e also uses such a searching mechanism, but attaches the source only to those archives
that are within the Maven classpath container.
The JBoss Source plugin additionally searches the source in the
following way:
checks if maven coordinates are defined in the META-INF/maven
directory
searches the JBoss Nexus repository (
https://repository.jboss.org/nexus/)
GAV, for instance, for jbossjts-4.16.0.Final.jar that is used in the JBoss AS 7.1 can only
be found using the
https://repository.jboss.org/nexus/. m2e >won't find the source
for this archive unless you specify GAV in the pom.xml. See the thread with subject
"JBoss Nexus Repository Indexer".
this sounds like a bug elsewhere...should find the root for that before I would accept we
add in specific
jboss.org specific search.
when the user debugs a server, the JBoss Source Lookup plugin will try
to find a class in an archive within a JBoss AS distribution.
M2e won't search source for an archive that is not in the Maven Classpath (archives
defined in a JBoss AS Runtime container, for instance).
M2e doesn't try to search sources for any archive that isn't on the classpath when
debugging.
no, that is fine - thats why we add this but lets not add too much magic if we can avoid
it.
> 2) it looks like it adds all .jar's found in the various AS
directories - how do we handle/cope duplicate content ? ...
When debugging some server (JBoss AS), we only know the FQN of a
class. The plugin searches all the libraries in a distribution and assumes that the
>class is placed in the first archive it encounters. If there are more versions of the
class with the same FQN, we can't know what jar is used.
will it look in the project classpath's first ? i.e. JSF .jars
exist in both v1 and v2 editions.
Yes, it will.
If the user defines the version of a jar in the pom.xml or adds an archive to the
classpath in another way, the JBoss Source Lookup will find the >correct version in the
project's classpath and won't use JBoss AS Container.
If no, we would be to search all archives within a distribution. If we
find a class with the same FQN in two or more archives, we could show a dialog >to the
user in which he would be able to choose what archive to use.
This sounds like a good thing - do we actually cache an index for this or are we searching
all the time ?
> 3) in context of #1 should we request that our EAP maven repo
download contains such generated index ?
Do you mean jboss-eap-6.0.0.DR11-maven-repository.zip? Sources for
most of the artifacts aren't contained by it.
Snjezana - that is something we should report then - it should be added then.
Easily adding full JBoss AS source
----------------------------------
Key: JBIDE-9309
URL:
https://issues.jboss.org/browse/JBIDE-9309
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: JBossAS/Servers
Reporter: arjan tijms
Assignee: Snjezana Peco
Labels: debugging, source
Fix For: 3.3.0.Beta1
Attachments: jbide-9309a.png
The JBoss AS server runtime from JBoss tools adds a library container to the classpath of
an Eclipse project. This container provides a large amount of jar files that make up JBoss
AS itself and the Java EE services it offers.
Attaching the source code for this is notoriously difficult. Because it concerns a large
amount of jar files, attaching source code for each jar is a rather tedious job.
For JBoss AS 5, the fact that the location of jars in the source archive was completely
different from the structure exposed in Eclipse or the binary build of JBoss AS, made it
very hard to actually locate the correct source jar. Sometimes even names were different,
making it even harder.
For JBoss AS 6, the source archive does not even contain the source for the majority of
the JBoss AS artifacts. Source for 'core functionality' (from the point of view of
the Java EE developer), like Servlet and JSF is missing. The user has to hunt the Internet
to find the correct source for the correct version that JBoss AS 6 uses. This makes an
already tedious job even more tedious.
I would like to request functionality where the user can point to a single
_jboss-src.xyz_ file that contains all sources. JBoss tools should then automatically
attach the right source from the archive to the right jar from the library container.
Alternatively the user could point to a maven repository (but this should not make the
Eclipse project dependent on maven).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira