Code Monkey home page Code Monkey logo

export-maven-plugin's Introduction

Export Maven Plugin

Actions Status: build Maven Central

The Export Maven Plugin is an Apache Maven plugin designed for exporting an entire Maven project into a .zip file. It respects the .gitignore settings and, regardless of .gitignore, always omits the build directory (target).

Why is it needed?

Typically, archiving a project involves the following command:

git archive -o export.zip HEAD

However, in teaching environments, particularly when instructing large groups in Java, it's not always feasible to assume that Git is installed on all systems. In scenarios where Git is not part of the course curriculum, and lab/homework submissions are required in .zip format, it's important to ensure that students' submissions do not include unwanted files, such as those in the build folder or IDE-specific directories.

Since students are expected to use Maven and create their projects via homework-quickstart archetype, this simple plugin enables students to automatically export their projects in the required format without including unwanted files.

How to use

To use the plugin, insert the following configuration into the plugins section of your pom.xml:

    <plugin>
        <groupId>org.atp-fivt</groupId>
        <artifactId>export-maven-plugin</artifactId>
        <version>1.0</version>
        <configuration>
            <zipFileName>Name_Surname.zip</zipFileName>
        </configuration>
    </plugin>

The zipFileName parameter allows you to specify the desired name for the zip file. By default, the file name is set to export.zip.

To run the plugin, execute:

mvn export:export

The resulting .zip file will be located in the target directory.

How does it work

This plugin leverages the jGit library to compile a list of all files in the project, adhering to the rules specified in .gitignore files. Importantly, the functionality of this plugin does not require Git to be installed on the target machine. This is particularly beneficial in educational settings or environments where Git installation cannot be assumed. By using jGit, the plugin operates independently of the local Git installation.

export-maven-plugin's People

Contributors

inponomarev avatar

Watchers

 avatar

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.