repository

How does Maven2 know where to find plugins?

廉价感情. 提交于 2019-12-06 05:37:04
问题 I'm using Maven2 and I can't seem to find any plugins in my repository. I'm getting errors like repository metadata for: 'org.apache.maven.plugins' could not be found on repository: myrepo where myrepo is the name of my repository. My question is how does Maven know where to find plugins? There's a reference in my error to metadata, what metadata is expected where and what format must it take? I've not had much luck so far looking for documentation... (I'm not interested in the easy answer to

Extract authorship information from git repository

旧街凉风 提交于 2019-12-06 05:16:48
I am trying to extract (source code line, author label) pair from git repositories. The easiest way to do that is using git blame. The problem is that git blame takes the last committer as the author no matter whether the committer just indents the code or really changes the code. Do you know any method to it better? Or maybe before trying to solve the problem, I should first check how many source lines are associated with multiple authors. If the percentage is small, there is no need to worry about it. But I find even counting the number is difficult. For a commit with a single parent, how

Unit Testing Entity Framework

℡╲_俬逩灬. 提交于 2019-12-06 04:51:46
问题 I have just started using Entity Framework(v4) and Linq. I have a Entity data model, which has been generated from a database. I have then implemented repository classes in order to implement the business logic for my entities and they contain my LINQ queries for interacting with the entities/database. What is the easiest and simplest way to unit test the methods/functions in my repository classes without hitting the database? 回答1: You can run your tests against an inmemory database. Check

REGEX for svndumptool

拟墨画扇 提交于 2019-12-06 04:17:36
问题 I have a large (30+GB) legacy SVN repo with a lot of externals defined that needs to be cloned to a new server. As the repo was originally created in the pre SVN v1.5 days it has a lot of externals defined with absolute paths that refer back to the old server name. I want to remove all the absolute paths and make them relative so that the migration will work. I found svndumptool via this question, it works great on some of the externals but I haven't been able to figure out a REGEX that will

What does a repository look like when using many 1:Many or Many:Many tables?

假装没事ソ 提交于 2019-12-06 02:59:33
I have a MVC application that uses that entity framework model object directly in the view. I'm not sure how bad of a design pattern this is, but based on this sample I need to use a repository to implement caching. namespace MVCAzureStore.Services.Caching { public class CachedProductsRepository : CachedDataSource, IProductRepository { private readonly IProductRepository repository; public CachedProductsRepository(IProductRepository repository, ObjectCache cacheProvider) : base(cacheProvider, "Products") { this.repository = repository; } public List<string> GetProducts() { return

Repositories and Units of Work - which is responsible for what?

孤者浪人 提交于 2019-12-06 02:55:08
问题 Over the past week or so I have been reading a lot of articles and tutorials regarding the repository pattern. A lot of the articles closely tie the repository pattern to the unit of work pattern. In these articles, I usually find code similar to this: interface IUnitOfWork<TEntity> { void RegisterNew(TEntity entity); void RegisterDirty(TEntity entity); void RegisterDeleted(TEntity entity); void Commit(); void Rollback(); } interface IRepository<TKey, TEntity> { TEntity FindById(TKey id);

svn commit to multiple repositories

大憨熊 提交于 2019-12-06 02:49:34
问题 I have have a main project I am working on, which has several modules/directories. The main project is bound to local svn repository. however, whenever I do commit, I would like to push some modules/directories to Google code repository as well. However I only want to update from local repository. Is there a way to do it automatically? my IDE is emacs 23. Thanks 回答1: This is how the SVN book recommends you do it. It seems pretty painful and basically revolves around having a working copy for

Gradle could not resolve otto library

会有一股神秘感。 提交于 2019-12-06 02:12:39
I try to embed Otto library, which exists at the Maven Central . buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.6.3' } } apply plugin: 'android' dependencies { compile 'com.google.android.gms:play-services:4.0.30' compile 'com.android.support:support-v13:19.0.0' compile 'com.squareup:otto:1.3.4' } But I get the exception: A problem occurred configuring root project 'sample-project'. > Failed to notify project evaluation listener. > Could not resolve all dependencies for configuration ':_DebugCompile'. > Could not find com.squareup:otto

Need presentation materials for convincing a customer to use Maven

余生颓废 提交于 2019-12-06 01:31:04
问题 My customer needs a more organized inventory of all 3rd-party libraries (such as JAR files) that are used in production for their projects. I am involved with a number of their Java-based projects. Their inventory has not been consistently maintained in the past and the time has come to account for all the libraries that are currently being used (there are quite a few!) and to enforce a structured process for introducing new libraries into the build environment. I have tried pitching the idea

Checking out Android source from github

空扰寡人 提交于 2019-12-06 00:12:26
问题 After going through all of these steps to check out the Android source code (Gingerbread branch), only to come to a compile error, I have decided to try to get the source code from a different source. Here are the steps that I have taken to checkout the source code from the GitHub.com repository. I checked out the repo tool from the GitHub.com repository git clone git://github.com/android/tools_repo.git Inside the repo script file that was downloaded, I changed the location of the repo tool