Coverage Report - org.apache.maven.model.ModelBase
 
Classes in this File Line Coverage Branch Coverage Complexity
ModelBase
1 %
1/72
0 %
0/26
0
 
 1  
 /*
 2  
  =================== DO NOT EDIT THIS FILE ====================
 3  
  Generated by Modello 1.0.1 on 2009-09-09 03:04:48,
 4  
  any modifications will be overwritten.
 5  
  ==============================================================
 6  
  */
 7  
 
 8  
 package org.apache.maven.model;
 9  
 
 10  
 /**
 11  
  * 
 12  
  *         
 13  
  *         Base class for the <code>Model</code> and the
 14  
  * <code>Profile</code> objects.
 15  
  *         
 16  
  *       
 17  
  * 
 18  
  * @version $Revision$ $Date$
 19  
  */
 20  12
 public class ModelBase
 21  
     implements java.io.Serializable
 22  
 {
 23  
 
 24  
       //--------------------------/
 25  
      //- Class/Member Variables -/
 26  
     //--------------------------/
 27  
 
 28  
     /**
 29  
      * Distribution information for a project that enables
 30  
      * deployment of the site
 31  
      *             and artifacts to remote web servers and
 32  
      * repositories respectively.
 33  
      */
 34  
     private DistributionManagement distributionManagement;
 35  
 
 36  
     /**
 37  
      * Field modules.
 38  
      */
 39  
     private java.util.List<String> modules;
 40  
 
 41  
     /**
 42  
      * Field repositories.
 43  
      */
 44  
     private java.util.List<Repository> repositories;
 45  
 
 46  
     /**
 47  
      * Field pluginRepositories.
 48  
      */
 49  
     private java.util.List<Repository> pluginRepositories;
 50  
 
 51  
     /**
 52  
      * Field dependencies.
 53  
      */
 54  
     private java.util.List<Dependency> dependencies;
 55  
 
 56  
     /**
 57  
      * 
 58  
      *             
 59  
      *             <b>Deprecated</b>. Now ignored by Maven.
 60  
      *             
 61  
      *           
 62  
      */
 63  
     private Object reports;
 64  
 
 65  
     /**
 66  
      * 
 67  
      *             
 68  
      *             This element includes the specification of
 69  
      * report plugins to use
 70  
      *             to generate the reports on the Maven-generated
 71  
      * site.
 72  
      *             These reports will be run when a user executes
 73  
      * <code>mvn site</code>.
 74  
      *             All of the reports will be included in the
 75  
      * navigation bar for browsing.
 76  
      *             
 77  
      *           
 78  
      */
 79  
     private Reporting reporting;
 80  
 
 81  
     /**
 82  
      * Default dependency information for projects that inherit
 83  
      * from this one. The
 84  
      *             dependencies in this section are not immediately
 85  
      * resolved. Instead, when a POM derived
 86  
      *             from this one declares a dependency described by
 87  
      * a matching groupId and artifactId, the
 88  
      *             version and other values from this section are
 89  
      * used for that dependency if they were not
 90  
      *             already specified.
 91  
      */
 92  
     private DependencyManagement dependencyManagement;
 93  
 
 94  
     /**
 95  
      * Field properties.
 96  
      */
 97  
     private java.util.Properties properties;
 98  
 
 99  
 
 100  
       //-----------/
 101  
      //- Methods -/
 102  
     //-----------/
 103  
 
 104  
     /**
 105  
      * Method addDependency.
 106  
      * 
 107  
      * @param dependency
 108  
      */
 109  
     public void addDependency( Dependency dependency )
 110  
     {
 111  0
         if ( !(dependency instanceof Dependency) )
 112  
         {
 113  0
             throw new ClassCastException( "ModelBase.addDependencies(dependency) parameter must be instanceof " + Dependency.class.getName() );
 114  
         }
 115  0
         getDependencies().add( dependency );
 116  0
     } //-- void addDependency( Dependency )
 117  
 
 118  
     /**
 119  
      * Method addModule.
 120  
      * 
 121  
      * @param string
 122  
      */
 123  
     public void addModule( String string )
 124  
     {
 125  0
         if ( !(string instanceof String) )
 126  
         {
 127  0
             throw new ClassCastException( "ModelBase.addModules(string) parameter must be instanceof " + String.class.getName() );
 128  
         }
 129  0
         getModules().add( string );
 130  0
     } //-- void addModule( String )
 131  
 
 132  
     /**
 133  
      * Method addPluginRepository.
 134  
      * 
 135  
      * @param repository
 136  
      */
 137  
     public void addPluginRepository( Repository repository )
 138  
     {
 139  0
         if ( !(repository instanceof Repository) )
 140  
         {
 141  0
             throw new ClassCastException( "ModelBase.addPluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
 142  
         }
 143  0
         getPluginRepositories().add( repository );
 144  0
     } //-- void addPluginRepository( Repository )
 145  
 
 146  
     /**
 147  
      * Method addProperty.
 148  
      * 
 149  
      * @param key
 150  
      * @param value
 151  
      */
 152  
     public void addProperty( String key, String value )
 153  
     {
 154  0
         getProperties().put( key, value );
 155  0
     } //-- void addProperty( String, String )
 156  
 
 157  
     /**
 158  
      * Method addRepository.
 159  
      * 
 160  
      * @param repository
 161  
      */
 162  
     public void addRepository( Repository repository )
 163  
     {
 164  0
         if ( !(repository instanceof Repository) )
 165  
         {
 166  0
             throw new ClassCastException( "ModelBase.addRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
 167  
         }
 168  0
         getRepositories().add( repository );
 169  0
     } //-- void addRepository( Repository )
 170  
 
 171  
     /**
 172  
      * Method getDependencies.
 173  
      * 
 174  
      * @return List
 175  
      */
 176  
     public java.util.List<Dependency> getDependencies()
 177  
     {
 178  0
         if ( this.dependencies == null )
 179  
         {
 180  0
             this.dependencies = new java.util.ArrayList<Dependency>();
 181  
         }
 182  
 
 183  0
         return this.dependencies;
 184  
     } //-- java.util.List<Dependency> getDependencies()
 185  
 
 186  
     /**
 187  
      * Get default dependency information for projects that inherit
 188  
      * from this one. The
 189  
      *             dependencies in this section are not immediately
 190  
      * resolved. Instead, when a POM derived
 191  
      *             from this one declares a dependency described by
 192  
      * a matching groupId and artifactId, the
 193  
      *             version and other values from this section are
 194  
      * used for that dependency if they were not
 195  
      *             already specified.
 196  
      * 
 197  
      * @return DependencyManagement
 198  
      */
 199  
     public DependencyManagement getDependencyManagement()
 200  
     {
 201  0
         return this.dependencyManagement;
 202  
     } //-- DependencyManagement getDependencyManagement()
 203  
 
 204  
     /**
 205  
      * Get distribution information for a project that enables
 206  
      * deployment of the site
 207  
      *             and artifacts to remote web servers and
 208  
      * repositories respectively.
 209  
      * 
 210  
      * @return DistributionManagement
 211  
      */
 212  
     public DistributionManagement getDistributionManagement()
 213  
     {
 214  0
         return this.distributionManagement;
 215  
     } //-- DistributionManagement getDistributionManagement()
 216  
 
 217  
     /**
 218  
      * Method getModules.
 219  
      * 
 220  
      * @return List
 221  
      */
 222  
     public java.util.List<String> getModules()
 223  
     {
 224  0
         if ( this.modules == null )
 225  
         {
 226  0
             this.modules = new java.util.ArrayList<String>();
 227  
         }
 228  
 
 229  0
         return this.modules;
 230  
     } //-- java.util.List<String> getModules()
 231  
 
 232  
     /**
 233  
      * Method getPluginRepositories.
 234  
      * 
 235  
      * @return List
 236  
      */
 237  
     public java.util.List<Repository> getPluginRepositories()
 238  
     {
 239  0
         if ( this.pluginRepositories == null )
 240  
         {
 241  0
             this.pluginRepositories = new java.util.ArrayList<Repository>();
 242  
         }
 243  
 
 244  0
         return this.pluginRepositories;
 245  
     } //-- java.util.List<Repository> getPluginRepositories()
 246  
 
 247  
     /**
 248  
      * Method getProperties.
 249  
      * 
 250  
      * @return Properties
 251  
      */
 252  
     public java.util.Properties getProperties()
 253  
     {
 254  0
         if ( this.properties == null )
 255  
         {
 256  0
             this.properties = new java.util.Properties();
 257  
         }
 258  
 
 259  0
         return this.properties;
 260  
     } //-- java.util.Properties getProperties()
 261  
 
 262  
     /**
 263  
      * Get this element includes the specification of report
 264  
      * plugins to use
 265  
      *             to generate the reports on the Maven-generated
 266  
      * site.
 267  
      *             These reports will be run when a user executes
 268  
      * <code>mvn site</code>.
 269  
      *             All of the reports will be included in the
 270  
      * navigation bar for browsing.
 271  
      * 
 272  
      * @return Reporting
 273  
      */
 274  
     public Reporting getReporting()
 275  
     {
 276  0
         return this.reporting;
 277  
     } //-- Reporting getReporting()
 278  
 
 279  
     /**
 280  
      * Get <b>Deprecated</b>. Now ignored by Maven.
 281  
      * 
 282  
      * @return Object
 283  
      */
 284  
     public Object getReports()
 285  
     {
 286  0
         return this.reports;
 287  
     } //-- Object getReports()
 288  
 
 289  
     /**
 290  
      * Method getRepositories.
 291  
      * 
 292  
      * @return List
 293  
      */
 294  
     public java.util.List<Repository> getRepositories()
 295  
     {
 296  0
         if ( this.repositories == null )
 297  
         {
 298  0
             this.repositories = new java.util.ArrayList<Repository>();
 299  
         }
 300  
 
 301  0
         return this.repositories;
 302  
     } //-- java.util.List<Repository> getRepositories()
 303  
 
 304  
     /**
 305  
      * Method removeDependency.
 306  
      * 
 307  
      * @param dependency
 308  
      */
 309  
     public void removeDependency( Dependency dependency )
 310  
     {
 311  0
         if ( !(dependency instanceof Dependency) )
 312  
         {
 313  0
             throw new ClassCastException( "ModelBase.removeDependencies(dependency) parameter must be instanceof " + Dependency.class.getName() );
 314  
         }
 315  0
         getDependencies().remove( dependency );
 316  0
     } //-- void removeDependency( Dependency )
 317  
 
 318  
     /**
 319  
      * Method removeModule.
 320  
      * 
 321  
      * @param string
 322  
      */
 323  
     public void removeModule( String string )
 324  
     {
 325  0
         if ( !(string instanceof String) )
 326  
         {
 327  0
             throw new ClassCastException( "ModelBase.removeModules(string) parameter must be instanceof " + String.class.getName() );
 328  
         }
 329  0
         getModules().remove( string );
 330  0
     } //-- void removeModule( String )
 331  
 
 332  
     /**
 333  
      * Method removePluginRepository.
 334  
      * 
 335  
      * @param repository
 336  
      */
 337  
     public void removePluginRepository( Repository repository )
 338  
     {
 339  0
         if ( !(repository instanceof Repository) )
 340  
         {
 341  0
             throw new ClassCastException( "ModelBase.removePluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
 342  
         }
 343  0
         getPluginRepositories().remove( repository );
 344  0
     } //-- void removePluginRepository( Repository )
 345  
 
 346  
     /**
 347  
      * Method removeRepository.
 348  
      * 
 349  
      * @param repository
 350  
      */
 351  
     public void removeRepository( Repository repository )
 352  
     {
 353  0
         if ( !(repository instanceof Repository) )
 354  
         {
 355  0
             throw new ClassCastException( "ModelBase.removeRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
 356  
         }
 357  0
         getRepositories().remove( repository );
 358  0
     } //-- void removeRepository( Repository )
 359  
 
 360  
     /**
 361  
      * Set this element describes all of the dependencies
 362  
      * associated with a
 363  
      *             project.
 364  
      *             These dependencies are used to construct a
 365  
      * classpath for your
 366  
      *             project during the build process. They are
 367  
      * automatically downloaded from the
 368  
      *             repositories defined in this project.
 369  
      *             See <a
 370  
      * href="http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html">the
 371  
      *             dependency mechanism</a> for more information.
 372  
      * 
 373  
      * @param dependencies
 374  
      */
 375  
     public void setDependencies( java.util.List<Dependency> dependencies )
 376  
     {
 377  0
         this.dependencies = dependencies;
 378  0
     } //-- void setDependencies( java.util.List )
 379  
 
 380  
     /**
 381  
      * Set default dependency information for projects that inherit
 382  
      * from this one. The
 383  
      *             dependencies in this section are not immediately
 384  
      * resolved. Instead, when a POM derived
 385  
      *             from this one declares a dependency described by
 386  
      * a matching groupId and artifactId, the
 387  
      *             version and other values from this section are
 388  
      * used for that dependency if they were not
 389  
      *             already specified.
 390  
      * 
 391  
      * @param dependencyManagement
 392  
      */
 393  
     public void setDependencyManagement( DependencyManagement dependencyManagement )
 394  
     {
 395  0
         this.dependencyManagement = dependencyManagement;
 396  0
     } //-- void setDependencyManagement( DependencyManagement )
 397  
 
 398  
     /**
 399  
      * Set distribution information for a project that enables
 400  
      * deployment of the site
 401  
      *             and artifacts to remote web servers and
 402  
      * repositories respectively.
 403  
      * 
 404  
      * @param distributionManagement
 405  
      */
 406  
     public void setDistributionManagement( DistributionManagement distributionManagement )
 407  
     {
 408  0
         this.distributionManagement = distributionManagement;
 409  0
     } //-- void setDistributionManagement( DistributionManagement )
 410  
 
 411  
     /**
 412  
      * Set the modules (sometimes called subprojects) to build as a
 413  
      * part of this
 414  
      *             project. Each module listed is a relative path
 415  
      * to the directory containing the module.
 416  
      * 
 417  
      * @param modules
 418  
      */
 419  
     public void setModules( java.util.List<String> modules )
 420  
     {
 421  0
         this.modules = modules;
 422  0
     } //-- void setModules( java.util.List )
 423  
 
 424  
     /**
 425  
      * Set the lists of the remote repositories for discovering
 426  
      * plugins for builds and
 427  
      *             reports.
 428  
      * 
 429  
      * @param pluginRepositories
 430  
      */
 431  
     public void setPluginRepositories( java.util.List<Repository> pluginRepositories )
 432  
     {
 433  0
         this.pluginRepositories = pluginRepositories;
 434  0
     } //-- void setPluginRepositories( java.util.List )
 435  
 
 436  
     /**
 437  
      * Set properties that can be used throughout the POM as a
 438  
      * substitution, and
 439  
      *             are used as filters in resources if enabled.
 440  
      *             The format is
 441  
      * <code>&lt;name&gt;value&lt;/name&gt;</code>.
 442  
      * 
 443  
      * @param properties
 444  
      */
 445  
     public void setProperties( java.util.Properties properties )
 446  
     {
 447  0
         this.properties = properties;
 448  0
     } //-- void setProperties( java.util.Properties )
 449  
 
 450  
     /**
 451  
      * Set this element includes the specification of report
 452  
      * plugins to use
 453  
      *             to generate the reports on the Maven-generated
 454  
      * site.
 455  
      *             These reports will be run when a user executes
 456  
      * <code>mvn site</code>.
 457  
      *             All of the reports will be included in the
 458  
      * navigation bar for browsing.
 459  
      * 
 460  
      * @param reporting
 461  
      */
 462  
     public void setReporting( Reporting reporting )
 463  
     {
 464  0
         this.reporting = reporting;
 465  0
     } //-- void setReporting( Reporting )
 466  
 
 467  
     /**
 468  
      * Set <b>Deprecated</b>. Now ignored by Maven.
 469  
      * 
 470  
      * @param reports
 471  
      */
 472  
     public void setReports( Object reports )
 473  
     {
 474  0
         this.reports = reports;
 475  0
     } //-- void setReports( Object )
 476  
 
 477  
     /**
 478  
      * Set the lists of the remote repositories for discovering
 479  
      * dependencies and
 480  
      *             extensions.
 481  
      * 
 482  
      * @param repositories
 483  
      */
 484  
     public void setRepositories( java.util.List<Repository> repositories )
 485  
     {
 486  0
         this.repositories = repositories;
 487  0
     } //-- void setRepositories( java.util.List )
 488  
 
 489  
 
 490  
 }