RAT (Release Audit Tool) results

The following document contains the results of RAT (Release Audit Tool).

*****************************************************
Summary
-------
Notes: 0
Binaries: 23
Archives: 1
Standards: 21

Apache Licensed: 2
Generated Documents: 0

JavaDocs are generated and so license header is optional
Generated files do not required license headers

19 Unknown Licenses

*******************************

Archives (+ indicates readable, $ unreadable): 

 + repo-embedded/org/apache/maven/maven-core/2.0.7-uber/maven-core-2.0.7-uber.jar
 
*****************************************************
  Files with AL headers will be marked L
  Binary files (which do not require AL headers) will be marked B
  Compressed archives will be marked A
  Notices, licenses etc will be marked N
 !????? src/main/resources/MvnPlugin.props
 !????? src/main/resources/description.html
 !????? src/main/resources/actions.xml
  AL    src/main/resources/mvn-settings-default.xml
 !????? src/main/resources/services.xml
 !????? src/main/scala/net.sf.alchim.jedit.mvn/HelloWorld.scala
 !????? src/main/scala/net.sf.alchim.jedit.mvn/MvnPlugin.scala
 !????? src/main/scala/net.sf.alchim.jedit.mvn/Mvn.scala
 !????? src/main/scala/net.sf.alchim.jedit.mvn/MvnShell.scala
 !????? src/main/scala/net.sf.alchim.jedit.mvn/MvnOptionPane.scala
 !????? src/main/scala/net.sf.alchim.jedit.mvn/PrintStream2ConsoleOutput.scala
 !????? src/changes/changes.xml
 !????? src/test/scala/net.sf.alchim.jedit.mvn/MvnTest.scala
 !????? pom.xml
 !????? .hgignore
  B     .hg/store/data/.hgignore.i
  B     .hg/store/data/pom.xml.i
  B     .hg/store/data/repo-embedded/org/apache/maven/maven-core/2.0.7-uber/maven-core-2.0.7-uber.jar.i
  B     .hg/store/data/repo-embedded/org/apache/maven/maven-core/2.0.7-uber/maven-core-2.0.7-uber.jar.d
  B     .hg/store/data/src/changes/changes.xml.i
  B     .hg/store/data/src/main/resources/_mvn_plugin.props.i
  B     .hg/store/data/src/main/resources/actions.xml.i
  B     .hg/store/data/src/main/resources/description.html.i
  B     .hg/store/data/src/main/resources/mvn-settings-default.xml.i
  B     .hg/store/data/src/main/resources/services.xml.i
  B     .hg/store/data/src/main/scala/net.sf.alchim.jedit.mvn/_hello_world.scala.i
  B     .hg/store/data/src/main/scala/net.sf.alchim.jedit.mvn/_mvn.scala.i
  B     .hg/store/data/src/main/scala/net.sf.alchim.jedit.mvn/_mvn_option_pane.scala.i
  B     .hg/store/data/src/main/scala/net.sf.alchim.jedit.mvn/_mvn_plugin.scala.i
  B     .hg/store/data/src/main/scala/net.sf.alchim.jedit.mvn/_mvn_shell.scala.i
  B     .hg/store/data/src/main/scala/net.sf.alchim.jedit.mvn/_print_stream2_console_output.scala.i
  B     .hg/store/data/src/test/scala/net.sf.alchim.jedit.mvn/_mvn_test.scala.i
  B     .hg/store/data/.hgtags.i
  B     .hg/store/00manifest.i
  B     .hg/store/00changelog.i
 !????? .hg/store/undo
 !????? .hg/00changelog.i
 !????? .hg/requires
 !????? .hg/hgrc
  B     .hg/dirstate
  B     .hg/undo.dirstate
 !????? .hgtags
  A     repo-embedded/org/apache/maven/maven-core/2.0.7-uber/maven-core-2.0.7-uber.jar
  AL    repo-embedded/org/apache/maven/maven-core/2.0.7-uber/maven-core-2.0.7-uber.pom
  B     repo-embedded/org/apache/maven/maven-core/2.0.7-uber/.maven-core-2.0.7-uber.pom.swp
 
 *****************************************************
 Printing headers for files without AL header...
 
 
 =======================================================================
 ==src/main/resources/MvnPlugin.props
 =======================================================================
 # Properties file for ${project.name} plugin

