malabar

A Maven-enabled Java mode for Emacs

License

License

Categories

Categories

Ninja User Interface Web Frameworks
GroupId

GroupId

com.software-ninja
ArtifactId

ArtifactId

malabar
Last Version

Last Version

2.3.1
Release Date

Release Date

Type

Type

jar
Description

Description

malabar
A Maven-enabled Java mode for Emacs
Project URL

Project URL

https://github.com/m0smith/malabar-mode-jar
Source Code Management

Source Code Management

https://github.com/m0smith/malabar-mode-jar.git

Download malabar

How to add to project

<!-- https://jarcasting.com/artifacts/com.software-ninja/malabar/ -->
<dependency>
    <groupId>com.software-ninja</groupId>
    <artifactId>malabar</artifactId>
    <version>2.3.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.software-ninja/malabar/
implementation 'com.software-ninja:malabar:2.3.1'
// https://jarcasting.com/artifacts/com.software-ninja/malabar/
implementation ("com.software-ninja:malabar:2.3.1")
'com.software-ninja:malabar:jar:2.3.1'
<dependency org="com.software-ninja" name="malabar" rev="2.3.1">
  <artifact name="malabar" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.software-ninja', module='malabar', version='2.3.1')
)
libraryDependencies += "com.software-ninja" % "malabar" % "2.3.1"
[com.software-ninja/malabar "2.3.1"]

Dependencies

compile (12)

Group / Artifact Type Version
org.apache.maven : maven-compat jar 3.0.5
jline : jline jar 2.11
com.jcabi : jcabi-aether jar 0.10.1
org.codehaus.groovy : groovy-all jar 2.3.7
org.apache.maven : maven-aether-provider jar 3.0.5
org.apache.maven : maven-core jar 3.0.5
org.sonatype.aether : aether-connector-wagon jar 1.13.1
junit : junit jar 4.11
org.slf4j : slf4j-jdk14 jar 1.7.5
org.apache.maven : maven-embedder jar 3.0.5
org.fusesource.jansi : jansi jar 1.11
org.apache.ivy : ivy jar 2.3.0

test (1)

Group / Artifact Type Version
net.java.quickcheck : quickcheck jar 0.6

Project Modules

There are no modules declared in this project.

malabar-mode-jar

A support JAR for malabar-mode: JVM Integration minor mode for EMACS

See malabar-mode: https://github.com/m0smith/malabar-mode

Configuration

It may be necessary to configure grape ~/.groovy/grapeConfig.xml see gh-30:


<ivysettings>
    <settings defaultResolver="downloadGrapes"/>
    <resolvers>
        <chain name="downloadGrapes">
            <!-- todo add 'endorsed groovy extensions' resolver here -->
            <ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
            <filesystem name="cachedGrapes">
                <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
                <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
            </filesystem>
            <ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>
            <ibiblio name="ibiblio" m2compatible="true"/>
            <ibiblio name="java.net2" root="http://download.java.net/maven/2/" m2compatible="true"/>
        </chain>
    </resolvers>
</ivysettings>

Running

Standalone

gradle run

or to set the port

gradle -Dexec.args="-p 4429" run

groovysh

def malabar = { classLoader = new groovy.lang.GroovyClassLoader();
    Map[] grapez = [[group: 'com.software-ninja' , module:'malabar', version:'2.0.4']]
    groovy.grape.Grape.grab(classLoader: classLoader, grapez)
    classLoader.loadClass('com.software_ninja.malabar.Malabar').newInstance().startCL(classLoader); }; 
malabar();

Be sure the version in the second line is set to the lastest in central: http://search.maven.org/#search|gav|1|g%3A%22com.software-ninja%22%20AND%20a%3A%22malabar%22

Ports

These are the ports used by default for each mode of running:

  • unit test: 4426
  • groovysh: 4428
  • standalone: 4429

Services

malabar-mode-jar provides REST-ish services for interacting with the JVM and package management software (like maven)

add

The add services adds additional classpath entries to the project's classloader

Parameters

name default desc
repo none The location of the maven repo (something like /home/username/.m2/repository)
pm none The location of the pm to parse
relative none classpath entries relative to the project root dir, as a JSON list of strings
absolute none absolute path classpath entries as a JSON list of strings

pi

The pi services returns information from the maven pom.

Parameters

name default desc
repo none The location of the maven repo (something like /home/username/.m2/repository)
pm none The location of the pm to parse

parse

The parse services parses a source file or block of source code and returns a list of errors

Parameters

name default desc
repo ~/.m2/repository The location of the maven repo (something like /home/username/.m2/repository)
pm none The location of the pm to parse
script none The path on disk to the script to parse
scriptBody none The actual script to parse
strict none If true, force the parse to strict/static compilation

resource

The resource services provides access to classes and other resources on the project classpath

Parameters

name default desc
repo ~/.m2/repository The location of the maven repo (something like /home/username/.m2/repository)
pm none The location of the pm to parse
pattern none The pattern to search for
max none The maximum number of results to return
isClass true If true, only search for classes, If false, also return files.
useRegex true If true, treat pattern as a regex. Otherwise, just treat it as a substring

stop

The tags service shutsdown the http server and the JVM using System.exit.

Parameters

name default desc

tags

The tags service returns the semantic tags for a class

Parameters

name default desc
repo ~/.m2/repository The location of the maven repo (something like /home/username/.m2/repository)
pm none The location of the pm to parse
class none The binary or fully-qualified class name to reflect

test

The test service runs a unit test on either a whole class or just a single method

Parameters

name default desc
repo ~/.m2/repository The location of the maven repo (something like /home/username/.m2/repository)
pm none The location of the pm to parse
script none The path on disk to the script to parse
method none If not null, the name of the method to run. If null, null all tests in the class

Hacking

All development is done on the 'master' branch in as part of a SNAPSHOT. When a release needs to happen, the maven release plugin is used to tag the build and push it to maven central.

Boring legal stuff

malabar-mode-jar is copyright (c) 2009-2010 Espen Wiborg [email protected]

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

For the full text of the GPL, see http://www.gnu.org/licenses/gpl2.txt.

Versions

Version
2.3.1
2.1.0
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
1.5.10
1.5.9
1.5.8
1.5.7
1.5.6
1.5.4
1.5.1