You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2003/12/08 19:13:24 UTC

cvs commit: maven-components/maven-project/src/test/org/apache/maven/project project.properties

jvanzyl     2003/12/08 10:13:24

  Modified:    maven-project/src/java/org/apache/maven/project Project.java
  Added:       maven-project/src/test/org/apache/maven/project
                        project.properties
  Log:
  o cleanup
  o add project.properties to get processed.
  
  Revision  Changes    Path
  1.9       +9 -174    maven-components/maven-project/src/java/org/apache/maven/project/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-project/src/java/org/apache/maven/project/Project.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Project.java	8 Dec 2003 04:52:10 -0000	1.8
  +++ Project.java	8 Dec 2003 18:13:24 -0000	1.9
  @@ -46,32 +46,17 @@
       /** The Maven model with interpolated values. */
       private Model interpolatedModel;
   
  -    /** Project properties. */
  -    private Map properties;
  -
       /** Parent project. */
       private Project parent;
   
       /** Source of the model. */
       private URL modelSource;
   
  -
  -    /**
  -     * @todo where does this belong?
  -     */
  -    private List repositories;
  -
  -    /**
  -     * @todo where does this belong?
  -     */
  +    /** Artifacts generated from dependencies. */
       private List artifacts;
   
  -    /**
  -     * @todo where does this belong?
  -     * Rather not here :)
  -     */
  -    private boolean online;
  -
  +    /** Properties */
  +    private Map properties;
   
       // ----------------------------------------------------------------------
       // Accessors
  @@ -111,24 +96,6 @@
        *
        * @return
        */
  -    public Map getProperties()
  -    {
  -        return properties;
  -    }
  -
  -    /**
  -     *
  -     * @param properties
  -     */
  -    public void setProperties( Map properties )
  -    {
  -        this.properties = properties;
  -    }
  -
  -    /**
  -     *
  -     * @return
  -     */
       public URL getModelSource()
       {
           return modelSource;
  @@ -155,25 +122,6 @@
       }
   
       // ----------------------------------------------------------------------
  -    // Convenience methods for accessing standard properties
  -    // ----------------------------------------------------------------------
  -
  -    public String getMavenRepoLocal()
  -    {
  -        return "";
  -    }
  -
  -    public boolean getMavenArtifactOverride()
  -    {
  -        return true;
  -    }
  -
  -    public String getMavenArtifactOverride( String artifactId )
  -    {
  -        return "";
  -    }
  -
  -    // ----------------------------------------------------------------------
       // Dependency Support
       // ----------------------------------------------------------------------
   
  @@ -193,6 +141,7 @@
           if ( getModel().getDependencies().contains( dependency ) )
           {
               getModel().addDependency( dependency );
  +
               dependencyMap.put( dependency.getId(), dependency );
           }
       }
  @@ -321,7 +270,6 @@
       // Delegate to the model
       // ----------------------------------------------------------------------
   
  -    // pomVersion
       public void setPomVersion( String pomVersion )
       {
           getModel().setModelVersion( pomVersion );
  @@ -332,13 +280,11 @@
           return getInterpolatedModel().getModelVersion();
       }
   
  -    // id
       public String getId()
       {
           return getInterpolatedModel().getId();
       }
   
  -    // groupId
       public void setGroupId( String groupId )
       {
           getModel().setGroupId( groupId );
  @@ -349,7 +295,6 @@
           return getInterpolatedModel().getGroupId();
       }
   
  -    // artifactId
       public void setArtifactId( String artifactId )
       {
           getModel().setArtifactId( artifactId );
  @@ -360,7 +305,6 @@
           return getInterpolatedModel().getArtifactId();
       }
   
  -    // name
       public void setName( String name )
       {
           getModel().setName( name );
  @@ -371,7 +315,6 @@
           return getInterpolatedModel().getName();
       }
   
  -    // currentVersion
       public void setCurrentVersion( String currentVersion )
       {
           getModel().setVersion( currentVersion );
  @@ -452,7 +395,6 @@
           return getInterpolatedModel().getVersion();
       }
   
  -    // shortDescription
       public void setShortDescription( String shortDescription )
       {
           getModel().setShortDescription( shortDescription );
  @@ -463,7 +405,6 @@
           return getInterpolatedModel().getShortDescription();
       }
   
  -    // description
       public void setDescription( String description )
       {
           getModel().setDescription( description );
  @@ -474,75 +415,41 @@
           return getInterpolatedModel().getDescription();
       }
   
  -    // organization
  -
  -    /**
  -     *
  -     * @param organization
  -     */
       public void setOrganization( Organization organization )
       {
           getModel().setOrganization( organization );
       }
   
  -    /**
  -     *
  -     */
       public Organization getOrganization()
       {
           return getInterpolatedModel().getOrganization();
       }
   
  -    // repository
  -
  -    /**
  -     *
  -     * @param repository
  -     */
       public void setRepository( Repository repository )
       {
           getModel().setRepository( repository );
       }
   
  -    /**
  -     *
  -     */
       public Repository getRepository()
       {
           return getInterpolatedModel().getRepository();
       }
   
  -
  -    // mailingLists
  -
  -    /**
  -     *
  -     * @param mailingLists
  -     */
       public void setMailingLists( List mailingLists )
       {
           getModel().setMailingLists( mailingLists );
       }
   
  -    /**
  -     *
  -     * @return
  -     */
       public List getMailingLists()
       {
           return getInterpolatedModel().getMailingLists();
       }
   
  -    /**
  -     *
  -     * @param mailingList
  -     */
       public void addMailingList( MailingList mailingList )
       {
           getModel().addMailingList( mailingList );
       }
   
  -    // versions
       public void setVersions( List versions )
       {
           getModel().setVersions( versions );
  @@ -558,108 +465,61 @@
           getModel().addVersion( version );
       }
   
  -    // branches
  -
       public void setBranches( List branches )
       {
           getModel().setBranches( branches );
       }
   
  -    /**
  -     *
  -     * @return
  -     */
       public List getBranches()
       {
           return getInterpolatedModel().getBranches();
       }
   
  -    /**
  -     *
  -     * @param branch
  -     */
       public void addBranches( Branch branch )
       {
           getModel().addBranch( branch );
       }
   
  -    // developers
  -
  -    /**
  -     *
  -     * @param developers
  -     */
       public void setDevelopers( List developers )
       {
           getModel().setDevelopers( developers );
       }
   
  -    /**
  -     *
  -     * @return
  -     */
       public List getDevelopers()
       {
           return getInterpolatedModel().getDevelopers();
       }
   
  -    /**
  -     *
  -     * @param developer
  -     */
       public void addDeveloper( Developer developer )
       {
           getModel().addDeveloper( developer );
       }
   
  -    /**
  -     *
  -     * @param contributors
  -     */
       public void setContributors( List contributors )
       {
           getModel().setContributors( contributors );
       }
   
  -    /**
  -     *
  -     * @return
  -     */
       public List getContributors()
       {
           return getInterpolatedModel().getContributors();
       }
   
  -    /**
  -     *
  -     * @param contributor
  -     */
       public void addContributor( Contributor contributor )
       {
           getModel().addContributor( contributor );
       }
   
  -    // build
  -
  -    /**
  -     *
  -     * @param build
  -     */
       public void setBuild( Build build )
       {
           getModel().setBuild( build );
       }
   
  -    /**
  -     *
  -     */
       public Build getBuild()
       {
           return getInterpolatedModel().getBuild();
       }
   
  -    // reports
  -
       public void setReports( List reports )
       {
           getModel().setReports( reports );
  @@ -675,46 +535,21 @@
           getModel().addReport( report );
       }
   
  -    // license
  -
  -    /**
  -     *
  -     * @param licenses
  -     */
       public void setLicenses( List licenses )
       {
           getModel().setLicenses( licenses );
       }
   
  -    /**
  -     *
  -     * @return
  -     */
       public List getLicenses()
       {
           return getInterpolatedModel().getLicenses();
       }
   
  -    /**
  -     *
  -     * @param license
  -     */
       public void addLicense( License license )
       {
           getModel().addLicense( license );
       }
   
  -    public void setRepositories( List repositories )
  -    {
  -        this.repositories = repositories;
  -    }
  -
  -    public List getRepositories()
  -    {
  -        return repositories;
  -    }
  -
  -
       public void setArtifacts( List artifacts )
       {
           this.artifacts = artifacts;
  @@ -725,14 +560,14 @@
           return artifacts;
       }
   
  -    public void setOnline( boolean online )
  +    public Map getProperties()
       {
  -        this.online = online;
  +        return properties;
       }
   
  -    public boolean isOnline()
  +    public void setProperties( Map properties )
       {
  -        return online;
  +        this.properties = properties;
       }
   }
   
  
  
  
  1.1                  maven-components/maven-project/src/test/org/apache/maven/project/project.properties
  
  Index: project.properties
  ===================================================================
  name = jason
  occupation = builder
  
  

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