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)
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)
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)