diff --git a/docs/index.html b/docs/index.html index a38e9d1..c33794b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Meyvn @@ -209,26 +209,26 @@

Meyvn

Table of Contents

-
-

Intro

-
+
+

Intro

+

You Know Nothing, Jon Snow. — Ygritte @@ -258,9 +258,9 @@

Intro

-
-

Goals

-
+
+

Goals

+
  • Use deps.edn as single source of truth.
  • @@ -282,16 +282,16 @@

    Goals

-
-

Installation

-
+
+

Installation

+

Meyvn requires Maven. Interestingly, Meyvn does not require Clojure. Neither a Clojure installation nor the official CLI tools. This is because Meyvn relies on Maven for pulling core dependencies (it's turtles all the way down). If you do have Clojure installed, you can install Meyvn with our easy installer. Otherwise, please follow the manual installation instructions.

-
-

Easy installation

-
+
+

Easy installation

+

Copy and paste the following command in your terminal:

@@ -302,9 +302,9 @@

Easy installation

-
-

Manual installation

-
+
+

Manual installation

+
  • Download Meyvn to your local repository
@@ -330,64 +330,23 @@

Manual installation

$ cat /usr/local/bin/myvn
 #!/bin/sh
-M2_HOME=/path/to/maven/root java -jar ~/.m2/repository/org/meyvn/meyvn/1.7.6/meyvn-1.7.6.jar "$@"
+java -Dmaven.home=/usr/share/maven -jar ~/.m2/repository/org/meyvn/meyvn/1.7.6/meyvn-1.7.6.jar "$@"
 

-M2_HOME points to the root of your Maven installation directory, replace the content with the prefix appropriate for your system. +maven.home is a Java property that points to the root of your Maven installation directory. Find out Maven's home by typing mvn --version in the terminal.

Note: Maven can run without this environment variable on the command line, but the Maven Invoker APIs require it to be set explicitly.

- -
    -
  • To find the prefix for the Maven installation on your system.
  • -
- -
-
$ readlink -f `which mvn` | awk '{gsub("bin/mvn", ""); print}'
-
-
- -

-Note: On Mac OS X, brew install coreutils and replace readlink with greadlink. -

- -
    -
  • Set the executable bit.
  • -
- -

-Note: $@ references the arguments passed to the script. -

-
-
$ chmod +x /usr/local/bin/myvn
-
-
- -

-Note: Some features require access credentials -

- -

-Add your Meyvn credentials to your settings.xml file in /.m2 repository. -

-
-
  <server>
-  <id>meyvn</id>
-  <username>yourname</username>
-  <password>yourpassword</password>
-</server>
-
-
-
-

Usage

-
+
+

Usage

+

The standard Maven lifecycle phases and goals are passed as arguments. There’s documentation, too.

@@ -429,9 +388,9 @@

Usage

-
-

Debugging the build

-
+
+

Debugging the build

+

If you see errors with the build, run myvn -x pom. This will persist Meyvn’s pom file. You can now run mvn on it and debug as you normally would in Maven. You will need to specify the path to the pom file.

@@ -442,9 +401,9 @@

Debugging the build

-
-

Configuration

-
+
+

Configuration

+

Configuration is stored in meyvn.edn, which will be created in the root of your project on first run.

@@ -488,9 +447,9 @@

Configuration

-
-

How does it work?

-
+
+

How does it work?

+

tools.deps has the ability to translate a deps.edn file into a pom file (clj -Spom). Meyvn starts off from that pom file and augments it with features that make sense for Clojure workflows. Meyvn’s pom file is transient and does not interfere with POM files that may already be present in your project.

@@ -668,9 +627,9 @@

How does it work?

Clojurescript sources are compiled and included in the final artifact. Clojurescript compilation is done in its own process with the official compiler.

-
-

Uberjars

-
+
+

Uberjars

+

Consider the following deps.edn file:

@@ -729,9 +688,9 @@

Uberjars

-
-

Regular jars

-
+
+

Regular jars

+

Libraries uploaded to Clojars are typically non-aot, source-only jars. Uploading to Clojars follows standard procedure. Private repositories are supported as well. For example, to upload an artifact to deps.co, adjust the remote repository setting in the jar section of meyvn.edn. @@ -748,9 +707,9 @@

Regular jars

-
-

Pom files

-
+
+

Pom files

+

Meyvn works with its own set of pom files. It isn’t bothered with existing pom files in your project directory. This is by design. The single source of truth is deps.edn. Together with the configuration (in meyvn.edn), it knows all that it needs to know.

@@ -760,9 +719,9 @@

Pom files

-
-

Dependency mechanism

-
+
+

Dependency mechanism

+

The transitive dependency mechanism used by Maven is guided by the nearest wins conflict resolution strategy. This allows for resolution of individual conflicts: for any particular conflicting dependency, you can specify its version within your own POM, and that version becomes the nearest. @@ -779,9 +738,9 @@

Dependency mechanism

-
-

Testing

-
+
+

Testing

+

Consider the following deps.edn file.

@@ -822,9 +781,9 @@

Testing

-
-

Interactive coding

-
+
+

Interactive coding

+
$ myvn -a nrepl
 
@@ -835,9 +794,9 @@

Interactive coding

-
-

Profiles

-
+
+

Profiles

+

In Maven, profiles are used to parameterize builds, not the runtime environment of the executable. There are good reasons for this, but this means that after your build is done, you can't just run the executable (if it needs environment variables to be set). First you need to make sure the environment is set up properly.

@@ -895,9 +854,9 @@

Profiles

-
-

Auxiliary commands

-
+
+

Auxiliary commands

+

Meyvn runs with the same interface as Maven. Goals and lifecycle phases are being passed to it as you would with standard Maven. The -x flag changes the mode of operation and allows you to run specialized tasks. @@ -909,9 +868,9 @@

Auxiliary commands

-
-

Will it work?

-
+
+

Will it work?

+

It should work for the typical Clojure workflows. Please feel free to contact me in private if you want help solving your company’s build workflow.

@@ -925,9 +884,9 @@

Will it work?

-
-

Roadmap

-
+
+

Roadmap

+

The takeaway for Meyvn is that building on top of the Maven ecosystem is rewarding. It is a huge ecosystem, well documented and extremely mature. A lot of functionality just sits there, waiting to be tapped by our tooling (in areas such as continuous integration, generated documentation, testing, reporting, etc.)

@@ -937,17 +896,17 @@

Roadmap

-
-

What about Boot and Leiningen?

-
+
+

What about Boot and Leiningen?

+

Boot and Leiningen can also produce artifacts, and they also provide development-time workflows and extension mechanisms. They are fine, too. In other words, there is no competition, only complementary options.

-
-

Sustainable open source

-
+
+

Sustainable open source

+

We as a community know how to write open source software, but we are less knowledgeable in how to make that activity sustainable. With Meyvn, I’m attempting to lead a sustainable Open Source project. That means that Meyvn is dual licensed, with a commercial license available for sale.

@@ -961,9 +920,9 @@

Sustainable open source

-
-

License

-
+
+

License

+

Meyvn is released under a dual licensing scheme.

@@ -985,17 +944,17 @@

License

-
-

Patron

-
+
+

Patron

+

Writing and maintaining Open Source Software takes time and effort. Be a mensch. Be a maven. Patronize Meyvn.

-
-

Literature

-
+
+

Literature

+

Author: Daniel Szmulewicz

-

Created: 2024-06-07 Fri 08:34

+

Created: 2024-06-07 Fri 17:55

Validate

diff --git a/docs/index.org b/docs/index.org index 2c3aded..d7a70a7 100644 --- a/docs/index.org +++ b/docs/index.org @@ -73,39 +73,13 @@ $ touch /usr/local/bin/myvn #+BEGIN_SRC sh $ cat /usr/local/bin/myvn #!/bin/sh -M2_HOME=/path/to/maven/root java -jar ~/.m2/repository/org/meyvn/meyvn/1.7.6/meyvn-1.7.6.jar "$@" +java -Dmaven.home=/usr/share/maven -jar ~/.m2/repository/org/meyvn/meyvn/1.7.6/meyvn-1.7.6.jar "$@" #+END_SRC -~M2_HOME~ points to the root of your Maven installation directory, replace the content with the prefix appropriate for your system. +~maven.home~ is a Java property that points to Maven's home, ie. the root of your Maven installation. Find out Maven's home by typing ~mvn --version~ in the terminal. /Note:/ Maven can run without this environment variable on the command line, but the Maven Invoker APIs require it to be set explicitly. -- To find the prefix for the Maven installation on your system. - -#+BEGIN_SRC sh -$ readlink -f `which mvn` | awk '{gsub("bin/mvn", ""); print}' -#+END_SRC - -/Note:/ On Mac OS X, ~brew install coreutils~ and replace ~readlink~ with ~greadlink~. - -- Set the executable bit. - -/Note:/ ~$@~ references the arguments passed to the script. -#+BEGIN_SRC -$ chmod +x /usr/local/bin/myvn -#+END_SRC - -/Note:/ Some features require access credentials - -Add your Meyvn credentials to your ~settings.xml~ file in ~/.m2~ repository. -#+begin_src sh - - meyvn - yourname - yourpassword - -#+end_src - * Usage The standard Maven lifecycle phases and goals are passed as arguments. There’s [[https://maven.apache.org/guides/][documentation]], too.