changeset 18:9436877e9b54

added sample maven project
author Dirk Olmes <dirk.olmes@googlemail.com>
date Tue, 17 Jun 2008 12:22:15 +0200
parents 5353da33cc57
children 242ed49b42c9
files findbugs-wtf/pom.xml findbugs-wtf/src/main/java/de/iobjects/render/ButtonRenderer.java findbugs-wtf/src/main/java/de/iobjects/render/Renderer.java findbugs-wtf/src/main/java/de/iobjects/widget/AbstractWidget.java findbugs-wtf/src/main/java/de/iobjects/widget/Button.java
diffstat 5 files changed, 118 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/findbugs-wtf/pom.xml	Tue Jun 17 12:22:15 2008 +0200
@@ -0,0 +1,60 @@
+<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>
+	<groupId>de.iobjects</groupId>
+	<artifactId>findbugs-wtf</artifactId>
+	<packaging>jar</packaging>
+	<version>1.0-SNAPSHOT</version>
+	<name>findbugs-wtf</name>
+	<url>http://maven.apache.org</url>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.0.2</version>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>findbugs-maven-plugin</artifactId>
+				<version>1.2</version>
+				<configuration>
+					<findbugsXmlOutput>true</findbugsXmlOutput>
+					<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
+					<xmlOutput>true</xmlOutput>
+				</configuration>
+				<dependencies>
+					<dependency>
+						<groupId>net.sourceforge.findbugs</groupId>
+						<artifactId>findbugs</artifactId>
+						<version>1.3.2</version>
+					</dependency>
+				</dependencies>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>findbugs-maven-plugin</artifactId>
+			</plugin>
+		</plugins>
+	</reporting>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/findbugs-wtf/src/main/java/de/iobjects/render/ButtonRenderer.java	Tue Jun 17 12:22:15 2008 +0200
@@ -0,0 +1,19 @@
+package de.iobjects.render;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import de.iobjects.widget.Button;
+
+public class ButtonRenderer extends Object implements Renderer<Button>
+{
+	public void beginRender(Button widget, Writer writer) throws IOException
+	{
+		writer.write("begin " + widget.getName());
+	}
+
+	public void endRender(Button widget, Writer writer) throws IOException
+	{
+		writer.write("end " + widget.getName());
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/findbugs-wtf/src/main/java/de/iobjects/render/Renderer.java	Tue Jun 17 12:22:15 2008 +0200
@@ -0,0 +1,13 @@
+package de.iobjects.render;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import de.iobjects.widget.AbstractWidget;
+
+public interface Renderer<T extends AbstractWidget>
+{
+	void beginRender(T widget, Writer writer) throws IOException;
+	
+	void endRender(T widget, Writer writer) throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/findbugs-wtf/src/main/java/de/iobjects/widget/AbstractWidget.java	Tue Jun 17 12:22:15 2008 +0200
@@ -0,0 +1,17 @@
+package de.iobjects.widget;
+
+public abstract class AbstractWidget extends Object
+{
+	private String _name;
+
+	public AbstractWidget(String name)
+	{
+		super();
+		_name = name;
+	}
+	
+	public String getName()
+	{
+		return _name;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/findbugs-wtf/src/main/java/de/iobjects/widget/Button.java	Tue Jun 17 12:22:15 2008 +0200
@@ -0,0 +1,9 @@
+package de.iobjects.widget;
+
+public class Button extends AbstractWidget
+{
+	public Button(String name)
+	{
+		super(name);
+	}
+}