All Projects → logiball → monorepo

logiball / monorepo

Licence: MIT license
Structure and workflows of our internal git-maven-monorepo

Programming Languages

shell
77523 projects
java
68154 projects - #9 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to monorepo

wcm-io-tooling
Tooling for Maven and IDEs.
Stars: ✭ 12 (-25%)
Mutual labels:  maven
identicon
Original Identicon java and canvas implementations
Stars: ✭ 64 (+300%)
Mutual labels:  maven
jcenter-config
Painlessly publish your library/project to jcenter() with these simple scripts.
Stars: ✭ 13 (-18.75%)
Mutual labels:  maven
maven-it-extension
Experimental JUnit Jupiter Extension for writing integration tests for Maven plugins/Maven extensions/Maven Core
Stars: ✭ 56 (+250%)
Mutual labels:  maven
gradle-git-versioning-plugin
This extension will set project version, based on current Git branch or tag.
Stars: ✭ 44 (+175%)
Mutual labels:  maven
nrwl-nx-action
A GitHub Action to wrap Nrwl Nx commands in your workflows.
Stars: ✭ 163 (+918.75%)
Mutual labels:  monorepo
mod-uk-design-system
Build web applications that meet the Defence Digital service standards
Stars: ✭ 78 (+387.5%)
Mutual labels:  monorepo
LocaleLib
Show translated names of items, entities & more in client's language
Stars: ✭ 34 (+112.5%)
Mutual labels:  maven
spring-cloud-stream-kafka-elasticsearch
The goal of this project is to implement a "News" processing pipeline composed of five Spring Boot applications: producer-api, categorizer-service, collector-service, publisher-api and news-client.
Stars: ✭ 44 (+175%)
Mutual labels:  maven
eksi
Eksi sözlük crawl,stat , api calismalari
Stars: ✭ 25 (+56.25%)
Mutual labels:  maven
neptune-web
Wise Web Design System
Stars: ✭ 55 (+243.75%)
Mutual labels:  monorepo
nexus-repository-import-scripts
A few scripts for importing artifacts into Nexus Repository
Stars: ✭ 142 (+787.5%)
Mutual labels:  maven
basepom
All the base POMs in the world.
Stars: ✭ 35 (+118.75%)
Mutual labels:  maven
maven-learning-notes
For more notes, see notes-and-code-about-learning
Stars: ✭ 58 (+262.5%)
Mutual labels:  maven
cas-management-overlay
WAR overlay for Apereo CAS Management web application
Stars: ✭ 120 (+650%)
Mutual labels:  maven
maven-buildtime-profiler
Maven Build Time Profiler
Stars: ✭ 41 (+156.25%)
Mutual labels:  maven
wagon-maven-plugin
www.mojohaus.org/wagon-maven-plugin/
Stars: ✭ 23 (+43.75%)
Mutual labels:  maven
slickgrid-universal
Slickgrid-Universal is a monorepo which includes all Editors, Filters, Extensions, Services and is Framework Agnostic to take full advantage of SlickGrid core lib.
Stars: ✭ 29 (+81.25%)
Mutual labels:  monorepo
maven-apache-parent
Apache Software Foundation Parent POM
Stars: ✭ 21 (+31.25%)
Mutual labels:  maven
SeleniumDemo
Selenium automation test framework
Stars: ✭ 84 (+425%)
Mutual labels:  maven

monorepo

Currently we are in migration to this layout and workflows.

This repository is an extract of our internal git-maven-monorepo. Maybe it helps to create your own. We will explain more details in the nearer future.

Use the Repository

Initial setup:

git clone [email protected]:logiball/monorepo.git
cd monorepo
mr/checkout.sh

To build all parts of the repository run:

mvn install

If only a specific project and it's dependencies should be build run:

mvn install -pl de.logiball.monorepo.service:service-one -am

For detailed description of the maven parameters above run mvn -help.

Partial checkout

To configure needed parts ('app-one' in this example):

git config core.sparsecheckout true
echo '/mr' > .git/info/sparse-checkout
echo '/README.md' >> .git/info/sparse-checkout
echo '/pom*' >> .git/info/sparse-checkout
echo '/component/lib/*' >> .git/info/sparse-checkout
echo '/component/service/service-one/' >> .git/info/sparse-checkout
mr/checkout.sh
mvn install

Directory Layout

monorepo/
├── bundle
├── ci
├── component
│   ├── app
│   ├── lib
│   │   ├── lib-one
│   │   ├── lib-two
│   │   └── lib-three
│   ├── service
│   │   ├── service-one
│   │   └── service-two
│   └── webapp
│       └── webapp-one
├── mr
└── README.md

To keep the repository organized readable pathes are essential, e.g. /component/service/service-one is a service and /component/lib/lib-two is a library. That's also one of the reasons why the singular was chosen for directory names.

Naming of directories:

  • bundle - In a bundle, the components required to create this bundle are described in the form of scripts and configuration files.
  • ci - Contains global configuration for the continuous integration (CI) daemon.
  • component - A component is a closed set of sources and resources that can be used by a bundle or an other component:
    • app - Contains iOS, Android or other apps.
    • lib - Contains libraries that can be used by other components.
    • service - Contains components that represent a service and provide an API.
    • webapp - All components that represent a webapp.
  • mr - Contains the tooling for the use of the mono repo.

Releasing a Component

To release a component like service-on we are using branches. The name of the branch starts with release/. So a full release branch name looks like release/service-one.

By default all components will not deployed. If a component should be deployed with it's own version, you must add the following plugin configuration to it's pom-template.xml:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-deploy-plugin</artifactId>
    <configuration>
        <skip>false</skip>
    </configuration>
</plugin>

To Make the Branch

This is a one time operation for every component. To create a new release branch execute the command mr/release branch like in the following example:

mr/release branch --name service-one  -- bundle/ component/service/service-two/ component/webapp/ \
        component/lib/lib-two/ component/lib/lib-three/

All pathes after -- of the monorep are not needed for releasing the current component and will be deleted. In this example it is the component service-one.

For more details about this command execute

mr/release branch --help

Release workflow

To make a new release of an created release branch use the command mr/release release. The following command must be executed on a release branch. So the name of the branch must be something like 'release/'

mr/release release --version 0.0.2 --dry-run false

For more details about this command execute

mr/release release --help

Credits

The scripts in the folder mr are an copy of Paul Hammants googles-monorepo-demo. Paul also helped to work out the release workflow.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].