コード例 #1
0
        private void ResyncArtifactsImpl(
            ArtifactResyncSource artifactResyncSource)
        {
            EnsureInitialized();

            GetReferencesFromPom(artifactResyncSource);
        }
コード例 #2
0
        private void ResyncArtifactsImpl(
            NPanday.Logging.Logger logger,
            ArtifactResyncSource artifactResyncSource)
        {
            EnsureInitialized();

            GetReferencesFromPom(logger, artifactResyncSource);
        }
コード例 #3
0
        void GetReferencesFromPom(NPanday.Logging.Logger logger, ArtifactResyncSource artifactResyncSource)
        {
            Artifact.ArtifactRepository repository = new NPanday.Artifact.ArtifactContext().GetArtifactRepository();
            NPanday.Model.Pom.Model     m          = NPanday.Utils.PomHelperUtility.ReadPomAsModel(new FileInfo(pomFile));

            if (m.dependencies != null)
            {
                foreach (Dependency d in m.dependencies)
                {
                    // check if intra-project reference and copy artifacts
                    if (!IsIntraProject(m, d) && d.classifier == null)
                    {
                        Artifact.Artifact artifact = repository.GetArtifact(d);
                        CopyArtifactImpl(artifact, logger, artifactResyncSource);
                    }
                }
            }
        }
コード例 #4
0
        private void CopyArtifactImpl(
            Artifact.Artifact artifact,
            ArtifactResyncSource artifactResyncSource)
        {
            EnsureInitialized();

            bool isSnapshot           = ArtifactUtils.IsSnapshot(artifact);
            bool resyncFromRemoteRepo = artifactResyncSource == ArtifactResyncSource.RemoteRepository;

            if (!ArtifactUtils.Exists(artifact) || (isSnapshot && resyncFromRemoteRepo))
            {
                if (!ArtifactUtils.DownloadFromRemoteRepository(artifact))
                {
                    RaiseError("Unable to get the artifact {0} from any of your repositories.", artifact.ArtifactId);
                    return;
                }
            }

            CopyToReferenceFolder(artifact, referenceFolder);
        }
コード例 #5
0
ファイル: ReferenceManager.cs プロジェクト: tocsleung/npanday
        private void ResyncArtifactsImpl(
            ArtifactResyncSource artifactResyncSource)
        {
            EnsureInitialized();

            GetReferencesFromPom(artifactResyncSource);
        }
コード例 #6
0
ファイル: ReferenceManager.cs プロジェクト: tocsleung/npanday
        void GetReferencesFromPom(ArtifactResyncSource artifactResyncSource)
        {
            Artifact.ArtifactRepository repository = new NPanday.Artifact.ArtifactContext().GetArtifactRepository();
            NPanday.Model.Pom.Model m = NPanday.Utils.PomHelperUtility.ReadPomAsModel(new FileInfo(pomFile));

            if (m.dependencies != null)
            {
                foreach (Dependency d in m.dependencies)
                {
                    // check if intra-project reference and copy artifacts
                    if (!IsIntraProject(m, d) && d.classifier == null)
                    {
                        Artifact.Artifact artifact = repository.GetArtifact(d);
                        CopyArtifactImpl(artifact, artifactResyncSource);
                    }
                }
            }
        }
コード例 #7
0
ファイル: ReferenceManager.cs プロジェクト: tocsleung/npanday
        private void CopyArtifactImpl(
            Artifact.Artifact artifact, 
            ArtifactResyncSource artifactResyncSource)
        {
            EnsureInitialized();

            bool isSnapshot = ArtifactUtils.IsSnapshot(artifact);
            bool resyncFromRemoteRepo = artifactResyncSource == ArtifactResyncSource.RemoteRepository;

            if (!ArtifactUtils.Exists(artifact) || (isSnapshot && resyncFromRemoteRepo))
            {
                if (!ArtifactUtils.DownloadFromRemoteRepository(artifact))
                {
                    RaiseError("Unable to get the artifact {0} from any of your repositories.", artifact.ArtifactId);
                    return;
                }
            }

            CopyToReferenceFolder(artifact, referenceFolder);
        }