History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: MPANT-7
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: David Eric Pugh
Reporter: Mike Bowler
Votes: 4
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Ant Plugin

ant-plugin not obeying jar override

Created: 25/Mar/03 12:16 PM   Updated: 07/Apr/05 05:11 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.9

Time Tracking:
Not Specified

Environment: Sun JDK1.3.1 on windows. Maven from cvs on March 24, 2003


 Description  « Hide
When using the ant-plugin to generate an ant build file, the generated <get> tags do not obey the jar overrides specified in project.properties. All <get> tags attempt to load the jars from ibiblio even though an override was specified that points to the local harddrive. Overrides are being used because the jar files in question are proprietary and cannot be uploaded to ibiblio.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
dion gillard - 28/Mar/04 06:21 PM
So the suggested behaviour is to not produce <get>'s if a jar override is in place and use a <copy>?

Jerome Lacoste - 19/Jul/04 09:24 AM
Or could one override the src <get> uses when using an overriden jar.

Jerome Lacoste - 19/Jul/04 09:34 AM
The problem is I think in the get-deps build.jelly template.

<j:forEach var="dep" items="${pom.dependencies}">
<!-- note: this is a valid use of artifactDirectory -->
<get
src="${repo}/${dep.artifactDirectory}/${dep.type}s/${dep.artifact}"
dest="$${libdir}/${dep.artifact}"
usetimestamp="true"
ignoreerrors="true"
/></j:forEach>

See http://cvs.apache.org/viewcvs.cgi/maven-plugins/ant/src/plugin-resources/templates/build.jelly?rev=1.17&view=markup


Sean Kelly - 29/Jul/04 04:31 PM
+1 on getting this fixed.

I've got a similar scenario: we've got two Maven repositories defined in maven.repo.remote. One is ibiblio, the other is a private one accessible only within the organizational domain.

When organizational users try to build a source distribution with ant, the build fails to get the dependencies because the first repository is used from maven.repo.remote, due to this code:

<!-- get first repo in the list -->
<u:tokenize var="repos" delim=",">${maven.repo.remote}</u:tokenize>
<j:set var="repo">${repos[0]}</j:set>

Although not elegant, a workaround might be to generate each "get" with each repository (making M times N <get>'s for M repositories and N dependencies), and hope that timestamps prevent the unnecessary downloads.


David Eric Pugh - 23/Nov/04 12:20 PM
I have tweaked it so that included jar's that are used via jar override are resolved properly. Instead of a get, a copy is done instead. I am using this successfully to build commons-email's "build.xml" file.

I tried to assign this to myself and got a jira exception.


Felipe Leme - 23/Nov/04 09:40 PM
Re-assigning it...

Arnaud Heritier - 26/Feb/05 08:07 PM
David, your fix seems to be good. Can we close this issue ?

Arnaud Heritier - 07/Apr/05 05:11 PM
Fixed. Will be reopened if necessary.