Package org.apache.maven.model

Examples of org.apache.maven.model.Repository


      return false;
   }

   private void addPluginRepository(MetaModelProvider provider)
   {
      Repository repository = provider.getAptPluginRepository();
      if (repository != null)
      {
         MavenPluginFacet pluginFacet = project.getFacet(MavenPluginFacet.class);
         pluginFacet.addPluginRepository(repository.getName(), repository.getUrl());
      }
   }
View Full Code Here


   {
      if (!hasRepository(url))
      {
         MavenFacet maven = getOrigin().getFacet(MavenFacet.class);
         Model pom = maven.getPOM();
         Repository repo = new Repository();
         repo.setId(name);
         repo.setUrl(url);
         pom.getRepositories().add(repo);
         maven.setPOM(pom);
      }
   }
View Full Code Here

    {
        Model model = new Model();
        model.setVersion( "3.8.1" );
        model.setArtifactId( "foo" );

        Repository repository = new Repository();

        repository.setUrl( "file://localhost/${basedir}/temp-repo" );

        model.addRepository( repository );

        ModelInterpolator interpolator = createInterpolator();
       
View Full Code Here

    {
        Model model = new Model();
        model.setVersion( "3.8.1" );
        model.setArtifactId( "foo" );

        Repository repository = new Repository();

        repository.setUrl( "${project.baseUri}/temp-repo" );

        model.addRepository( repository );

        ModelInterpolator interpolator = createInterpolator();
View Full Code Here

    private void validateRepositories( ModelValidationResult result, List repositories, String prefix )
    {
        for ( Iterator it = repositories.iterator(); it.hasNext(); )
        {
            Repository repository = (Repository) it.next();

            validateStringNotEmpty( prefix + ".id", result, repository.getId() );

            validateStringNotEmpty( prefix + ".url", result, repository.getUrl() );
        }
    }
View Full Code Here

            {
                normalized.add( item );
            }
            else if ( item instanceof Repository )
            {
                Repository repo = (Repository) item;
                try
                {
                    item = ProjectUtils.buildArtifactRepository( repo, artifactRepositoryFactory, container );

                    normalized.add( item );
                    normalizationNeeded = true;
                }
                catch ( InvalidRepositoryException e )
                {
                    throw new ProjectBuildingException( projectId, "Error building artifact repository for id: " + repo.getId(), e );
                }
            }
            else
            {
                throw new ProjectBuildingException( projectId, "Error building artifact repository from non-repository information item: " + item );
View Full Code Here

        {
            Profile externalProfile = (Profile) i.next();

            for ( Iterator repoIterator = externalProfile.getRepositories().iterator(); repoIterator.hasNext(); )
            {
                Repository mavenRepo = (Repository) repoIterator.next();

                ArtifactRepository artifactRepo = null;
                try
                {
                    artifactRepo =
View Full Code Here

   {
      if (!hasRepository(url))
      {
         MavenFacet maven = getFaceted().getFacet(MavenFacet.class);
         Model pom = maven.getModel();
         Repository repo = new Repository();
         repo.setId(name);
         repo.setUrl(url);
         pom.getRepositories().add(repo);
         maven.setModel(pom);
      }
   }
View Full Code Here

   {
      if (!hasPluginRepository(url))
      {
         MavenFacet maven = getFaceted().getFacet(MavenFacet.class);
         Model pom = maven.getModel();
         Repository repo = new Repository();
         repo.setId(id);
         repo.setUrl(url);
         pom.getPluginRepositories().add(repo);
         maven.setModel(pom);
      }
   }
View Full Code Here

            if (profile == null)
            {
               profile = profileParam.getAsMavenProfile();
               pom.getProfiles().add(profile);
            }
            Repository repo = new Repository();
            repo.setId(id);
            repo.setUrl(url);
            profile.addPluginRepository(repo);
            maven.setModel(pom);
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.apache.maven.model.Repository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.