Tuesday, October 16, 2012

sbt: pushing and pulling from a local Nexus installation

Here's a simple build.sbt for pushing and pulling from a local Nexus repository.  The Nexus repository has almost no configuration changes; I've added a password for the deployment user (here given as "deploy"), but other than that it's running with the settings that came out of the box.  Note that the hostname in my case is "git", and Nexus uses the default port of 8081.


name := "fnord"

organization := "com.restphone"

version := "0.1-SNAPSHOT"

scalaVersion := "2.10.0-RC1"

// Compile for these Scala versions
crossScalaVersions := Seq("2.9.1", "2.9.2", "2.10.0-RC1")

publishMavenStyle := true

scalaSource in Compile <<= baseDirectory(_ / "src")

resolvers += "Sonatype OSS Snapshots" at "http://git:8081/nexus/content/repositories/snapshots"

resolvers += "Sonatype OSS Snapshots" at "http://git:8081/nexus/content/repositories/releases"

libraryDependencies ++= Seq(
  "com.restphone" % "artifactname" % "1.0"
)

publishTo <<= version { (v: String) =>
  val nexus = "http://git:8081/nexus/content/repositories/"
  if (v.trim.endsWith("SNAPSHOT"))
    Some("snapshots" at nexus + "snapshots")
  else
    Some("releases" at nexus + "releases")
}

credentials += Credentials("Sonatype Nexus Repository Manager", 
                           "git", 
                           "deployment",
                           "deploy")

Sunday, August 19, 2012

Looks like switching to zfs was worth doing:


pool: jamespool
 state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
        attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
        using 'zpool clear' or replace the device with 'zpool replace'.
   see: http://zfsonlinux.org/msg/ZFS-8000-9P
 scan: scrub repaired 0 in 29h13m with 0 errors on Fri Aug 17 13:12:16 2012
config:

        NAME                                                 STATE     READ WRITE CKSUM
        jamespool                                            ONLINE       0     0     0
          mirror-0                                           ONLINE       0     0     0
            scsi-SATA_WDC_WD7500AACS-_WD-WCAU47125177        ONLINE       0     0     0
            scsi-SATA_WDC_WD7500AACS-_WD-WCAU47162708        ONLINE       0     0     0
          mirror-1                                           ONLINE       0     0     0
            scsi-SATA_WDC_WD7500AAKS-_WD-WCAPT0622481        ONLINE       0     0     0
            scsi-SATA_ST3000DM001-9YN_S1F01R75-part1         ONLINE       0     0     0
          mirror-2                                           ONLINE       0     0     0
            scsi-SATA_WDC_WD7500AAKS-_WD-WCAPT0622515        ONLINE       0     0     0
            scsi-SATA_ST3000DM001-9YN_S1F01R75-part2         ONLINE       0     0     0
          mirror-3                                           ONLINE       0     0     0
            scsi-SATA_WDC_WD15EARS-00_WD-WMAVU2129350-part1  ONLINE       0     0 3.50K
            scsi-SATA_ST3000DM001-9YN_S1F01R75-part3         ONLINE       0     0     0
          mirror-4                                           ONLINE       0     0     0
            scsi-SATA_WDC_WD15EARS-00_WD-WMAVU2129350-part2  ONLINE       0     0   429
            scsi-SATA_ST3000DM001-9YN_S1F01R75-part4         ONLINE       0     0     0

SMART isn't seeing a problem with scsi-SATA_WDC_WD15EARS-00_WD-WMAVU2129350 yet though.

Friday, August 10, 2012

OpenSL ES for Android - SL_RESULT_CONTENT_UNSUPPORTED

If you're getting a SL_RESULT_CONTENT_UNSUPPORTED result from OpenSL like this:

E/AudioRecord( 2108): AudioFlinger could not create record track, status: -1
E/libOpenSLES( 2108): android_audioRecorder_realize(0x1cde560) error creating AudioRecord object
W/libOpenSLES( 2108): Leaving Object::Realize (SL_RESULT_CONTENT_UNSUPPORTED)

look a bit higher in the log. The solution might be staring you in the face:

W/ServiceManager(   81): Permission failure: android.permission.RECORD_AUDIO from uid=10078 pid=2108
E/AudioFlinger(   81): Request requires android.permission.RECORD_AUDIO