The following comment has been added to this issue:

     Author: Kyle Adams
    Created: Wed, 7 Apr 2004 3:58 PM
       Body:
Brett,

I'd really prefer the setter not be removed.  Though it may not be used by Maven 
internally, it is useful for developers hooking into Maven.  I came across the 
original issue when writing Ant tasks that wrapped around Maven's DependencyVerifier 
(for JAR downloading from a repository) and the Artifact plugin (for JAR uploading to 
a repository).  The Ant task needs to be able to set the remote repos for the call to 
DependencyVerifier to be successful.
---------------------------------------------------------------------
View this comment:
  
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1205&page=comments#action_18345

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-1205

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-1205
    Summary: ClassCastException in MavenJellyContext.class
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven
 Components: 
             core
   Fix Fors:
             1.0-rc3
   Versions:
             1.1

   Assignee: 
   Reporter: Kyle Adams

    Created: Mon, 22 Mar 2004 9:57 AM
    Updated: Wed, 7 Apr 2004 3:58 PM

Description:
There seems to be a type mismatch between the getter and setter for the 
maven.repo.remote property in MavenJellyContext.class.

    public void setMavenRepoRemotes( List mavenRepoRemote )
    {
        setVariable( MavenConstants.REPO_REMOTE, mavenRepoRemote );
    }

    public List getMavenRepoRemote()
    {
        // We might have CSV list of remote repositories.
        return convertCsvStringToList( (String) getVariable( 
MavenConstants.REPO_REMOTE ) );
    }

As seen in the setter, maven.repo.remote gets set to a List, but the getter attempts 
to cast the variable to a string, before passing it to a helper function to convert it 
back to a list.  I'm not sure how Maven initially populates this property when reading 
in a POM, but it looks like there's some consistency problems in how that data is 
expected to be stored.  The attached patch deals with the situation as is through 
reflection, but long term code will probably need to be changed elsewhere to make sure 
everyone is storing the same type of data (be it a CSV or a List) in that property.


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to