You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.moxie 7.2KB

10 years ago
10 years ago
Ticket tracker with patchset contributions A basic issue tracker styled as a hybrid of GitHub and BitBucket issues. You may attach commits to an existing ticket or you can push a single commit to create a *proposal* ticket. Tickets keep track of patchsets (one or more commits) and allow patchset rewriting (rebase, amend, squash) by detecing the non-fast-forward update and assigning a new patchset number to the new commits. Ticket tracker -------------- The ticket tracker stores tickets as an append-only journal of changes. The journals are deserialized and a ticket is built by applying the journal entries. Tickets are indexed using Apache Lucene and all queries and searches are executed against this Lucene index. There is one trade-off to this persistence design: user attributions are non-relational. What does that mean? Each journal entry stores the username of the author. If the username changes in the user service, the journal entry will not reflect that change because the values are hard-coded. Here are a few reasons/justifications for this design choice: 1. commit identifications (author, committer, tagger) are non-relational 2. maintains the KISS principle 3. your favorite text editor can still be your administration tool Persistence Choices ------------------- **FileTicketService**: stores journals on the filesystem **BranchTicketService**: stores journals on an orphan branch **RedisTicketService**: stores journals in a Redis key-value datastore It should be relatively straight-forward to develop other backends (MongoDB, etc) as long as the journal design is preserved. Pushing Commits --------------- Each push to a ticket is identified as a patchset revision. A patchset revision may add commits to the patchset (fast-forward) OR a patchset revision may rewrite history (rebase, squash, rebase+squash, or amend). Patchset authors should not be afraid to polish, revise, and rewrite their code before merging into the proposed branch. Gitblit will create one ref for each patchset. These refs are updated for fast-forward pushes or created for rewrites. They are formatted as `refs/tickets/{shard}/{id}/{patchset}`. The *shard* is the last two digits of the id. If the id < 10, prefix a 0. The *shard* is always two digits long. The shard's purpose is to ensure Gitblit doesn't exceed any filesystem directory limits for file creation. **Creating a Proposal Ticket** You may create a new change proposal ticket just by pushing a **single commit** to `refs/for/{branch}` where branch is the proposed integration branch OR `refs/for/new` or `refs/for/default` which both will use the default repository branch. git push origin HEAD:refs/for/new **Updating a Patchset** The safe way to update an existing patchset is to push to the patchset ref. git push origin HEAD:refs/heads/ticket/{id} This ensures you do not accidentally create a new patchset in the event that the patchset was updated after you last pulled. The not-so-safe way to update an existing patchset is to push using the magic ref. git push origin HEAD:refs/for/{id} This push ref will update an exisitng patchset OR create a new patchset if the update is non-fast-forward. **Rebasing, Squashing, Amending** Gitblit makes rebasing, squashing, and amending patchsets easy. Normally, pushing a non-fast-forward update would require rewind (RW+) repository permissions. Gitblit provides a magic ref which will allow ticket participants to rewrite a ticket patchset as long as the ticket is open. git push origin HEAD:refs/for/{id} Pushing changes to this ref allows the patchset authors to rebase, squash, or amend the patchset commits without requiring client-side use of the *--force* flag on push AND without requiring RW+ permission to the repository. Since each patchset is tracked with a ref it is easy to recover from accidental non-fast-forward updates. Features -------- - Ticket tracker with status changes and responsible assignments - Patchset revision scoring mechanism - Update/Rewrite patchset handling - Close-on-push detection - Server-side Merge button for simple merges - Comments with Markdown syntax support - Rich mail notifications - Voting - Mentions - Watch lists - Querying - Searches - Partial miletones support - Multiple backend options
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. #
  2. # Gitblit project descriptor
  3. #
  4. # Specify minimum Moxie version required to build
  5. requires: 0.9.3
  6. # Project Metadata
  7. name: Gitblit
  8. description: pure Java Git solution
  9. groupId: com.gitblit
  10. artifactId: gitblit
  11. version: 1.7.0-SNAPSHOT
  12. inceptionYear: 2011
  13. # Current stable release
  14. releaseVersion: 1.6.0
  15. releaseDate: 2014-06-16
  16. # Project urls
  17. url: 'http://gitblit.com'
  18. issuesUrl: 'http://code.google.com/p/gitblit/issues/list'
  19. socialNetworkUrl: 'https://plus.google.com/114464678392593421684'
  20. forumUrl: 'http://groups.google.com/group/gitblit'
  21. mavenUrl: 'http://gitblit.github.io/gitblit-maven'
  22. # Licenses section included for POM generation
  23. licenses:
  24. - {
  25. name: Apache ASL v2.0
  26. url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
  27. }
  28. # Developers section included for POM generation
  29. developers:
  30. - {
  31. id: james
  32. name: James Moger
  33. url: 'https://plus.google.com/u/0/116428776452027956920'
  34. organization: VAS
  35. organizationUrl: 'http://www.vas.com'
  36. roles: developer
  37. }
  38. # SCM section included for POM generation
  39. scm: {
  40. connection: 'scm:git:git://github.com/gitblit/gitblit.git'
  41. developerConnection: 'scm:git:https://github.com/gitblit/gitblit.git'
  42. url: 'https://github.com/gitblit/gitblit'
  43. tag: HEAD
  44. }
  45. # Mainclass is used for setting jar manifests and using the mx:run target
  46. mainclass: com.gitblit.GitBlitServer
  47. # Moxie supports multiple source directories and allows you to assign
  48. # a scope to each directory.
  49. sourceDirectories:
  50. - compile 'src/main/java'
  51. - compile 'src/main/bugtraq'
  52. - compile 'src/main/gen' apt
  53. - test 'src/test/java'
  54. - test 'src/test/bugtraq'
  55. # Moxie supports one site-scoped directory for mx:doc
  56. - site 'src/site'
  57. resourceDirectories:
  58. - compile 'src/main/resources'
  59. - site 'src/site/resources'
  60. # compile for Java 7 class format
  61. tasks: {
  62. 'mx:javac' : {
  63. source: 1.7
  64. target: 1.7
  65. compiler: javac1.7
  66. encoding: UTF-8
  67. # stop complaints about bootstrap classpath when compiling with Java 7
  68. compilerArgs: '-Xlint:-options'
  69. }
  70. }
  71. # Generate Eclipse project files.
  72. # Generate IntelliJ IDEA module files.
  73. # Generate a distribution Maven POM (not suitable for building with Maven).
  74. apply: eclipse, intellij, pom
  75. # Copy all retrieved dependencies to the "ext" directory.
  76. # Generated IDE settings (.classpath, etc) will use the artifacts
  77. # from this project-relative directory. This allows the IDE settings
  78. # to be version-controlled and shared.
  79. dependencyDirectory: ext
  80. # Register the Eclipse JGit Maven repositories
  81. registeredRepositories:
  82. - { id: eclipse, url: 'http://repo.eclipse.org/content/groups/releases' }
  83. - { id: eclipse-snapshots, url: 'http://repo.eclipse.org/content/groups/snapshots' }
  84. - { id: atlassian-contrib, url: 'https://maven.atlassian.com/content/repositories/atlassian-3rdparty' }
  85. - { id: gitblit, url: 'http://gitblit.github.io/gitblit-maven' }
  86. # Source all dependencies from the following repositories in the specified order
  87. repositories: central, eclipse-snapshots, eclipse, atlassian-contrib, gitblit
  88. # Convenience properties for dependencies
  89. properties: {
  90. jetty.version : 9.2.1.v20140609
  91. wicket.version : 1.4.21
  92. lucene.version : 4.8.1
  93. jgit.version : 3.4.1.201406201815-r
  94. groovy.version : 2.3.3
  95. bouncycastle.version : 1.49
  96. selenium.version : 2.28.0
  97. wikitext.version : 1.4
  98. sshd.version: 0.11.1-atlassian-1
  99. mina.version: 2.0.7
  100. guice.version : 4.0-beta4
  101. # Gitblit maintains a fork of guice-servlet
  102. guice-servlet.version : 4.0-gb1
  103. }
  104. # Dependencies
  105. #
  106. # May be tagged with ":label" notation to group dependencies.
  107. #
  108. # "@extension" fetches the artifact with the specified extension
  109. # and ignores all transitive dependencies.
  110. #
  111. # "!groupId" or "!groupId:artifactId" excludes all matching transitive
  112. # dependencies in that dependency's dependency graph.
  113. #
  114. dependencies:
  115. - compile 'com.google.inject:guice:${guice.version}' :war :fedclient
  116. - compile 'com.google.inject.extensions:guice-servlet:${guice-servlet.version}' :war
  117. - compile 'com.google.guava:guava:16.0.1' :war :fedclient
  118. - compile 'com.intellij:annotations:12.0' :war
  119. - compile 'log4j:log4j:1.2.17' :war :fedclient
  120. - compile 'org.slf4j:slf4j-api:1.7.7' :war :fedclient
  121. - compile 'org.slf4j:slf4j-log4j12:1.7.7' :war :fedclient
  122. - compile 'com.sun.mail:javax.mail:1.5.1' :war
  123. - compile 'javax.servlet:javax.servlet-api:3.1.0' :fedclient
  124. - compile 'org.eclipse.jetty.aggregate:jetty-all:${jetty.version}' @jar
  125. - compile 'org.apache.wicket:wicket:${wicket.version}' :war !org.mockito
  126. - compile 'org.apache.wicket:wicket-auth-roles:${wicket.version}' :war !org.mockito
  127. - compile 'org.apache.wicket:wicket-extensions:${wicket.version}' :war !org.mockito
  128. - compile 'org.apache.lucene:lucene-core:${lucene.version}' :war :fedclient
  129. - compile 'org.apache.lucene:lucene-analyzers-common:${lucene.version}' :war :fedclient
  130. - compile 'org.apache.lucene:lucene-highlighter:${lucene.version}' :war :fedclient
  131. - compile 'org.apache.lucene:lucene-memory:${lucene.version}' :war :fedclient
  132. - compile 'org.apache.lucene:lucene-queryparser:${lucene.version}' :war :fedclient
  133. - compile 'org.pegdown:pegdown:1.4.2' :war
  134. - compile 'org.fusesource.wikitext:wikitext-core:${wikitext.version}' :war
  135. - compile 'org.fusesource.wikitext:twiki-core:${wikitext.version}' :war
  136. - compile 'org.fusesource.wikitext:textile-core:${wikitext.version}' :war
  137. - compile 'org.fusesource.wikitext:tracwiki-core:${wikitext.version}' :war
  138. - compile 'org.fusesource.wikitext:mediawiki-core:${wikitext.version}' :war
  139. - compile 'org.fusesource.wikitext:confluence-core:${wikitext.version}' :war
  140. - compile 'org.eclipse.jgit:org.eclipse.jgit:${jgit.version}' :war :fedclient :manager !junit
  141. - compile 'org.eclipse.jgit:org.eclipse.jgit.http.server:${jgit.version}' :war :manager !junit
  142. - compile 'org.bouncycastle:bcprov-jdk15on:${bouncycastle.version}' :war
  143. - compile 'org.bouncycastle:bcmail-jdk15on:${bouncycastle.version}' :war
  144. - compile 'org.bouncycastle:bcpkix-jdk15on:${bouncycastle.version}' :war
  145. - compile 'org.apache.sshd:sshd-core:${sshd.version}' :war !org.easymock
  146. - compile 'org.apache.mina:mina-core:${mina.version}' :war !org.easymock
  147. - compile 'rome:rome:0.9' :war :manager :api
  148. - compile 'com.google.code.gson:gson:2.2.2' :war :fedclient :manager :api
  149. - compile 'org.codehaus.groovy:groovy-all:${groovy.version}' :war
  150. - compile 'com.unboundid:unboundid-ldapsdk:2.3.0' :war
  151. - compile 'org.apache.ivy:ivy:2.2.0' :war
  152. - compile 'com.toedter:jcalendar:1.3.2' :authority
  153. - compile 'org.apache.commons:commons-compress:1.4.1' :war
  154. - compile 'commons-io:commons-io:2.2' :war
  155. - compile 'com.force.api:force-partner-api:24.0.0' :war
  156. - compile 'org.freemarker:freemarker:2.3.20' :war
  157. - compile 'com.github.dblock.waffle:waffle-jna:1.5' :war
  158. - compile 'org.kohsuke:libpam4j:1.7' :war
  159. - compile 'args4j:args4j:2.0.26' :war :fedclient
  160. - compile 'commons-codec:commons-codec:1.7' :war
  161. - compile 'redis.clients:jedis:2.3.1' :war
  162. - compile 'ro.fortsoft.pf4j:pf4j:0.8.0' :war
  163. - compile 'org.apache.tika:tika-core:1.5' :war
  164. - test 'junit'
  165. # Dependencies for Selenium web page testing
  166. - test 'org.seleniumhq.selenium:selenium-java:${selenium.version}' @jar
  167. - test 'org.seleniumhq.selenium:selenium-support:${selenium.version}' @jar
  168. - test 'org.seleniumhq.selenium:selenium-firefox-driver:${selenium.version}'
  169. # Dependencies with the "build" scope are retrieved
  170. # and injected into the Ant runtime classpath
  171. - build 'jacoco'