Git Product home page Git Product logo

spring-data-build's Introduction

Spring Data Build Infrastructure icon?job=spring data build%2Fmain&subject=Build

This repository contains common infrastructure to be used by Spring Data modules that build with Maven. It consists of a resources project that bundles up resources that are needed during the build CSS for reference documentation generation and JavaDoc. The second project is parent that can be used as parent project to pre-configure core dependencies, properties, reference documentation generation and most important of all the appropriate distribution assembly.

The parent project can be eased for either a single-module Maven project or a multi-module one. Each of the setups requires a slightly different setup of the project.

Code of Conduct

This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to [email protected].

Project setup

General setup

The parent project configures the following aspects of the project build:

Shared resources are pulled in from the spring-data-build-resources dependency (images, CSS, JavaScript). Renders reference documentation from Asciidoc file named index.adoc within src/asciidoc. In the distribute profile, two assemblies are generated: A ZIP to be uploaded to docs.spring.io (incl. javadoc (browsable), reference docs as described before) with the following content:

- notice.txt
+ reference -> Asciidoc generated reference documentation
  + html
  + pdf
  + epub
+ api -> JavaDoc

A second ZIP is generated to be uploaded to docs.spring.io to contain all Spring namespace XSDs.

The following dependencies are pre-configured.

  • Logging dependencies: SLF4j + Commons Logging bridge and Logback as test dependency

  • Test dependencies: JUnit / AssertJ / Hamcrest / Mockito

  • Dependency versions for commonly used dependencies

Single project setup

If the client project is a project consisting of a single project only all that needs to be done is declaring the parent project:

<parent>
	<groupId>org.springframework.data.build</groupId>
	<artifactId>spring-data-parent</artifactId>
	<version>${most-recent-release-version}</version>
</parent>

Be sure to adapt the version number to the latest release version. The second and already last step of the setup is to activate the assembly and asciidoctor plugin in the build section:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
	<groupId>org.asciidoctor</groupId>
	<artifactId>asciidoctor-maven-plugin</artifactId>
</plugin>

As an example have a look at the build of Spring Data JPA.

Multi project setup

A multi module setup requires slightly more setup and some structure being set up.

  • The root pom.xml needs to configure the project.type property to multi.

  • Asciidoc documentation sources need to be in the root project.

  • The assembly needs to be build in a dedicated sub-module (e.g. distribution), declare the assembly plugin (see single project setup) in that submodule and reconfigure the project.root property in that module to ${basedir}/...

  • Configure ${dist.id} in the root project to the basic artifact id (e.g. spring-data-mongodb) as this will serve as file name for distribution artifacts, static resources etc. It will default to the artifact id and thus usually resolve to a …-parent if not configured properly.

As an example have a look at the build of Spring Data MongoDB.

Build configuration

  • Goals to execute clean (dependency:tree) install -Pci to run the build

  • Goals to execute clean deploy -Pci,artifactory to deploy artifacts to Artifactory

  • A nightly build can then use clean (dependency:tree) deploy -Pdistribute to publish reference documentation

Additional build profiles

  • ci - Packages the JavaDoc as JAR for distribution (needs to be active on the CI server to make sure we distribute JavaDoc as JAR).

  • distribute - Creates Asciidoc documentation.

  • distribute-schema - Creates schema file distribution.

  • spring…-next - Configures the Spring version to be used to be the next Spring Framework snapshot version.

License

Spring Data Build is Open Source software released under the Apache 2.0 license.

spring-data-build's People

Contributors

mp911de avatar odrotbohm avatar christophstrobl avatar gregturn avatar spring-builds avatar schauder avatar sdeleuze avatar Buzzardo avatar zhanhb avatar davidlj95 avatar hantsy avatar michael-simons avatar GreyTeardrop avatar sothawo avatar koraktor avatar spring-operator avatar dependabot[bot] avatar

Stargazers

Vihaan avatar Raj Wadhwa avatar Timot Tarjani avatar  avatar Mikhail Titov avatar  avatar  avatar JUST DOINS avatar Dani Setiawan avatar Mmontsheng Maoto avatar  avatar Aaron Gershman avatar sudotty avatar Moncef AOUDIA avatar  avatar Maiara Mendes avatar Nils Liebelt avatar  avatar Rostov avatar Pusendra Chaudhary avatar Taras Boychuk avatar Fearon avatar Zhao Xiaohong avatar chenzeshenga avatar MGL.XYZ avatar STYLIANOS IORDANIS avatar Giri Jeedigunta avatar 陈振远 avatar Daniel Kraus avatar カシオ 金城 大関 avatar Zakharov Roman avatar euler avatar Choubani Amir avatar  avatar Sasu Ölander avatar Jon Repp avatar  avatar Dario Seidl avatar 罗启意 avatar  avatar Pine Mizune avatar Jhonatan Martins avatar Eugene Maysyuk avatar  avatar A Xoai avatar Igor Rodrigues avatar Gus de Geus avatar 一个好人 avatar zp_love_xyh avatar Felipe Moysés avatar Tiarê Balbi avatar 望哥 avatar  avatar Carrie Guts Oh avatar Diego Alves avatar 不哭 avatar Oleh Dokuka avatar zeno avatar  avatar Nicolas Mervaillie avatar  avatar Jarvis Song avatar lebron avatar Allen Peng avatar Paul Verest avatar  avatar  avatar zhanhb avatar well avatar Thomas Darimont avatar 张伟 avatar  avatar  avatar Sivakumar avatar  avatar

Watchers

Ryan Morgan avatar Josh Long avatar Oliver Drotbohm avatar Ilayaperumal Gopinathan avatar  avatar Craig Walls avatar Oleg Zhurakousky avatar Steve Bohlen avatar Greg L. Turnquist avatar Thomas Darimont avatar Jeremy Grelle avatar Jeremy Kuhnash avatar  avatar James Cloos avatar David Turanski avatar  avatar Haytham Mohamed avatar Jarred Li avatar Ken Guzik avatar  avatar Nieraj Singh avatar Brian Dussault avatar Mingyuan Wu avatar  avatar  avatar 张伟 avatar Christoph Strobl avatar Will Schipp avatar Chirag Tailor avatar Gareth Clay avatar Olga Maciaszek-Sharma avatar  avatar Oleh Dokuka avatar  avatar  avatar Joe Grandja avatar lebron avatar Rostov avatar  avatar

spring-data-build's Issues

Upgrade to Querydsl 3.0.0

Querydsl 3.0.0 introduced some changes that break binary compatibility with 2.x. Thus we'll see runtime errors if users upgrade to the latest version of it. We can fix this by upgrading to the version as well.

.autoschemaln file missing

The uploaded schema files directory does not contain the .autoschemaln file to trigger automatic schema file aliasing.

Improve documentation generation

We should copy images from src/docbkx/ into the shared resources folder. Plus, we need to fix the broken images paths for the HTML documentation.

Improve Spring 4 build profiles

Improve the Spring 4 build profiles as follows:

  • spring4 should use the latest Spring 4 release version
  • spring4-next should use the next Spring 4 snapshot version

Related to #16.

Introduce groovy script to automatically create issue branches and update project versions.

We should use groovy for such sophisticated automation steps since it allows faster development and easier debugging than shell scripts.

Currently every branch push / commit ends up in the same BUILD-SNAPSHOT artifact. In order to avoid potential confusion we should change the pom versions to create issue specific snapshot-builds next to the build-snapshot that is created for the master branch by a script.

Requirements:

  • Executable via console
  • Debuggable via IDE
  • Works with maven AND gradle projects.

This deprecates the new-issue-branch.sh shell script introduced in #27

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.