You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/12/06 09:19:21 UTC
[jira] Created: (MPECLIPSE-60) Downloading source zips
Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Mon, 6 Dec 2004 3:18 AM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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: (MPECLIPSE-60) Downloading source zips
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_55185 ]
Stephane Nicoll commented on MPECLIPSE-60:
------------------------------------------
OK. So maven one has now a source plugin which is currently available in the [plugins-sandbox|http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins-sandbox/trunk/source/].
The plugin deploys/installs the source archive in a location with maven2 legacy mode (i.e. java-sources/${artifactId}-${version}-sources.jar).
We now need to include download of such artifact. Milos Kleint has a solution for the mevenide plugin which I am gonna mimic.
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Assignee: Stephane Nicoll
> Fix For: 1.10
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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] Updated: (MPECLIPSE-60) Downloading source zips
Posted by ji...@codehaus.org.
The following issue has been updated:
Updater: Krystian Nowak (mailto:krystian@man.poznan.pl)
Date: Mon, 6 Dec 2004 3:19 AM
Comment:
plugin.jelly patch as a file
Changes:
Attachment changed to plugin.jelly.patch
---------------------------------------------------------------------
For a full history of the issue, see:
http://jira.codehaus.org/browse/MPECLIPSE-60?page=history
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Mon, 6 Dec 2004 3:19 AM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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: (MPECLIPSE-60) Downloading source zips
Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_38644 ]
Joerg Schaible commented on MPECLIPSE-60:
-----------------------------------------
Just wonder, if the property should really be named "eclipse.source", since IDEA has the same functionality. "sourceCode" or "IDE.source" might be more appropriate.
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Fix For: 1.9
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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] Updated: (MPECLIPSE-60) Downloading source zips
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=all ]
Stephane Nicoll updated MPECLIPSE-60:
-------------------------------------
Attachment: MPECLIPSE-60.patch
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Assignee: Stephane Nicoll
> Fix For: 1.11
> Attachments: MPECLIPSE-60.patch, plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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] Resolved: (MPECLIPSE-60) Downloading source zips
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=all ]
Stephane Nicoll resolved MPECLIPSE-60:
--------------------------------------
Resolution: Fixed
OK ; It is resolved (finally!).
The plugin downloads source archives from the remote repository. This could be disabled, see the doc for more details.
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Assignee: Stephane Nicoll
> Fix For: 1.11
> Attachments: MPECLIPSE-60.patch, plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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] Updated: (MPECLIPSE-60) Downloading source zips
Posted by "fabrizio giustina (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=all ]
fabrizio giustina updated MPECLIPSE-60:
---------------------------------------
Fix Version: (was: 1.9)
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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] Updated: (MPECLIPSE-60) Downloading source zips
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=all ]
Stephane Nicoll updated MPECLIPSE-60:
-------------------------------------
Fix Version: 1.10
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Assignee: Stephane Nicoll
> Fix For: 1.10
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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: (MPECLIPSE-60) Downloading source zips
Posted by "Milos Kleint (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_38719 ]
Milos Kleint commented on MPECLIPSE-60:
---------------------------------------
I've added an enhancement to maven-dist-plugin for creation and upload of source file distributions that are similar to javadoc distributions - MPDIST-21.
it allows to upload the source artifact to repository/${groupId}/src.jars/${artifactid}-{$version}.src.jar which is consistent with the javadoc plugin.
It allows me to check for the src jar in mevenide and download it if it exists. The repository/${groupId}/src/<name>.zip location seems lessconsistent and doesn't have a countepart on the upload side.
I don't think a dependency property is necessary, this can be trasparently checked for *any* dependency. Once we have a standard location and format of the source artifact.
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Fix For: 1.9
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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] Updated: (MPECLIPSE-60) Downloading source zips
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=all ]
Stephane Nicoll updated MPECLIPSE-60:
-------------------------------------
Fix Version: (was: 1.10)
1.11
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Assignee: Stephane Nicoll
> Fix For: 1.11
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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: (MPECLIPSE-60) Downloading source zips
Posted by ji...@codehaus.org.
The following comment has been added to this issue:
Author: Krystian Nowak
Created: Tue, 21 Dec 2004 7:42 AM
Body:
Hmmm... I hope that maven-plugins commiters will do that, if they found it valuable. It's only a proposal. If you want, you can use the patch yourself, but I don't know plans for maven-eclipse-plugin future.
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_28246
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Tue, 21 Dec 2004 7:42 AM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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: (MPECLIPSE-60) Downloading source zips
Posted by "Krystian Nowak (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_38712 ]
Krystian Nowak commented on MPECLIPSE-60:
-----------------------------------------
to http://jira.codehaus.org/browse/MPECLIPSE-60#action_38644 (by Joerg Schaible)
Hmmm... since it is a eclipse plugin, and there was already a property called eclipse.dependency I've just added eclipse.source. There is nothing more general e.g. IDE.dependency, so there is neither IDE.source. It's an architectural issue. If there would be a general plugin core and more specific plugins to this plugin (;)) for given IDEs there we could change the name to IDE.* and then filter it in (where?) some specific configuration file for given IDE (e.g. idea.properties or eclipse.properties). But for simplicity let's let it as it is - just eclipse.*
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Fix For: 1.9
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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: (MPECLIPSE-60) Downloading source zips
Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_38718 ]
Joerg Schaible commented on MPECLIPSE-60:
-----------------------------------------
Its not just IDEs. Think about the javadoc URL. That can be used by eclipse plugin, but also by the javadoc plugin, that has nothing to do with IDEs. At our location, we have people working with different IDEs for the same project. So it seems quite silly to add the same information twice.
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Fix For: 1.9
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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: (MPECLIPSE-60) Downloading source zips
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_50558 ]
Stephane Nicoll commented on MPECLIPSE-60:
------------------------------------------
No, I don't have such use case. If it could be disabled globally (property) that's fine with me.
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Fix For: 1.9
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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: (MPECLIPSE-60) Downloading source zips
Posted by "Milos Kleint (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_38754 ]
Milos Kleint commented on MPECLIPSE-60:
---------------------------------------
maybe a separate goal or a goal parameter property could do?
do you have a usecase when you want to check for one dependency and not for another one? (if yes, a dependency property is probably necessary but I can't imagine the usecase)
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Fix For: 1.9
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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: (MPECLIPSE-60) Downloading source zips
Posted by ji...@codehaus.org.
The following comment has been added to this issue:
Author: Krystian Nowak
Created: Mon, 10 Jan 2005 4:26 AM
Body:
to http://jira.codehaus.org/browse/MPECLIPSE-60#action_28273 (by Stephane Nicoll)
OK. EJB could be included. In my project I just didn't use any EJB dependencies. Conclusion - GOOD IDEA.
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_28797
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Mon, 10 Jan 2005 4:26 AM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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: (MPECLIPSE-60) Downloading source zips
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_38720 ]
Stephane Nicoll commented on MPECLIPSE-60:
------------------------------------------
> I don't think a dependency property is necessary, this can be trasparently checked for *any* dependency. Once we have a standard location and format of the source artifact.
Well, it could be. However, I think you might need to disable the behavior somehow (if I am not interested, the plugin should not check the repository for something I don't want).
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Fix For: 1.9
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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: (MPECLIPSE-60) Downloading source zips
Posted by ji...@codehaus.org.
The following comment has been added to this issue:
Author: Krystian Nowak
Created: Tue, 11 Jan 2005 7:30 AM
Body:
to http://jira.codehaus.org/browse/MPECLIPSE-60#action_28830 (by Stephane Nicoll)
Of course you are welcome to assist on the plugin version/diff development!
In my project I do not use SNAPSHOT dependencies, so I guess that is why I had none of the problems you descibed. Conclusion: Please help if you have some time and ideas.
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_28832
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Tue, 11 Jan 2005 7:30 AM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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: (MPECLIPSE-60) Downloading source zips
Posted by ji...@codehaus.org.
The following comment has been added to this issue:
Author: Krystian Nowak
Created: Mon, 10 Jan 2005 4:30 AM
Body:
to http://jira.codehaus.org/browse/MPECLIPSE-60#action_28350 (by Scott D. Ryan)
If you could, please, include diff/patch file in JIRA issue/comment.
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_28798
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Mon, 10 Jan 2005 4:30 AM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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: (MPECLIPSE-60) Downloading source zips
Posted by ji...@codehaus.org.
The following comment has been added to this issue:
Author: Scott D. Ryan
Created: Mon, 27 Dec 2004 1:27 PM
Body:
This has proven very useful. I modified it to use the maven dist plug-in. This allows us to use the dist plug-in to generate the source code in a Maven standard way but also use this extension to download the code onto the local repository.
I hope this gets into the plugin soon.,
Scott
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_28350
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Mon, 27 Dec 2004 1:27 PM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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: (MPECLIPSE-60) Downloading source zips
Posted by ji...@codehaus.org.
The following comment has been added to this issue:
Author: Stephane Nicoll
Created: Tue, 11 Jan 2005 5:22 AM
Body:
Unfortunately, this patch does not handle SNAPSHOT dependencies. We have regular problems here with this patch.
If we depend on XXX-SNAPSHOT, the jelly code does not download the sources again.
The only solution so far is to clear our local cache and reinvoke the plugin. I think we could use maven standard dependencie's mechanism, right?
I can assist on this if necessary (Let me know)
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_28830
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Tue, 11 Jan 2005 5:22 AM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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: (MPECLIPSE-60) Downloading source zips
Posted by ji...@codehaus.org.
The following comment has been added to this issue:
Author: Stephane Nicoll
Created: Tue, 21 Dec 2004 6:42 AM
Body:
Are you planning to include this patch in 1.10?
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_28245
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Tue, 21 Dec 2004 6:42 AM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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: (MPECLIPSE-60) Downloading source zips
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_54321 ]
Stephane Nicoll commented on MPECLIPSE-60:
------------------------------------------
Guys,
We need to include this in 1.11 I think. I don't think that M1 has a "java source" artifact right? Even if the patch sounds like a workaround, it's really needed. Without it, the source inclusion does not make much sense.
> Downloading source zips
> -----------------------
>
> Key: MPECLIPSE-60
> URL: http://jira.codehaus.org/browse/MPECLIPSE-60
> Project: maven-eclipse-plugin
> Type: New Feature
> Versions: 1.9
> Reporter: Krystian Nowak
> Attachments: plugin.jelly.patch
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
> It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
> (...)
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <url>http://www.junit.org/</url>
> <properties>
> <eclipse.source>true</eclipse.source>
> </properties>
> </dependency>
> </dependencies>
> (...)
> What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
> And here is the code of plugin.jelly - a patch made in Eclipse:
> Index: plugin.jelly
> ===================================================================
> RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
> retrieving revision 1.31
> diff -u -r1.31 plugin.jelly
> --- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
> +++ plugin.jelly 6 Dec 2004 08:10:33 -0000
> @@ -78,7 +78,8 @@
> <!-- Generate Eclipse .classpath file -->
> <!--==================================================================-->
> <goal name="eclipse:generate-classpath"
> - description="Generate Eclipse .classpath file">
> + description="Generate Eclipse .classpath file"
> + prereqs="eclipse:sources:download">
>
> <ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
> <j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
> @@ -263,5 +264,73 @@
>
> <ant:echo>Cleaned up eclipse generated files</ant:echo>
> </goal>
> +
> +
> +
> + <!--==================================================================-->
> + <!-- Download project dependency sources -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:sources:download">
> + <j:forEach var="depItem" items="${pom.getDependencies()}">
> + <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
> + <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
> + <j:set var="groupId" value="${depItem.getGroupId()}"/>
> + <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
> + <j:set var="version" value="${depItem.getVersion()}"/>
> + <attainGoal name="eclipse:source:download"/>
> + <j:remove var="groupId"/>
> + <j:remove var="artifactId"/>
> + <j:remove var="version"/>
> + </j:if>
> + </j:if>
> + </j:forEach>
> + </goal>
> +
> +
> + <!--==================================================================-->
> + <!-- Download single source -->
> + <!--==================================================================-->
> +
> + <goal name="eclipse:source:download">
> + <!--
> + param: groupId
> + param: artifactId
> + param: version
> + -->
> + <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
> + <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
> + <j:if test="${!localSrcFile.exists()}">
> + <mkdir dir="${maven.repo.local}/${groupId}/src" />
> + <j:set var="repoList">${maven.repo.remote}</j:set>
> + <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
> + <j:forEach var="repo" items="${repos}">
> + <echo>repo is '${repo}'</echo>
> + <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
> + <echo>trying to download ${remoteFile}</echo>
> + <j:catch var="ex">
> + <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
> + <j:arg type="java.lang.String" value="${remoteFile}" />
> + <j:arg type="java.io.File" value="${localSrcFile}"/>
> + <j:arg type="boolean" value="false"/>
> + <j:arg type="boolean" value="true"/>
> + <j:arg type="java.lang.String" value="${maven.proxy.host}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.port}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.username}" />
> + <j:arg type="java.lang.String" value="${maven.proxy.password}" />
> + <j:arg type="boolean" value="false"/>
> + </j:invokeStatic>
> + </j:catch>
> + <j:remove var="remoteFile"/>
> + <j:break test="${localSrcFile.exists()}"/>
> + </j:forEach>
> + <j:if test="${!localSrcFile.exists()}">
> + <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
> + </j:if>
> + <j:remove var="repoList"/>
> + </j:if>
> + <j:remove var="localSrcFile"/>
> + </goal>
> +
>
> </project>
--
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: (MPECLIPSE-60) Downloading source zips
Posted by ji...@codehaus.org.
The following comment has been added to this issue:
Author: Stephane Nicoll
Created: Wed, 22 Dec 2004 9:44 AM
Body:
I don't agree with
<j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
What if I have an ejb-jar module in my dependencies? The type is ejb, not jar but still I want to include it in my eclipse sources.
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPECLIPSE-60?page=comments#action_28273
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPECLIPSE-60
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPECLIPSE-60
Summary: Downloading source zips
Type: New Feature
Status: Unassigned
Priority: Major
Original Estimate: 30 minutes
Time Spent: Unknown
Remaining: 30 minutes
Project: maven-eclipse-plugin
Fix Fors:
1.9
Versions:
1.9
Assignee:
Reporter: Krystian Nowak
Created: Mon, 6 Dec 2004 3:18 AM
Updated: Wed, 22 Dec 2004 9:44 AM
Description:
I've attached plugin.jelly for maven-eclipse-plugin downloading sources from ${repo}/${groupId}/src/${artifactId}-${version}.zip and installing it as ${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip.
It does it for all jar dependencies having eclipse.source property set to true. Example project.xml:
(...)
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<url>http://www.junit.org/</url>
<properties>
<eclipse.source>true</eclipse.source>
</properties>
</dependency>
</dependencies>
(...)
What you have to do now is to call "maven eclipse" and refresh your project in Eclipse.
And here is the code of plugin.jelly - a patch made in Eclipse:
Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/eclipse/plugin.jelly,v
retrieving revision 1.31
diff -u -r1.31 plugin.jelly
--- plugin.jelly 16 Nov 2004 10:48:15 -0000 1.31
+++ plugin.jelly 6 Dec 2004 08:10:33 -0000
@@ -78,7 +78,8 @@
<!-- Generate Eclipse .classpath file -->
<!--==================================================================-->
<goal name="eclipse:generate-classpath"
- description="Generate Eclipse .classpath file">
+ description="Generate Eclipse .classpath file"
+ prereqs="eclipse:sources:download">
<ant:echo>Creating ${basedir}/.classpath ...</ant:echo>
<j:file name="${basedir}/.classpath" prettyPrint="true" outputMode="xml" xmlns="dummy">
@@ -263,5 +264,73 @@
<ant:echo>Cleaned up eclipse generated files</ant:echo>
</goal>
+
+
+
+ <!--==================================================================-->
+ <!-- Download project dependency sources -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:sources:download">
+ <j:forEach var="depItem" items="${pom.getDependencies()}">
+ <j:if test="${depItem.getType().equalsIgnoreCase('jar')}">
+ <j:if test="${depItem.getProperty('eclipse.source') == 'true'}">
+ <j:set var="groupId" value="${depItem.getGroupId()}"/>
+ <j:set var="artifactId" value="${depItem.getArtifactId()}"/>
+ <j:set var="version" value="${depItem.getVersion()}"/>
+ <attainGoal name="eclipse:source:download"/>
+ <j:remove var="groupId"/>
+ <j:remove var="artifactId"/>
+ <j:remove var="version"/>
+ </j:if>
+ </j:if>
+ </j:forEach>
+ </goal>
+
+
+ <!--==================================================================-->
+ <!-- Download single source -->
+ <!--==================================================================-->
+
+ <goal name="eclipse:source:download">
+ <!--
+ param: groupId
+ param: artifactId
+ param: version
+ -->
+ <echo>Checking sources for ${groupId}:${artifactId} ver.${version}</echo>
+ <util:file var="localSrcFile" name="${maven.repo.local}/${groupId}/src/${artifactId}-${version}.zip" />
+ <j:if test="${!localSrcFile.exists()}">
+ <mkdir dir="${maven.repo.local}/${groupId}/src" />
+ <j:set var="repoList">${maven.repo.remote}</j:set>
+ <util:tokenize var="repos" delim=",">${repoList.trim()}</util:tokenize>
+ <j:forEach var="repo" items="${repos}">
+ <echo>repo is '${repo}'</echo>
+ <j:set var="remoteFile" value="${repo}/${groupId}/src/${artifactId}-${version}.zip" />
+ <echo>trying to download ${remoteFile}</echo>
+ <j:catch var="ex">
+ <j:invokeStatic var="dummy" method="getFile" className="org.apache.maven.util.HttpUtils">
+ <j:arg type="java.lang.String" value="${remoteFile}" />
+ <j:arg type="java.io.File" value="${localSrcFile}"/>
+ <j:arg type="boolean" value="false"/>
+ <j:arg type="boolean" value="true"/>
+ <j:arg type="java.lang.String" value="${maven.proxy.host}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.port}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.username}" />
+ <j:arg type="java.lang.String" value="${maven.proxy.password}" />
+ <j:arg type="boolean" value="false"/>
+ </j:invokeStatic>
+ </j:catch>
+ <j:remove var="remoteFile"/>
+ <j:break test="${localSrcFile.exists()}"/>
+ </j:forEach>
+ <j:if test="${!localSrcFile.exists()}">
+ <echo>WARN: Could not download sources for ${groupId}:${artifactId} ver.${version}</echo>
+ </j:if>
+ <j:remove var="repoList"/>
+ </j:if>
+ <j:remove var="localSrcFile"/>
+ </goal>
+
</project>
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report 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