repository

How do I prevent Maven 2 from searching remote repositories for specific local depedencies?

女生的网名这么多〃 提交于 2019-12-29 07:30:53
问题 How do I prevent Maven 2 from searching remote repositories for specific dependencies that are in the local repository only? 回答1: How do I prevent Maven 2 from searching remote repositories for specific depedencies that are in the local repository only Well, actually, Maven won't unless: they are SNAPSHOT dependencies in which case this is the expected behavior. they are missing a .pom file in which case you can provide it or generate it (see questions below). Related questions How do I stop

How to clean old dependencies from maven repositories?

不问归期 提交于 2019-12-29 04:26:08
问题 I have too many files in .m2 folder where maven stores downloaded dependencies. Is there a way to clean all old dependencies? For example, if there is a dependency with 3 different versions: 1, 2 and 3, after cleaning there must be only 3rd. How I can do it for all dependencies in .m2 folder? 回答1: If you are on Unix, you could use the access time of the files in there. Just enable access time for your filesystem, then run a clean build of all your projects you would like to keep dependencies

Generic repository - IRepository<T> or IRepository

烂漫一生 提交于 2019-12-29 02:43:51
问题 I have seen two different approaches for creating generic repositories. What are differences between those two approaches (pros and cons) ? Please diregard difference in the methods because I am interested in difference between public interface IRepository<T> where T : class and public interface IRepository : IDisposable Is there any difference in functionality, flexibility, unit testing ... ? What will I get or lose ? Is there any difference how they are registered in Dependency Injection

C#/EF and the Repository Pattern: Where to put the ObjectContext in a solution with multiple repositories?

自作多情 提交于 2019-12-28 12:44:06
问题 I have multiple repositories in my application. Where should I put the ObjectContext? Right now, I have a reference like ObjectContext ctx; in every repository. What is the smartest and safest way to go about this? 回答1: A design with multiple ObjectContext instances is only acceptable if your Repository methods commit the transaction. Otherwise, it is possible that external calls to commit the transaction may not persist everything you intend, because you will hold references to different

How to manually deploy artifacts in Nexus Repository Manager OSS 3

被刻印的时光 ゝ 提交于 2019-12-28 04:51:05
问题 After installing Nexus Repository Manager OSS 3 I do not see option Artifact Upload to upload artifacts through web page. In Nexus Repository Manager OSS 2.13 there is option to do that operation. Anyone can show me the way how to upload artifacts to hosted repository in Nexus 3? EDIT : From 3.9.0 version, this functionality is implemented. 回答1: This is implemented in Nexus since Version 3.9.0. Login Select Upload Fill out form and upload Artifact 回答2: I'm using maven deploy file. mvn deploy

git push to remote repository “Could not read from remote repository”

会有一股神秘感。 提交于 2019-12-28 04:00:08
问题 I searched for a while but I can't find a solution to my Problem. I have a Server I can connect to via ssh with the username git and a local git repository. Now I want to push my local repository to a newly created one on the Server. Here is what I did: created a git repository in /home/git/test.git initialized the repository as bare added the remote repository on the local machine git remote add test ssh://git@serverIp:/home/git/test.git now I executed the push command: git push test master

Should I store all projects in one repository or multiple?

情到浓时终转凉″ 提交于 2019-12-28 03:24:07
问题 I am currently using TortoiseSVN to manage a couple of the projects that I have on the go at the moment. When I first moved everything into source control I wasn't really sure how everything should be laid out so I ended up putting each project into its own repository. I was wondering would it be a good idea for me just to move them all into one big repository and have them split into project folders? What does everyone else do? At the moment none of them share common code but they may in the

How do I rename a repository on GitHub?

梦想的初衷 提交于 2019-12-28 01:39:35
问题 I wanted to rename one of my repositories on GitHub, but I got scared when a big red warning said: We will not set up any redirects from the old location You will need to update your local repositories to point to the new location Renaming may take a few minutes to complete Does anyone have step-by-step instructions on how to accomplish #1 and #2 manually? Or what do I have to do locally? 回答1: If you are the only person working on the project, it's not a big problem, because you only have to

Application Services Composition

让人想犯罪 __ 提交于 2019-12-25 18:45:14
问题 I've a Customer entity that has an referente to City: public class Customer { public int CustomerId { get; set; } public int CityId { get; set;} } Then, the following application service: public class CustomerService { private readonly ICustomerRepository customerRepository; public CustomerService(ICustomerRepository customerRepository) { this.customerRepository = customerRepository; } public void RegisterCustomer(Customer customer) { //Do another things... customerRepository.Save(customer);

Repository pattern for database that allows CRUD operations through Interops

旧巷老猫 提交于 2019-12-25 09:48:59
问题 The situation we are facing currently is Model Entities and database logic are tightly interweaved together which is making unit tests impossible. So, I decided to go with designing a Repository pattern. The basic structure of storage model what we see through Com interactions Root-Children[each child is another Root]. It's a tree structure. Understanding this, the Repository we designed is RootRepository for CRUD operations on root and ChildRepository internal to RootRepository for CRUD