title: Error compiling Jenkins plugin using Java and Maven
body: <p>I'm hoping somebody could help. I'm trying to compile a simple plugin for Jenkins/Hudson that will execute code on a slave, however this block of code is failing to compile:</p>
  
  <pre><code>// Define what should be run on the slave for this build
  Callable&lt;String, IOException&gt; task = new Callable&lt;String, IOException&gt;() {
      public String call() throws IOException {
          // This code will run on the build slave
          return InetAddress.getLocalHost().getHostName();
      }
  };
  // Get a "channel" to the build machine and run the task there
  String hostname = launcher.getChannel().call(task);
  </code></pre>
  
  <p>I'm getting an exception when trying to compile when declaring the Callable variable Task. The error is 'error: wrong number of type arguments; required 1'.</p>
  
  <p>I'm new to both creating jenkins plugins and Java so I'm hoping someone more experienced could aid me. I've googled extensively and the documentation suggests I'm doing the right thing (<a href="http://grepcode.com/file/repo1.maven.org/maven2/org.jvnet.hudson.main/remoting/1.366/hudson/remoting/Callable.java#Callable" rel="nofollow">http://grepcode.com/file/repo1.maven.org/maven2/org.jvnet.hudson.main/remoting/1.366/hudson/remoting/Callable.java#Callable</a>) which is why I've came up stuck.</p>
  
  <p>Thanks for your time.</p>