plugin.${pluginClass}.name=${project.name}
plugin.${pluginClass}.author=David Bernard
plugin.${pluginClass}.version=${project.version}
plugin.${pluginClass}.description=${project.description}
plugin.${pluginClass}.docs=index.html

plugin.${pluginClass}.depend.0=jedit 04.02.01.00
plugin.${pluginClass}.depend.1=jdk 1.5
plugin.${pluginClass}.depend.2=plugin console.ConsolePlugin 4.3.4
plugin.${pluginClass}.depend.3=plugin errorlist.ErrorListPlugin 1.6
#plugin.${pluginClass}.depend.4=plugin CommonControlsPlugin 0.9.4

plugin.${pluginClass}.jars=scala-library.jar classworlds.jar maven-core.jar

# jEdit only needs to load the plugin the first time the user accesses it
# the presence of this property also tells jEdit the plugin is using the new API
plugin.${pluginClass}.activate=defer

# Plugins menu
plugin.${pluginClass}.menu.label=${project.name}
plugin.${pluginClass}.menu=\
    ${project.artifactId}.goToPom \
	${project.artifactId}.goToSettings \
	- \
    ${project.artifactId}.mvnCompile \
	${project.artifactId}.mvnCleanPackage \
	${project.artifactId}.mvnCleanInstall \
	${project.artifactId}.mvnFree
	${project.artifactId}.mvnHelp \
#	quicknotepad2.save-file \
#	quicknotepad2.copy-to-buffer
${project.artifactId}.goToPom.label=Go to pom.xml
${project.artifactId}.goToSettings.label=Go to settings.xml
${project.artifactId}.mvnCompile.label=mvn compile
${project.artifactId}.mvnCleanPackage.label=mvn clean package
${project.artifactId}.mvnCleanInstall.label=mvn clean install
${project.artifactId}.mvnFree.label=mvn...
${project.artifactId}.mvnHelp.label=mvn help

# plugin option pane
plugin.${pluginClass}.option-pane=${project.artifactId}
options.${project.artifactId}.code=new net.sf.alchim.jedit.mvn.MvnOptionPane();
options.${project.artifactId}.label=${project.name}
options.${project.artifactId}.mvnDefaultOptions=-o
options.${project.artifactId}.mvnDefaultOptions.label=default options
options.${project.artifactId}.saveAllBeforeRunning=true
options.${project.artifactId}.saveAllBeforeRunning.label=save all buffers before running mvn (!no prompt!)


 =======================================================================
 ==src/main/resources/description.html
 =======================================================================
 ${project.description}

 =======================================================================
 ==src/main/resources/actions.xml
 =======================================================================
 <!DOCTYPE ACTIONS SYSTEM "actions.dtd">

<ACTIONS>
	<ACTION NAME="${project.artifactId}.goToPom">
		<CODE>
      net.sf.alchim.jedit.mvn.Mvn.goToPom();
		</CODE>
	</ACTION>
	<ACTION NAME="${project.artifactId}.goToSettings">
		<CODE>
      net.sf.alchim.jedit.mvn.Mvn.goToSettings();
		</CODE>
	</ACTION>
	<ACTION NAME="${project.artifactId}.mvnCompile">
		<CODE>
      net.sf.alchim.jedit.mvn.Mvn.executeCmd(buffer.getPath(), "compile");
		</CODE>
	</ACTION>
	<ACTION NAME="${project.artifactId}.mvnCleanPackage">
		<CODE>
      net.sf.alchim.jedit.mvn.Mvn.executeCmd(buffer.getPath(), "clean package");
		</CODE>
	</ACTION>
	<ACTION NAME="${project.artifactId}.mvnCleanInstall">
		<CODE>
      net.sf.alchim.jedit.mvn.Mvn.executeCmd(buffer.getPath(), "clean install");
		</CODE>
	</ACTION>
	<ACTION NAME="${project.artifactId}.mvnFree">
		<CODE>
      String prompt = org.gjt.sp.jedit.GUIUtilities.input(view, "mvn.msg.mvnFree", "clean");
      net.sf.alchim.jedit.mvn.Mvn.executeCmd(buffer.getPath(), "clean package");
		</CODE>
	</ACTION>
  <!-- TODO
	<ACTION NAME="${project.artifactId}.mvnLast">
		<CODE>
      net.sf.alchim.jedit.mvn.Mvn.executeCmd(buffer.getPath(), "!");
		</CODE>
	</ACTION>
  -->
	<ACTION NAME="${project.artifactId}.mvnHelp">
		<CODE>
      net.sf.alchim.jedit.mvn.Mvn.executeCmd(buffer.getPath(), "help");
		</CODE>
	</ACTION>
