示例#1
0
文件: index.py 项目: adorsk/jip
 def keep_consistent(self):
     in_path_libs = os.listdir(get_lib_path())
     remembered_libs = list(self.installed)
     for artifact in remembered_libs:
         local_name = artifact.to_jip_name()
         if local_name not in in_path_libs:
             logger.warn(('[Warning] %s is not in your path which should be installed by previous actions. '
                 + 'If you still need it, please reinstall it by: jip install %s') % (local_name, str(artifact)))
             self.remove_artifact(artifact)
示例#2
0
 def keep_consistent(self):
     in_path_libs = os.listdir(get_lib_path())
     remembered_libs = list(self.installed)
     for artifact in remembered_libs:
         local_name = artifact.to_jip_name()
         if local_name not in in_path_libs:
             logger.warn((
                 '[Warning] %s is not in your path which should be installed by previous actions. '
                 +
                 'If you still need it, please reinstall it by: jip install %s'
             ) % (local_name, str(artifact)))
             self.remove_artifact(artifact)
示例#3
0
文件: repository.py 项目: adorsk/jip
    def add_repos(self, name, uri, repos_type, order=None):
        if repos_type == 'local':
            repo = MavenFileSystemRepos(name, uri)
        elif repos_type == 'remote':
            repo = MavenHttpRemoteRepos(name, uri)
        else:
            logger.warn('[Error] Unknown repository type.')
            sys.exit(1)

        if repo not in self.repos:
            if order is not None:
                self.repos.insert(order, repo)
            else:
                self.repos.append(repo)
            logger.debug('[Repository] Added: %s' % repo.name)
示例#4
0
    def add_repos(self, name, uri, repos_type, order=None):
        if repos_type == 'local':
            repo = MavenFileSystemRepos(name, uri)
        elif repos_type == 'remote':
            repo = MavenHttpRemoteRepos(name, uri)
        else:
            logger.warn('[Error] Unknown repository type.')
            sys.exit(1)

        if repo not in self.repos:
            if order is not None:
                self.repos.insert(order, repo)
            else:
                self.repos.append(repo)
            logger.debug('[Repository] Added: %s' % repo.name)