mac woe maven plugin

[INFO] Finished at: 2014-12-19T15:09:43-07:00

[INFO] Final Memory: 17M/41M

[INFO] ————————————————————————

[ERROR] Failed to execute goal de.smartics.maven.plugin:maven-buildmetadata-plugin:1.1.0:provide-buildmetadata (default) on project dps: Cannot determine host information. BadHostName: BadHostName: nodename nor servname provided, or not known -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

acarlson-mbp:dps-pipe-github packrd$ scutil –set HostName “BadHostName”

acarlson-mbp:dps-pipe-github packrd$ ping “rdp-mbp”

ping: cannot resolve rdp-mbp: Unknown host

acarlson-mbp:dps-pipe-github packrd$ ping “rdp-mbp.local”

PING rdp-mbp.local (10.88.44.209): 56 data bytes

64 bytes from 10.88.44.209: icmp_seq=0 ttl=64 time=0.045 ms

64 bytes from 10.88.44.209: icmp_seq=1 ttl=64 time=0.132 ms

^C

— rdp-mbp.local ping statistics —

2 packets transmitted, 2 packets received, 0.0% packet loss

round-trip min/avg/max/stddev = 0.045/0.088/0.132/0.044 ms

fix:

acarlson-mbp:dps-pipe-github packrd$ scutil –set HostName “rdp-mbp.local” # the .local part was missing—this is the same value that it shows in

see my comment http://apple.stackexchange.com/a/30561/25085

dshow woe

all meant “mingw doesn’t have all dshow headers, but mingw-w64 does…”

 

fatal error: dsound.h: No such file or directory

 

c:\mingw\include\strmif.h:1152:13: error: expected expression before ‘HRESULT’
STDMETHOD_(HRESULT,SessionSequenceStart)(THIS_ const AMCOPPSignature*) PURE;
^
c:\mingw\include\strmif.h:1152:49: error: expected ‘)’ before ‘const’
STDMETHOD_(HRESULT,SessionSequenceStart)(THIS_ const AMCOPPSignature*) PURE;
^
c:\mingw\include\strmif.h:1152:73: error: expected ‘;’ before ‘PURE’
STDMETHOD_(HRESULT,SessionSequenceStart)(THIS_ const AMCOPPSignature*) PURE;
^
In file included from c:\mingw\include\dshow.h:8:0,
from libavdevice/dshow_capture.h:33,
from libavdevice/dshow.c:22:
c:\mingw\include\amaudio.h: At top level:
c:\mingw\include\amaudio.h:7:20: fatal error: dsound.h: No such file or directory
#include <dsound.h>
^
compilation terminated.
make: *** [libavdevice/dshow.o] Error 1
bash-3.1$ make libavdevice/dshow.o

java convert codepoint to string

either of these two would do it, probably prefer the former, ref

  private static String codePointToString(int codePoint) {
    return new String(Character.toChars(codePoint));
  }
private static String codePointToString(int codePoint) {
  StringBuilder stringOut = new StringBuilder();
  stringOut.appendCodePoint(codePoint);
  return stringOut.toString();
}

eternal input stream

here’s a faux one that “reads forever”

 

eternalInputStream = new InputStream() {
  boolean closed = false; // simulate what a file read does...kind of.

  @Override
  public void close() throws IOException {
    closed = true;
  }

  @Override
  public int read() throws IOException {
    throw new UnsupportedOperationException("shouldnt need this for unit test but the class signature requires its definition");
  }

  @Override
  public int read(byte b[], int off, int len) throws IOException {
    if (closed) {
      throw new IOException("stream already closed");
    }
    return 1; // who cares what the bytes actually even are LOL
  }
};

jruby ArgumentError: Constructor invocation failed: null

this meant (for me) “you have default-jre-headless installed and are subclassing a JFrame” which doesn’t work right…

so for me it was

sudo apt-get install openjdk-default

to get the non headless one

you can see the real error exception message by not subclassing one but just creating it:

jruby-1.7.16 :001 > require ‘java’
=> false
jruby-1.7.16 :002 > javax.swing.JFrame.new

this should always work…if not then install the non headless package of your jdk.

 

https://github.com/jruby/jruby/issues/2243