</ACTIONS>


 =======================================================================
 ==src/main/resources/services.xml
 =======================================================================
 <?xml version="1.0"?>
<!DOCTYPE SERVICES SYSTEM "services.dtd">
<SERVICES>
    <SERVICE CLASS="console.Shell" NAME="Maven2">
         net.sf.alchim.jedit.mvn.Mvn.shell();
    </SERVICE>
 </SERVICES>

 =======================================================================
 ==src/main/scala/net.sf.alchim.jedit.mvn/HelloWorld.scala
 =======================================================================
 package net.sf.alchim.jedit.mvn;

import org.gjt.sp.jedit.gui._;
import org.gjt.sp.jedit.View;
import javax.swing._;

object HelloWorld extends EnhancedDialog(null :java.awt.Frame, "Greeting", false) {    
    def showMe() = {
        println("begin showMe")
        //setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        add( new JLabel( "Hello World" ) );
        pack();
        setVisible( true );
        println("end showMe")
        //console.Console console = null
    }
    
    def ok {
      println("OK")
      dispose()
    }
    def cancel {
      println("Cancel")
      dispose()
    }
}


 =======================================================================
 ==src/main/scala/net.sf.alchim.jedit.mvn/MvnPlugin.scala
 =======================================================================
 package net.sf.alchim.jedit.mvn;

import org.gjt.sp.jedit._;
import errorlist.{ErrorSource, DefaultErrorSource}

/**
 * Work as the creator of everything/resource ??
 * @author David Bernard
 */
object MvnPlugin extends EditPlugin {
    final val NAME = "MvnPlugin"
    final val OPTION_PREFIX = "options." + NAME + "."
    final val OPTION_mvnDefaultOptions = OPTION_PREFIX + "mvnDefaultOptions"
    final val OPTION_saveAllBeforeRunning = OPTION_PREFIX + "saveAllBeforeRunning"

    private var errorSource_ : DefaultErrorSource = null

    def errorSource() = {
      if (errorSource_ == null) {
        errorSource_ = new DefaultErrorSource(MvnPlugin.NAME)
        ErrorSource.registerErrorSource(errorSource_)
      }
      errorSource_
    }
    
    def cleanUp() = {
      if (errorSource_ != null) {
        ErrorSource.unregisterErrorSource(errorSource_)
        errorSource_ = null
      }
    }
}

// create the class is required (it could be empty)
// if you want to avoid some ClassNotDefFoundError (on other scala classes)
// hack: scala 2.6, jedit-4.3pre11
class MvnPlugin extends EditPlugin {

//  override def start() {
//    println("starting...")
//    toto
//    println("...started")
//  }
  
  override def stop() {
    MvnPlugin.cleanUp()
  }
  
}

 =======================================================================
 ==src/main/scala/net.sf.alchim.jedit.mvn/Mvn.scala
 =======================================================================
 package net.sf.alchim.jedit.mvn;

import console.Console;
import errorlist.DefaultErrorSource;

import java.io.{File, FileOutputStream, FileNotFoundException};
import javax.swing.JOptionPane;

import org.gjt.sp.jedit._;
import org.gjt.sp.jedit.gui._;
import org.gjt.sp.jedit.io._;
import org.gjt.sp.util.IOUtilities;

