You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Barry Kaplan (JIRA)" <ji...@codehaus.org> on 2005/11/18 02:25:06 UTC

[jira] Created: (MNG-1605) Allow eclipse source to be specified at the dependency level

Allow eclipse source to be specified at the dependency level
------------------------------------------------------------

         Key: MNG-1605
         URL: http://jira.codehaus.org/browse/MNG-1605
     Project: Maven 2
        Type: New Feature
  Components: maven-eclipse-plugin  
    Versions: 2.0    
    Reporter: Barry Kaplan


Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.

Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:

    <dependency>
        <groupId>backport-util-concurrent</groupId>
        <artifactId>backport-util-concurrent</artifactId>
        <version>2.0_01_pd</version>
        <scope>runtime</scope>
        <properties>
            <property name="eclipse.downloadSources" value="true"/>
        </properties>
    </dependency>


(For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "Barry Kaplan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1605?page=comments#action_52105 ] 

Barry Kaplan commented on MNG-1605:
-----------------------------------

A correct output path would have the project prepended, eg: "iris-infra/target/eclipse-classes". This is indeed what is created when running from the leaf project, not what I showed above.

It appears the only thing that could have broke with were the changes to EclipseClasspathWriter and EclipseUtils.

> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan
>     Assignee: fabrizio giustina

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "fabrizio giustina (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-1605?page=all ]
     
fabrizio giustina closed MNG-1605:
----------------------------------

     Assign To: fabrizio giustina
    Resolution: Won't Fix

> But when you say "remote" repository, do you mean anything other then the local cache? 
anything other than the (single) local repository specified in settings.xml.

Since you agree on the current solution I close this issue as fixed.

A new version of the plugin with the fixed download flag will be out ASAP, in the meanwhile you can install the version currently in SVN by running:
  svn checkout http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-eclipse-plugin maven-eclipse-plugin
  cd maven-eclipse-plugin
  mvn install



> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan
>     Assignee: fabrizio giustina

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "fabrizio giustina (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1605?page=comments#action_52055 ] 

fabrizio giustina commented on MNG-1605:
----------------------------------------

> Source downloading, even (especially?) for sources that don't exist, is very time consuming. 
Time consuming only for sources that don't exist in the local repository. Once a source jar has been downloaded, the eclipse plugin will never spend time anymore for checking remote repositories.

I don't think adding a dependency-specific flag could be a good solution, the eclipse.downloadSources should remain a global flag.

You have the following options:
- don't set eclipse.downloadSources to true and only sources in the local repo will be used (note that this is broken in the current release, but it's how it's expected to work)
- if you want to download sources for artifact run eclipse:eclipse with eclipse.downloadSources=true once a while. If a source jar is available on the remote repo it will be downloaded, and it will be used in future without the need for additional checks.
- You can manually add source jars to your local repositories for dependencies that don't exist in the remote repo. The eclipse plugin will use those and will not try do download them anymore.
Also note that recently a good number of source jars have been uploaded to the m2 repository, and the number of sources available is expected to grow.

Said that, I would like to close this issue as a won't fix. Other thoughts?


> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "fabrizio giustina (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1605?page=comments#action_52123 ] 

fabrizio giustina commented on MNG-1605:
----------------------------------------

Hi Barry, would you mind opening a separate issue for the problems you reported and with some more explanations?

> When the eclipse project is generated from the leaf project directory, the output path is created correctly as "target/eclipse-classes".
> However, when I generated eclipse projects via the root project using multi-project, the output path has a drive letter prepended, eg "R:target/eclipse-classes". 
I tried reproducing this with a unit test, and I'm going to fix some issues, but I'm not sure if it's the same problem you are seeing with the drive letter... can you post the eclipse plugin configuration in both the parent and module pom.xml + a description of your directory layout?

> A correct output path would have the project prepended, eg: "iris-infra/target/eclipse-classes"
why? Shouldn't the output simply be <classpathentry kind="output" path="target/eclipse-classes"/> ?

> This caused the following warnings:
> [WARNING] This plugin currently doesn't support include patterns for resources. Adding the entire directory. 
I wasn't unable to reproduce this problem, the warning should be issued only if you are using include/exclude patters in resource dirs, are you sure this is related to the path with the // prepended?

> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan
>     Assignee: fabrizio giustina

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "Barry Kaplan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1605?page=comments#action_52106 ] 

Barry Kaplan commented on MNG-1605:
-----------------------------------

Workaround: I changed the plugin config to: 

	<configuration>
		<outputDirectory>//${project.artifactId}/target/eclipse-classes</outputDirectory>
	</configuration>

This caused the following warnings:

[INFO] [eclipse:eclipse]
[WARNING] This plugin currently doesn't support include patterns for resources. Adding the entire directory.
[WARNING] This plugin currently doesn't support include patterns for resources. Adding the entire directory.
[WARNING] This plugin currently doesn't support include patterns for resources. Adding the entire directory.
[WARNING] This plugin currently doesn't support include patterns for resources. Adding the entire directory.
[WARNING] This plugin currently doesn't support include patterns for resources. Adding the entire directory.

Which caused noticable delays for the directories with lots of files. But it did create the correct output path.


> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan
>     Assignee: fabrizio giustina

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "Barry Kaplan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1605?page=comments#action_52129 ] 

Barry Kaplan commented on MNG-1605:
-----------------------------------

Ok, I created MNG-1695 and attached a sample project hierarchy that can be used to demostrate the problem.

As for:
>> A correct output path would have the project prepended, eg: "iris-infra/target/eclipse-classes"
>why? Shouldn't the output simply be <classpathentry kind="output" path="target/eclipse-classes"/> ? 

Eclipse then complains "Path '/target/eclipse-classes' must denote location inside project iris-infra". This is one the cases in MNG-1695, but you will need to load the project in eclipse, and then open the project properties build path tab to see the message.

> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan
>     Assignee: fabrizio giustina

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "Barry Kaplan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1605?page=comments#action_52107 ] 

Barry Kaplan commented on MNG-1605:
-----------------------------------

BTW, only with the double slashes do I get the warning. But the double slash was the only thing I could find that worked. I tried all kinds other combinations.

> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan
>     Assignee: fabrizio giustina

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "Barry Kaplan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1605?page=comments#action_52104 ] 

Barry Kaplan commented on MNG-1605:
-----------------------------------

Thanks Fabrizio. All works except the output path. I have the following defined:

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-eclipse-plugin</artifactId>
					<configuration>
						<outputDirectory>/target/eclipse-classes</outputDirectory>
					</configuration>
				</plugin>
                                ...

When the eclipse project is generated from the leaf project directory, the output path is created correctly as "target/eclipse-classes". However, when I generated eclipse projects via the root project using multi-project, the output path has a drive letter prepended, eg "R:target/eclipse-classes".

(I haven't yet tried to see why this might be.)

> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan
>     Assignee: fabrizio giustina

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1605?page=comments#action_51484 ] 

Brett Porter commented on MNG-1605:
-----------------------------------

this should not be done via dependency properites but instead by a configuration filter, if implemented

> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-1605) Allow eclipse source to be specified at the dependency level

Posted by "Barry Kaplan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-1605?page=comments#action_52072 ] 

Barry Kaplan commented on MNG-1605:
-----------------------------------

If [in the non-broke state] the sources will be used if they exists even without the flag, then running with the flag once in a while should be fine. Much simpler than adding dependency-level complexity, and agree with the "wont-fix".

But when you say "remote" repository, do you mean anything other then the local cache? Or are repositories explictly defined considered non-remote also?

> Allow eclipse source to be specified at the dependency level
> ------------------------------------------------------------
>
>          Key: MNG-1605
>          URL: http://jira.codehaus.org/browse/MNG-1605
>      Project: Maven 2
>         Type: New Feature
>   Components: maven-eclipse-plugin
>     Versions: 2.0
>     Reporter: Barry Kaplan

>
>
> Many (most?) projects do not have sources uploaded. And in any case, most projects only need a small subset of the sources. Source downloading, even (especially?) for sources that don't exist, is very time consuming.
> Therefore, it would be nice to specify this eclipse plugin specific option as the dependency level. Maybe something like:
>     <dependency>
>         <groupId>backport-util-concurrent</groupId>
>         <artifactId>backport-util-concurrent</artifactId>
>         <version>2.0_01_pd</version>
>         <scope>runtime</scope>
>         <properties>
>             <property name="eclipse.downloadSources" value="true"/>
>         </properties>
>     </dependency>
> (For this to be general, it would of course require a much different model than the simple plugin-level property injection. )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org