[jbosstools-issues] [JBoss JIRA] (JBIDE-14663) Source lookup dialog shown twice on maven projects

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Wed May 29 10:33:55 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-14663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777892#comment-12777892 ] 

Snjezana Peco edited comment on JBIDE-14663 at 5/29/13 10:32 AM:
-----------------------------------------------------------------

So, m2e also adds hardcoded source attachments to a non-maven project.

Test case:

- create a non-maven Java project
- add a mavenized library(commons-lang-2.6.jar, for instance) to the classpath
- ensure the library is in a local maven repository/index
You can do this by adding the common-lang:common-lang:2.6 artifact to the pom.xml of a maven project
- set the Source Lookup property to Prompt (or Never)
- remove a source attachment if exists; set .classpath as follows:

{code}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
	<classpathentry kind="lib" path="commons-lang-2.6.jar"/>
	<classpathentry kind="output" path="bin"/>
</classpath>
{code}

- try to open some class from common-lang-2.6.jar
- if you get our dialog, click "No" 
Our dialog can, but doesn't have to appear, depending on will the m2e action be executed before our action. 
No matter if our dialog appears and what we answer if it appears, m2e will add a hardcoded source attachment to .classpath.
If we import such a project on other machine, m2e won't validate the source attachment. The source lookup plugin will fix this.

See http://screencast.com/t/TNGDoOejmk

Fred,
If you still think a hardcoded source attachment in .classpath of a non maven project is a problem, then you need to create a bug against m2e.

I think we have to remove the dialog because the user will be confused if m2e adds a source attachment.

I also don't see any reason to treat maven and non-maven projects differently because of the following reasons:

- the Source Lookup source attachment action adds a few improvements to the m2e source attachment action for maven and non-maven projects (validating source attachment,  sha1 lookup ...)
- the Source Lookup source attachment action can be disabled 

We can also add the "Enable Source Lookup for maven projects" preference and set it to false by default.

                
      was (Author: snjeza):
    So, m2e also adds hardcoded source attachments to a non-maven project.

Test case:

- create a non-maven Java project
- add a mavenized library(commons-lang-2.6.jar, for instance) to the classpath
- ensure the library is in a local maven repository/index
You can do this by adding the common-lang:common-lang:2.6 artifact to the pom.xml of a maven project
- set the Source Lookup property to Prompt (or Never)
- remove a source attachment if exists; set .classpath as follows:

{quote}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
	<classpathentry kind="lib" path="commons-lang-2.6.jar"/>
	<classpathentry kind="output" path="bin"/>
</classpath>
{quote}

- try to open some class from common-lang-2.6.jar
- if you get our dialog, click "No" 
Our dialog can, but doesn't have to appear, depending on will the m2e action be executed before our action. 
No matter if our dialog appears and what we answer if it appears, m2e will add a hardcoded source attachment to .classpath.
If we import such a project on other machine, m2e won't validate the source attachment. The source lookup plugin will fix this.

See http://screencast.com/t/TNGDoOejmk

Fred,
If you still think a hardcoded source attachment in .classpath of a non maven project is a problem, then you need to create a bug against m2e.

I think we have to remove the dialog because the user will be confused if m2e adds a source attachment.

I also don't see any reason to treat maven and non-maven projects differently because of the following reasons:

- the Source Lookup source attachment action adds a few improvements to the m2e source attachment action for maven and non-maven projects (validating source attachment,  sha1 lookup ...)
- the Source Lookup source attachment action can be disabled 

We can also add the "Enable Source Lookup for maven projects" preference and set it to false by default.

                  
> Source lookup dialog shown twice on maven projects
> --------------------------------------------------
>
>                 Key: JBIDE-14663
>                 URL: https://issues.jboss.org/browse/JBIDE-14663
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: maven
>    Affects Versions: 4.1.0.Beta1
>            Reporter: Fred Bricon
>            Assignee: Fred Bricon
>              Labels: respin-b
>             Fix For: 4.1.0.Beta1
>
>
> Source lookup dialog is shown twice on maven projects : http://screencast.com/t/3yESat96FIw
> I think our source lookup should ignore projects with the maven nature, since a m2e's source lookup mechanism is already running in the background.
> If maven nature is enabled AND source is set but missing THEN, it'd be ok to show our own stuff

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list