//TODO provide function to find classpath (compile, test, runtime ?)
//TODO provide function to find MavenProject (original to access meta info,...)
//TODO integrate with ProjectViewer (auto fill classpath)
//TODO update info in ProjectViewer when pom.xml changed
//TODO validate pom.xml when is saved
object Mvn {
	lazy val shell = new MvnShell()
  
	lazy val errorSource = MvnPlugin.errorSource()
	
  def findProjectHome(): File = findProjectHome(jEdit.getActiveView().getBuffer().getPath())
  
  def findProjectHome(bufferPath: String): File = {
    var dir = new File(bufferPath).getParentFile();
    while ((dir != null) && !(new File(dir, "pom.xml").exists())) {
      dir = dir.getParentFile()
    }
    if (dir == null) {
      throw new FileNotFoundException("no 'pom.xml' found in the parent directory hierarchy")
    }
    dir
  }
  
  def goToPom() = JEditHelper.openFileInBuffers(new File(findProjectHome(), "pom.xml"))
  
  //TODO : create an empty settings if not found
  def goToSettings() {
    val settingsFile = new File(System.getProperty("user.home"), ".m2/settings.xml");
    if (!settingsFile.exists) {
      val toCreate = GUIUtilities.confirm(jEdit.getActiveView(), "mvn.msg.createUserSettings", null, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE)
      if (toCreate == JOptionPane.YES_OPTION) {
        settingsFile.getParentFile().mkdirs()
        val in = EditPlugin.getResourceAsStream(MvnPlugin, "mvn-settings-default.xml")
        val out = new FileOutputStream(settingsFile)
        try {
          IOUtilities.copyStream(null, in, out, false)
        } finally {

 =======================================================================
 ==src/main/scala/net.sf.alchim.jedit.mvn/MvnShell.scala
 =======================================================================
 package net.sf.alchim.jedit.mvn

import console.{Console, Shell, Output}

import java.io.{File, FileNotFoundException}
import org.gjt.sp.jedit._
import org.gjt.sp.jedit.gui._
import org.gjt.sp.jedit.io._

import org.apache.maven.cli._
import org.codehaus.classworlds._

import java.util.Properties
import java.net.URL

import scala.actors.Actor
import scala.actors.Actor._

class MvnShell extends console.Shell("Maven2") {
  
  var workingDir: File = null;
  private var mvnServer = new MvnServer()
  mvnServer.start
   
  //TODO: manage special commands (! = last command, ? = print usage) 
  def execute(console: Console, input: String, output: Output, error: Output, cmd: String) {
    println("sending MvnCmd :" + cmd)
    output.print(null, "> do " + cmd)
    output.print(null, "> on " + workingDir.getAbsolutePath())
    output.print(null, "> at " + new java.util.Date())
        
    //toto
    //TODO: use Option to manage nullable for error
    mvnServer ! MvnCmd(cmd, workingDir, output, output, console)
    println("sent MvnCmd")
  }
  
  
  override def printInfoMessage(output: Output) {		
  }
  
  override def stop(console: Console) {
    //mvnServer ! MvnStop
    if (mvnServer.isRunning) {
      mvnServer.exit()
      mvnServer.start()
    }
  }
  
  override def waitFor(console: Console) = {    

 =======================================================================
 ==src/main/scala/net.sf.alchim.jedit.mvn/MvnOptionPane.scala
 =======================================================================
 package net.sf.alchim.jedit.mvn

import org.gjt.sp.jedit.{AbstractOptionPane, jEdit}
import javax.swing.{JTextField, JLabel, JCheckBox}

//TODO add listing of options
//TODO add archetype definition support
//TODO add support to import archetype definitions from a wiki/html page ala Q4E
//TODO add option saveBeforeRunning
class MvnOptionPane extends AbstractOptionPane(MvnPlugin.NAME) {
    private var options_ : JTextField = null
    private var saveAllBeforeRunning_ : JCheckBox = null 
	
    override def _init() {
        saveAllBeforeRunning_ = new JCheckBox(
          jEdit.getProperty(MvnPlugin.OPTION_saveAllBeforeRunning + ".label"),
          jEdit.getBooleanProperty(MvnPlugin.OPTION_saveAllBeforeRunning)
        )
        addComponent(saveAllBeforeRunning_)
        
        options_ = new JTextField(jEdit.getProperty(MvnPlugin.OPTION_mvnDefaultOptions));
        addComponent(jEdit.getProperty(MvnPlugin.OPTION_mvnDefaultOptions + ".label"), options_);
        addComponent(new JLabel("<html><pre>"
          + "-q,--quiet                    Quiet output - only show errors\n"
          + "-C,--strict-checksums         Fail the build if checksums don't match\n"
          + "-c,--lax-checksums            Warn if checksums don't match\n"
          + "-P,--activate-profiles        Comma-delimited list of profiles to activate\n"
          + "-ff,--fail-fast               Stop at first failure in reactorized builds\n"
          + "-fae,--fail-at-end            Only fail the build afterwards; allow all non-impacted builds to continue\n"
          + "-B,--batch-mode               Run in non-interactive (batch) mode\n"
          + "-fn,--fail-never              NEVER fail the build, regardless of project result\n"
          + "-up,--update-plugins          Synonym for cpu\n"
          + "-N,--non-recursive            Do not recurse into sub-projects\n"
          + "-npr,--no-plugin-registry     Don't use ~/.m2/plugin-registry.xml for plugin versions\n"
          + "-U,--update-snapshots         Forces a check for updated releases and snapshots on remote repositories\n"
          + "-cpu,--check-plugin-updates   Force upToDate check for any relevant registered plugins\n"
          + "-npu,--no-plugin-updates      Suppress upToDate check for any relevant registered plugins\n"
          + "-D,--define                   Define a system property\n"
          + "-X,--debug                    Produce execution debug output\n"
          + "-e,--errors                   Produce execution error messages\n"
          + "-o,--offline                  Work offline \n"
          + "-r,--reactor                  Execute goals for project found in the reactor\n"
          + "-s,--settings                 Alternate path for the user settings file\n"
          + "-v,--version                  Display version information\n"
          + "</pre></html>")
        )
    }

    override def _save() {
        jEdit.setProperty(MvnPlugin.OPTION_mvnDefaultOptions, options_.getText())

 =======================================================================
 ==src/main/scala/net.sf.alchim.jedit.mvn/PrintStream2ConsoleOutput.scala
 =======================================================================
 package net.sf.alchim.jedit.mvn

import java.io.{PrintStream, OutputStream}
import console.{Output, Console, CommandOutputParser}
import errorlist.ErrorSource;
import org.gjt.sp.jedit.jEdit;

class PrintStream2ConsoleOutput(output: Output, stream: PrintStream, console: Console) extends PrintStream(stream, true) {
  val cache = new StringBuilder()
  val copt = new CommandOutputParser(console.getView(), Mvn.errorSource, console.getErrorColor());
	copt.setDirectory(System.getProperty( "user.dir" ))

  override def println(msg: String)	= {print(msg); print("\n")}
	override def println(msg: Array[Char]) = println(String.valueOf(msg));

  override def flush() = {print("\n"); super.flush()}
  
	override def print(msg: String) {
    var txt = msg
    while(true) {
      var pos = txt.indexOf("\n")
      if (pos < 0) {
        cache.append(txt)
        return
      }
      parseLine(txt.substring(0,pos))
      if((pos+1) == txt.length()) {
        return
      }
      txt = txt.substring(pos+1)
    }
	}

	def parseLine(line: String) {
	  if (line == null) return
    var txt = line
    if (cache.length > 0) {
      cache.append(line)
      txt = cache.toString()
      cache.setLength(0)
    }
		// TODO : update/interract with errorSource
    if (Thread.currentThread().getName().startsWith("AWT")) {
      stream.println(txt)
      return
    }
    
		if ( console == null ) {
      copt.processLine(txt)
      output.print(null, txt)

 =======================================================================
 ==src/changes/changes.xml
 =======================================================================
 <?xml version="1.0"?>
<document>
  <properties>
    <title>Changes</title>
    <author>David Bernard</author>
  </properties>
  <body>    
    <release version="1.0" date="2007-11-23" description="startup">
      <action dev="David Bernard" type="add">option "default mvn options"</action>
      <action dev="David Bernard" type="add">send error to error list</action>
      <action dev="David Bernard" type="add">command "mvn ..." free &amp; predefined</action>
      <action dev="David Bernard" type="add">command "Go to settings.xml"</action>
      <action dev="David Bernard" type="add">command "Go to pom.xml"</action>
    </release>
  </body>
</document>

 =======================================================================
 ==src/test/scala/net.sf.alchim.jedit.mvn/MvnTest.scala
 =======================================================================
 package net.sf.alchim.jedit.mvn;

import junit.framework._;
import Assert._;

object MvnTest {
    def suite: Test = {
        val suite = new TestSuite(classOf[MvnTest]);
        suite
    }

    def main(args : Array[String]) {
      junit.textui.TestRunner.run(suite);
    }
}

/**
 * Unit test for simple App.
 */
class MvnTest extends TestCase("mvn") {

    /**
     * Rigourous Test :-)
     */
    def testApp() {
        Mvn.findProjectHome(System.getProperty("user.dir") + "/xxx.txt")
        new MvnShell();
        //assertTrue(false)
    }
}

 =======================================================================
 ==pom.xml
 =======================================================================
 <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>net.sf.alchim</groupId>
    <artifactId>alchim-parent</artifactId>
    <version>3</version>
  </parent>
  <groupId>net.sf.alchim.jedit</groupId>
  <artifactId>MvnPlugin</artifactId>
  <version>1.0</version>
  <name>Maven2 Plugin</name>
  <inceptionYear>2007</inceptionYear>
  <description><![CDATA[
  This plugin provides basic support for [maven2] project in [jEdit] :
  * running "mvn ...",
  * create project from archetype,
  * quick access to pom.xml,
  * ...
  
  [maven2]: http://maven.apache.org
  [jEdit]:  http://jedit.org
]]></description>

  <properties>
    <jedit.home>${user.home}/bin/soft-java/jedit</jedit.home>
    <jedit.user.jars>${user.home}/.jedit/jars</jedit.user.jars>
    <scala.version>2.6.0</scala.version>
    <pluginClass>${project.groupId}.mvn.MvnPlugin</pluginClass>
  </properties>

  <repositories>
    <repository>
      <id>embedded</id>
      <name>Project Embbed Repository</name>
      <url>file://${basedir}/repo-embedded</url>
      <snapshots />
      <releases />
    </repository>
    <repository>
      <id>scala-tools.org</id>
      <name>Scala-Tools Maven2 Repository</name>
      <url>http://scala-tools.org/repo-releases</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>scala-tools.org</id>
      <name>Scala-Tools Maven2 Repository</name>
      <url>http://scala-tools.org/repo-releases</url>

 =======================================================================
 ==.hgignore
 =======================================================================
 # use glob syntax.
syntax: glob
*.ser
*.class
*~
*.bak

# eclipse conf file
.settings
.classpath
.project

# building
target
build
null
tmp*
temp*
dist
test-output

# other scm
.svn
.CVS
.git

# switch to regexp syntax.
#  syntax: regexp
#  ^\.pc/



 =======================================================================
 ==.hg/store/undo
 =======================================================================
 data/.hgtags.i?0
00manifest.i?739
00changelog.i?402

 =======================================================================
 ==.hg/00changelog.i
 =======================================================================
 ???? dummy changelog to prevent using the old repo layout

 =======================================================================
 ==.hg/requires
 =======================================================================
 revlogv1
store

 =======================================================================
 ==.hg/hgrc
 =======================================================================
 [paths]
default-push = ssh://dwayneb@shell.sf.net/alchim/hg/MvnPlugin

[web]
style = gitweb
allow_archive = bz2 gz zip
contact = David Bernard, dwayneb@users.sf.net
push_ssl = false
allow_push = david.bernard


 =======================================================================
 ==.hgtags
 =======================================================================
 2aa01ac51f203b5191c889b90776f4ef73353a65 1.0