maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (MNG-4437) maven-3\maven-plugin-api\src\main\java\org\apache\maven\plugin\descriptor\PluginDescriptor.java:[382,76] incompatible types found : java.lang.Object
Date Wed, 11 Nov 2009 16:17:56 GMT
maven-3\maven-plugin-api\src\main\java\org\apache\maven\plugin\descriptor\PluginDescriptor.java:[382,76]
incompatible types found   : java.lang.Object
------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: MNG-4437
                 URL: http://jira.codehaus.org/browse/MNG-4437
             Project: Maven 2
          Issue Type: Bug
          Components: Plugins and Lifecycle
    Affects Versions: 3.0-alpha-2
         Environment: java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode)

E:\Maven\maven-3\maven-plugin-api>mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)
Java version: 1.6.0_16
Java home: C:\Java\jdk\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

            Reporter: Martin Gainty
            Priority: Minor


maven-3>mvn -e -X compile
[DEBUG]  ${user.home}/.m2/repository/org/apache/maven/wagon
/wagon-provider-api/1.0-beta-4/wagon-provider-api-1.0-beta-4.jar
[DEBUG] Source roots:
[DEBUG]  maven-3/maven-plugin-api/src/main/java
[DEBUG]  maven-3/maven-plugin-api/target/generated-sources/modello
[INFO] Compiling 25 source files to maven-3/maven-plugin-api/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
maven-3\maven-plugin-api\src\main\java\org\apache\maven\plugin\descriptor\PluginDescriptor.java:[382,76]
incompatible types
found   : java.lang.Object
required: org.apache.maven.plugin.lifecycle.Lifecycle

/* contents of org.apache.maven.plugin.lifecycle.Lifecyle */
/** $Id$ */
package org.apache.maven.plugin.lifecycle;
  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/
import java.util.Date;

/**
 * A custom lifecycle mapping definition.
 * @version $Revision$ $Date$
 */
public class Lifecycle implements java.io.Serializable {
      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/
    /**
     * The ID of this lifecycle, for identification in the mojo
     * descriptor.
     */
    private String id;

    /*** Field phases. */
    private java.util.List phases;

      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method addPhase.
     * @param phase
     */
    public void addPhase( Phase phase )
    {
        if ( !(phase instanceof Phase) )
        {
            throw new ClassCastException( "Lifecycle.addPhases(phase) parameter must be instanceof
" + Phase.class.getName() );
        }
        getPhases().add( phase );
    } //-- void addPhase( Phase ) 

    /**
     * Get the ID of this lifecycle, for identification in the mojo
     * descriptor.
     * @return String
     */
    public String getId()
    {
        return this.id;
    } //-- String getId() 

    /**
     * Method getPhases.
     * @return java.util.List
     */
    public java.util.List getPhases()
    {
        if ( this.phases == null )
        {
            this.phases = new java.util.ArrayList();
        }
    
        return this.phases;
    } //-- java.util.List getPhases() 

    /**
     * Method removePhase.
     * @param phase
     */
    public void removePhase( Phase phase )
    {
        if ( !(phase instanceof Phase) )
        {
            throw new ClassCastException( "Lifecycle.removePhases(phase) parameter must be
instanceof " + Phase.class.getName() );
        }
        getPhases().remove( phase );
    } //-- void removePhase( Phase ) 

    /**
     * Set the ID of this lifecycle, for identification in the mojo
     * descriptor.
     * 
     * @param id
     */
    public void setId( String id )
    {
        this.id = id;
    } //-- void setId( String ) 

    /**
     * Set the phase mappings for this lifecycle.
     * 
     * @param phases
     */
    public void setPhases( java.util.List phases )
    {
        this.phases = phases;
    } //-- void setPhases( java.util.List ) 


    private String modelEncoding = "UTF-8";

    /**
     * Set an encoding used for reading/writing the model.
     * @param modelEncoding the encoding used when reading/writing the model.
     */
    public void setModelEncoding( String modelEncoding )
    {
        this.modelEncoding = modelEncoding;
    }
    /*** @return the current encoding used when reading/writing this model.*/
    public String getModelEncoding()
    {
        return modelEncoding;
    }
}

curious as to why this class was coded not to extend java.lang.Object?
11/11/'09

Martin

-- 
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

        

Mime
View raw message