Giter Site home page Giter Site logo

adambien / wad Goto Github PK

View Code? Open in Web Editor NEW
112.0 17.0 24.0 107 KB

Watch and Deploy - deploying ThinWARs without IDE plugins

Home Page: http://wad.sh

License: MIT License

Java 93.57% HTML 4.35% CSS 2.08%
java javaee deployment thinwars utility watch speed microprofile openliberty payara

wad's Introduction

watch and deploy (WAD)

WAD watches changes in src\main\java folder, builds the project using the pom.xml and deploys the ThinWAR into the configured folder.

installation

Download the executable and self-contained wad.jar

usage

Launch WAD from within your ThinWAR-project created with javaee8-essentials-archetype.

[THIN_WAR]/java -jar wad.jar [DEPLOYMENT_DIR ANOTHER_DIR]

e.g.

[THIN_WAR]/java -jar wad.jar /openliberty/wlp/usr/servers/defaultServer/dropins/ dist

wad can be also configured in ~/.wadrc. Each deployment folder in an new line:

/Users/duke/payara/glassfish/domains/domain1/autodeploy 
/Users/duke/openliberty/usr/servers/defaultServer/dropins
/Users/duke/tomee/webapps
/Users/duke/wildfly/standalone/deployments

On each source change WAD will:

  1. Use the current directory as the service name
  2. Build the project using the pom.xml found in the directory
  3. Copy the ./target/[name].war into the path used as parameter

You only have to write code and save it frequently like this:

 WAD

common deployment directories

WildFly wildfly-[VERSION].Final/standalone/deployments

OpenLiberty openliberty-[VERSION]/usr/servers/defaultServer/dropins

Payara payara/glassfish/domains/domain1/autodeploy

TomEE tomee-[version]/webapps

deploy'em all

WAD also supports simultaneous deployment to multiple servers

[THIN_WAR]/java -jar wad.jar /openliberty/wlp/usr/servers/defaultServer/dropins/ wildfly/standalone/deployments payara/glassfish/domains/domain1/autodeploy tomee/webapps

run from anywhere

A a shell script:

#!/bin/bash
BASEDIR=$(dirname $0)
java -jar ${BASEDIR}/wad.jar "$@"%

will install WAD "globally". Now you can launch WAD from any directory you like e.g.

wad.sh /openliberty/wlp/usr/servers/defaultServer/dropins/

articles

"Improved Java / Jakarta EE Productivity with wad.sh" by @rieckpil

Any questions left? See you at airhacks.tv.

wad's People

Contributors

adambien avatar franden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wad's Issues

Doesn't watch for src/main/resources or src/main/webapp

Hello Adam,

I am testing WAD and I realize that it only watches over the src/main/java folder and there are use cases where there are changes in the resoruces or webapp folders without changing the code files and WAD doesn't catch those changes. It would be a nice to have.

Thanks,

Cristhian.

Use `verify` instead of `clean install`

As Robert Scholte keeps repeating, using clean install is a bad habit from the past ;-)

clean is not required any more by almost all plugins, as they support incremental builds. You rob them from their chance to optimize by blindly forcing them to redo everything.

install is also not necessary if you only need a verified artifact in your target folder. Just use verify and skip the installation to your local .m2 repository.

This would be a minimal change, but the speed improvement can be small but noticeable when doing it several times a minute.

Add Support For Comment in .wadrc

wad should not consider line written as #${TOMEE_HOME}/webapps in .wadrc as deployment directory. All lines starting with # should be treated as comment to match bash omments.

Source change is not detected

I use WAD with NetBeans on Windows 10.
In about 10% cases WAD does not detect that source file has changed.
If I press Enter in the terminal, where WAD is running, It compiles code 2 times instead of 1.

Generate a new release

Hi Adam.

Can you generate a new release of wad?

One month ago I downloaded the latest release available, 0.1.1, and I could not use wad due the missing use case added in the last commit (PR #12).
Only the idea of add the same functionality today to use wad as a deploying tool gave me the chance to inspect the issues and pr's and found that the latest commit is what I need.

Regards, and thanks for your help!

error output on build failure

Currently the console only shows a thumb down icon if the build fails. It would be nice if we could see the error message if an error occured during mvn package so i dont have to run it manually. Great tool btw!

WAD on Windows Errors

Trying to use WAD on Windows and I keep getting

?[34m 'C:\Users\john\servers\payara5\glassfish\domains\domain1\autodeploy' ?[0m
WAD is watching .\src\main, deploying target\cdi-code.war to [C:\Users\john\servers\payara5\glassfish\domains\domain1\autodeploy\cd
i-code.war]
[?[1;90m09:48:37?[0m]Exception in thread "main" java.lang.IllegalStateException: Maven application directory was not specified, and $
{maven.home} is not provided in the system properties. Please specify at least on of these.
        at org.apache.maven.shared.invoker.MavenCommandLineBuilder.checkRequiredState(MavenCommandLineBuilder.java:126)
        at org.apache.maven.shared.invoker.MavenCommandLineBuilder.build(MavenCommandLineBuilder.java:61)
        at org.apache.maven.shared.invoker.DefaultInvoker.execute(DefaultInvoker.java:100)
        at com.airhacks.wad.watch.control.Builder.build(Builder.java:40)
        at com.airhacks.wad.watch.boundary.WADFlow.buildAndDeploy(WADFlow.java:65)
        at com.airhacks.wad.watch.boundary.WADFlow.lambda$new$0(WADFlow.java:41)
        at com.airhacks.wad.watch.boundary.WADFlow.<init>(WADFlow.java:42)
        at wad.App.main(App.java:75)

when I run the java -jar wad.jar [deployment-dir] command. I'm not sure what I need to do. mvn -v gives me

Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T19:49:05Z)
Maven home: C:\Users\john\mvn\apache-maven-3.5.3\bin\..
Java version: 1.8.0_162, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_162\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Parametrize war name

My project is located in directories like xFulanov1.56.3, but it always generates war files like target/fulano.war. WAD fails to find my war file, giving me a java.nio.file.NoSuchFileException: target\xFulanov1.56.3.war error message.
Is it possible to tell WAD that it should observe a different filename?

Due to business restrictions, it wouldn't be easy to rename my project directories.

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.