You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by ma...@apache.org on 2007/10/29 21:04:43 UTC

svn commit: r589832 [2/2] - in /openejb/trunk/sandbox/openejb-eclipse-plugin: ./ assembly/ assembly/src/ assembly/src/main/ assembly/src/main/assembly/ eclipse/ features/ features/org.apache.openejb.feature/ features/org.apache.openejb.feature/.externa...

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/IJavaProjectAnnotationFacade.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/IJavaProjectAnnotationFacade.java?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/IJavaProjectAnnotationFacade.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/IJavaProjectAnnotationFacade.java Mon Oct 29 13:04:39 2007
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */ 
+
+package org.apache.openejb.helper.annotation;
+
+import java.util.Map;
+
+public interface IJavaProjectAnnotationFacade {
+
+	/**
+	 * Adds an annotation to a class
+	 * @param targetClass Fully qualified name of the class to add the annotation to
+	 * @param annotation Fully qualified name of the annotation
+	 */
+	public void addClassAnnotation(String targetClass,	String annotation);
+
+	/**
+	 * Adds an annotation to a class, with the specified properties
+	 * @param targetClass Fully qualified name of the class to add the annotation to
+	 * @param annotation Fully qualified name of the annotation
+	 * @param properties Properties for the annotation to be added
+	 */
+	public void addClassAnnotation(String targetClass, String annotation, Map<String, Object> properties);
+
+	public void addClassAnnotation(String targetClass, Class annotation, Map<String,Object> properties);
+
+	public void addMethodAnnotation(String fullyQualifiedClassName, String methodName, Class annotationClass, Map<String, Object> properties);
+
+	public void addMethodAnnotation(String targetClass, String methodName, String annotationToAdd, Map<String, Object> properties);
+
+	public void addFieldAnnotation(String targetClass, String targetField, Class annotation, Map<String, Object> properties);
+
+	public void addFieldAnnotation(String targetClass, String targetField, String annotation, Map<String, Object> properties);
+	
+	
+}
\ No newline at end of file

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/JavaProjectAnnotationFacade.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/JavaProjectAnnotationFacade.java?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/JavaProjectAnnotationFacade.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/JavaProjectAnnotationFacade.java Mon Oct 29 13:04:39 2007
@@ -0,0 +1,435 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openejb.helper.annotation;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.filebuffers.ITextFileBufferManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration;
+import org.eclipse.jdt.core.dom.BodyDeclaration;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.IExtendedModifier;
+import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.QualifiedName;
+import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.StringLiteral;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.DocumentChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.text.edits.MalformedTreeException;
+import org.eclipse.text.edits.TextEdit;
+
+/**
+ * Add annotations to source files in an Eclipse Java project
+ * 
+ */
+public class JavaProjectAnnotationFacade implements IJavaProjectAnnotationFacade {
+
+	protected IJavaProject javaProject;
+
+	protected Map<String, CompilationUnit> cuMap = new HashMap<String, CompilationUnit>();
+
+	/**
+	 * Creates a new annotation facade
+	 * 
+	 * @param project
+	 *            Eclipse project to work on
+	 */
+	public JavaProjectAnnotationFacade(IProject project) {
+		this.javaProject = JavaCore.create(project);
+	}
+
+	protected CompilationUnit getCompilationUnit(String targetClass) throws JavaModelException {
+		IType type = javaProject.findType(targetClass);
+		ICompilationUnit compilationUnit = type.getCompilationUnit();
+
+		String path = compilationUnit.getPath().toString();
+
+		if (cuMap.keySet().contains(path)) {
+			return cuMap.get(path);
+		}
+
+		CompilationUnit cu = parse(compilationUnit);
+		cuMap.put(path, cu);
+
+		return cu;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.openejb.helper.annotation.IAnnotationHelper#addClassAnnotation(java.lang.String,
+	 *      java.lang.String)
+	 */
+	public void addClassAnnotation(String fullClassName, String annotationToAdd) {
+		addClassAnnotation(fullClassName, annotationToAdd, null);
+	}
+
+	/**
+	 * Adds a class to the list of imports for a compilation unit This method
+	 * will check to see if the class has already been imported
+	 * 
+	 * @param classToImport
+	 *            The fully qualified name of the class to import
+	 * @param compilationUnit
+	 *            The compilation unit to add the import to
+	 */
+	void addImportToCompilationUnit(String classToImport, CompilationUnit compilationUnit) {
+		if (!isClassImported(classToImport, compilationUnit)) {
+			String[] parts = classToImport.split("\\.");
+
+			AST ast = compilationUnit.getAST();
+
+			Name name = null;
+
+			for (int i = 0; i < parts.length; i++) {
+				SimpleName simpleName = ast.newSimpleName(parts[i]);
+				if (i == 0) {
+					name = simpleName;
+				} else {
+					name = ast.newQualifiedName(name, simpleName);
+				}
+			}
+
+			ImportDeclaration importDeclaration = ast.newImportDeclaration();
+			importDeclaration.setName(name);
+			importDeclaration.setOnDemand(false);
+			importDeclaration.setStatic(false);
+
+			compilationUnit.imports().add(importDeclaration);
+		}
+	}
+
+	/**
+	 * Determines whether the specified class has been imported in the
+	 * compilation unit
+	 * 
+	 * @param importedClass
+	 *            The imported (or not) class
+	 * @param compilationUnit
+	 *            The compilation unit to check
+	 * @return Whether of not the class has been imported
+	 */
+	private boolean isClassImported(String importedClass, CompilationUnit compilationUnit) {
+		Iterator iterator = compilationUnit.imports().iterator();
+		String packageName = importedClass.substring(0, importedClass.lastIndexOf("."));
+
+		while (iterator.hasNext()) {
+			ImportDeclaration importDeclaration = (ImportDeclaration) iterator.next();
+			String importedName = importDeclaration.getName().toString();
+			if (importedName.equals(packageName) || importedName.equals(importedClass)) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 * Parses the specified compilation unit to obtain an AST
+	 * 
+	 * @param compilationUnit
+	 *            The compilation unit to parse
+	 * @return The parsed compilation unit AST object
+	 */
+	CompilationUnit parse(ICompilationUnit compilationUnit) {
+		ASTParser parser = ASTParser.newParser(AST.JLS3);
+		parser.setKind(ASTParser.K_COMPILATION_UNIT);
+		parser.setSource(compilationUnit);
+		parser.setResolveBindings(true);
+		CompilationUnit cu = (CompilationUnit) parser.createAST(null);
+		cu.recordModifications();
+		return cu;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.openejb.helper.annotation.IAnnotationHelper#addClassAnnotation(java.lang.String,
+	 *      java.lang.Class, java.util.Map)
+	 */
+	public void addClassAnnotation(String targetClass, Class annotation, Map<String, Object> properties) {
+		addClassAnnotation(targetClass, annotation.getCanonicalName(), properties);
+	}
+
+	boolean addModifierToDeclaration(BodyDeclaration declaration, Annotation annotation) {
+		Iterator iterator = declaration.modifiers().iterator();
+		while (iterator.hasNext()) {
+			IExtendedModifier modifier = (IExtendedModifier) iterator.next();
+			if (!(modifier instanceof Annotation)) {
+				continue;
+			}
+
+			if (((Annotation) modifier).getTypeName().toString().equals(annotation.getTypeName().toString())) {
+				// break out if this type already has this annotation
+				return false;
+			}
+		}
+
+		declaration.modifiers().add(0, annotation);
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.openejb.helper.annotation.IJavaProjectAnnotationFacade#addClassAnnotation(java.lang.String,
+	 *      java.lang.String, java.util.Map)
+	 */
+	public void addClassAnnotation(String targetClass, String annotationToAdd, Map<String, Object> properties) {
+		try {
+
+			// try and get a java element that corresponds to the annotation
+			IType annotationType = javaProject.findType(annotationToAdd);
+			if (!annotationType.isAnnotation()) {
+				return;
+			}
+
+			CompilationUnit cu = getCompilationUnit(targetClass);
+			TypeDeclaration typeDeclaration = getTypeDeclaration(cu, targetClass);
+
+			boolean modifierAdded = addModifierToDeclaration(typeDeclaration, createAnnotationWithProperties(cu.getAST(), annotationType, properties));
+			if (modifierAdded) {
+				addImportToCompilationUnit(annotationToAdd, cu);
+			}
+
+		} catch (MalformedTreeException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (CoreException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	TypeDeclaration getTypeDeclaration(CompilationUnit compilationUnit, String targetClass) throws CoreException {
+		IType type = javaProject.findType(targetClass);
+
+		Iterator typesIterator = compilationUnit.types().iterator();
+
+		while (typesIterator.hasNext()) {
+			TypeDeclaration typeDeclaration = (TypeDeclaration) typesIterator.next();
+			if (typeDeclaration.getName().toString().equals(type.getElementName())) {
+				return typeDeclaration;
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * Saves changes made to the AST of the compilation unit. Assumes that
+	 * <code>compilationUnit.recordModifications()</code> has been called
+	 * 
+	 * @param compilationUnit
+	 *            The compilation unit to save
+	 * @throws CoreException
+	 * @throws BadLocationException
+	 * @throws JavaModelException
+	 * @deprecated
+	 */
+	void saveChangesTo(CompilationUnit compilationUnit) throws CoreException, BadLocationException, JavaModelException {
+		ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
+		IPath path = compilationUnit.getJavaElement().getPath();
+		bufferManager.connect(path, null);
+
+		ITextFileBuffer textFileBuffer = bufferManager.getTextFileBuffer(path);
+		IDocument document = textFileBuffer.getDocument();
+
+		TextEdit edits = compilationUnit.rewrite(document, javaProject.getOptions(true));
+		edits.apply(document);
+		String newSource = document.get();
+		IBuffer buffer = ((ICompilationUnit) compilationUnit.getJavaElement()).getBuffer();
+		buffer.setContents(newSource);
+		buffer.save(null, true);
+
+		textFileBuffer.commit(null, true);
+		bufferManager.disconnect(path, null);
+	}
+
+	/**
+	 * Creates a new annotation object to be added to the AST, with the
+	 * specified properties
+	 * 
+	 * @param ast
+	 *            The AST to create the annotation for
+	 * @param annotationType
+	 *            The type of annotation to create
+	 * @param properties
+	 *            The properties for the annotation to add
+	 * @return The created annotation AST object
+	 */
+	Annotation createAnnotationWithProperties(AST ast, IType annotationType, Map<String, Object> properties) {
+		SimpleName annotationTypeName = ast.newSimpleName(annotationType.getElementName());
+		Annotation annotation;
+
+		if (properties != null) {
+			annotation = ast.newNormalAnnotation();
+			Iterator<String> propertyIterator = properties.keySet().iterator();
+			while (propertyIterator.hasNext()) {
+				String propertyName = (String) propertyIterator.next();
+				annotation.setProperty(propertyName, properties.get(propertyName));
+
+				MemberValuePair annotationProperty = ast.newMemberValuePair();
+				annotationProperty.setName(ast.newSimpleName(propertyName));
+				
+				QualifiedName expression = ast.newQualifiedName(ast.newSimpleName("TransactionManagementType"), ast.newSimpleName("BEAN"));
+				annotationProperty.setValue(expression);
+
+				((NormalAnnotation) annotation).values().add(annotationProperty);
+			}
+		} else {
+			annotation = ast.newMarkerAnnotation();
+		}
+
+		annotation.setTypeName(annotationTypeName);
+		return annotation;
+	}
+
+	public void addMethodAnnotation(String fullyQualifiedClassName, String methodName, Class annotationClass, Map<String, Object> properties) {
+		addMethodAnnotation(fullyQualifiedClassName, methodName, annotationClass.getCanonicalName(), properties);
+	}
+
+	public void addMethodAnnotation(String targetClass, String methodName, String annotationToAdd, Map<String, Object> properties) {
+		try {
+			// try and get a java element that corresponds to the annotation
+			IType annotationType = javaProject.findType(annotationToAdd);
+			if (!annotationType.isAnnotation()) {
+				return;
+			}
+
+			CompilationUnit cu = getCompilationUnit(targetClass);
+
+			TypeDeclaration typeDeclaration = getTypeDeclaration(cu, targetClass);
+
+			MethodDeclaration[] methods = typeDeclaration.getMethods();
+			Iterator<MethodDeclaration> iterator = Arrays.asList(methods).iterator();
+			while (iterator.hasNext()) {
+				MethodDeclaration method = (MethodDeclaration) iterator.next();
+				if (method.getName().toString().equals(methodName)) {
+					boolean modifierAdded = addModifierToDeclaration(method, createAnnotationWithProperties(cu.getAST(), annotationType, properties));
+					if (modifierAdded) {
+						addImportToCompilationUnit(annotationToAdd, cu);
+					}
+				}
+			}
+
+		} catch (CoreException e) {
+
+		}
+	}
+
+	public void addFieldAnnotation(String targetClass, String targetField, Class annotation, Map<String, Object> properties) {
+		addFieldAnnotation(targetClass, targetField, annotation.getCanonicalName(), properties);
+	}
+
+	public void addFieldAnnotation(String targetClass, String targetField, String annotation, Map<String, Object> properties) {
+		try {
+			// try and get a java element that corresponds to the annotation
+			IType annotationType = javaProject.findType(annotation);
+			if (!annotationType.isAnnotation()) {
+				return;
+			}
+
+			CompilationUnit cu = getCompilationUnit(targetClass);
+
+			TypeDeclaration typeDeclaration = getTypeDeclaration(cu, targetClass);
+			FieldDeclaration[] fields = typeDeclaration.getFields();
+
+			Iterator<FieldDeclaration> iterator = Arrays.asList(fields).iterator();
+			while (iterator.hasNext()) {
+				FieldDeclaration field = iterator.next();
+				if (field.fragments().size() == 0) {
+					continue;
+				}
+
+				VariableDeclarationFragment varibleDeclaration = (VariableDeclarationFragment) field.fragments().get(0);
+				if (varibleDeclaration.getName().toString().equals(targetField)) {
+					boolean modifierAdded = addModifierToDeclaration(field, createAnnotationWithProperties(cu.getAST(), annotationType, properties));
+					if (modifierAdded) {
+						addImportToCompilationUnit(annotation, cu);
+					}
+				}
+			}
+
+		} catch (CoreException e) {
+
+		}
+	}
+
+	public Change getChange() {
+		CompositeChange compositeChange = new CompositeChange("Add EJB 3.0 Annotations");
+
+		Iterator<CompilationUnit> iterator = cuMap.values().iterator();
+		while (iterator.hasNext()) {
+			try {
+				CompilationUnit cu = (CompilationUnit) iterator.next();
+				ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
+				IPath path = cu.getJavaElement().getPath();
+				bufferManager.connect(path, null);
+
+				ITextFileBuffer textFileBuffer = bufferManager.getTextFileBuffer(path);
+				IDocument document = textFileBuffer.getDocument();
+
+				TextEdit edit = cu.rewrite(document, javaProject.getOptions(true));
+
+				TextFileChange dc = new TextFileChange(path.toString(), (IFile) cu.getJavaElement().getResource());
+				//DocumentChange dc = new DocumentChange(path.toString(), document);
+				dc.setTextType("java");
+				dc.setEdit(edit);
+				dc.setSaveMode(TextFileChange.FORCE_SAVE);
+
+				compositeChange.add(dc);
+
+			} catch (CoreException e) {
+
+			}
+		}
+
+		return compositeChange;
+	}
+}

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java Mon Oct 29 13:04:39 2007
@@ -0,0 +1,182 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.apache.openejb.helper.annotation;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.ejb.TransactionAttributeType;
+import javax.ejb.TransactionManagementType;
+
+import org.apache.openejb.jee.ApplicationException;
+import org.apache.openejb.jee.AssemblyDescriptor;
+import org.apache.openejb.jee.EjbJar;
+import org.apache.openejb.jee.EnterpriseBean;
+import org.apache.openejb.jee.EntityBean;
+import org.apache.openejb.jee.JaxbJavaee;
+import org.apache.openejb.jee.MessageDrivenBean;
+import org.apache.openejb.jee.MethodTransaction;
+import org.apache.openejb.jee.SessionBean;
+import org.apache.openejb.jee.SessionType;
+import org.apache.openejb.jee.StatefulBean;
+import org.apache.openejb.jee.StatelessBean;
+import org.apache.openejb.jee.TransactionType;
+import org.eclipse.core.resources.IProject;
+import org.xml.sax.InputSource;
+
+/**
+ * Scans an openejb-jar.xml file using a SAX parser, and adds annotations
+ * to source based on the XML.
+ * 
+ * Depends on an implementation of IJavaProjectAnnotationFacade
+ *
+ */
+public class OpenEjbXmlConverter {
+
+	public static final String CLS_TRANSACTION_ATTRIBUTE = "javax.ejb.TransactionAttribute";
+	public static final String CLS_APPLICATION_EXCEPTION = "javax.ejb.ApplicationException";
+	public static final String CLS_STATEFUL = "javax.ejb.Stateful";
+	public static final String CLS_STATELESS = "javax.ejb.Stateless";
+	public static final String CLS_MESSAGE_DRIVEN = "javax.ejb.MessageDriven";
+	public static final String STATELESS_CLASS = CLS_STATELESS;
+	protected IJavaProjectAnnotationFacade annotationHelper;
+	
+
+	/**
+	 * Constucts a new converter
+	 * @param annotationHelper Annotation Facade to use for adding annotations 
+	 */
+	public OpenEjbXmlConverter(IJavaProjectAnnotationFacade annotationHelper) {
+		this.annotationHelper = annotationHelper;
+	}
+
+	/**
+	 * Constructs a new converter - uses the default implementation of
+	 * IJavaProjectAnnotationFacade - JavaProjectAnnotationFacade
+	 * @param project An eclipse Java project
+	 */
+	public OpenEjbXmlConverter(IProject project) {
+		this(new JavaProjectAnnotationFacade(project));
+	}
+	
+	/**
+	 * Parses the XML
+	 * @param source An input source to the content of ejb-jar.xml
+	 * @return Whether or not the parsing was successful
+	 */
+	public boolean convert(InputSource source) {
+		try {
+			EjbJar ejbJar = (EjbJar) JaxbJavaee.unmarshal(EjbJar.class, source.getByteStream());
+			
+			processEnterpriseBeans(ejbJar);
+			processApplicationExceptions(ejbJar);
+			
+			return true;
+		} catch (Exception e) {
+			return false;
+		}
+	}
+
+	private void processApplicationExceptions(EjbJar ejbJar) {
+		List<ApplicationException> exceptionList = ejbJar.getAssemblyDescriptor().getApplicationException();
+		Iterator<ApplicationException> iterator = exceptionList.iterator();
+		
+		while (iterator.hasNext()) {
+			ApplicationException element = (ApplicationException) iterator.next();
+			String exceptionClass = element.getExceptionClass();
+			
+			annotationHelper.addClassAnnotation(exceptionClass, CLS_APPLICATION_EXCEPTION);
+		}
+	}
+
+	private void processEnterpriseBeans(EjbJar ejbJar) {
+		EnterpriseBean[] enterpriseBeans = ejbJar.getEnterpriseBeans();
+		Iterator<EnterpriseBean> iterator = Arrays.asList(enterpriseBeans).iterator();
+		while (iterator.hasNext()) {
+			EnterpriseBean bean = (EnterpriseBean) iterator.next();
+			if (bean instanceof SessionBean) {
+				SessionBean sessionBean = (SessionBean) bean;
+				processSessionBean(sessionBean);
+			} else if (bean instanceof EntityBean) {
+				EntityBean entityBean = (EntityBean) bean;
+				processEntityBean(entityBean);
+			} else if (bean instanceof MessageDrivenBean) {
+				MessageDrivenBean messageDriven = (MessageDrivenBean) bean;
+				processMessageDrivenBean(messageDriven);
+			}
+			
+			processTransactionManagement(bean, ejbJar.getAssemblyDescriptor());
+		}
+		
+	}
+
+	private void processTransactionManagement(EnterpriseBean bean, AssemblyDescriptor descriptor) {
+		TransactionType transactionType = bean.getTransactionType();
+		
+		if (transactionType != null && (! TransactionType.CONTAINER.equals(transactionType))) {
+			Map<String,Object> props = new HashMap<String, Object>();
+			props.put("value", TransactionManagementType.BEAN);
+			
+			annotationHelper.addClassAnnotation(bean.getEjbClass(), "javax.ejb.TransactionManagement", props);
+		}
+		
+		Map<String, List<MethodTransaction>> methodTransactions = descriptor.getMethodTransactions(bean.getEjbName());
+		if (methodTransactions.containsKey("*")) {
+			List<MethodTransaction> defaultTransactions = methodTransactions.get("*");
+			MethodTransaction defaultTransaction = defaultTransactions.get(0);
+			
+			Map<String, Object> props = new HashMap<String, Object>();
+			props.put("value", TransactionAttributeType.valueOf(defaultTransaction.getAttribute().name()));
+			annotationHelper.addClassAnnotation(bean.getEjbClass(), CLS_TRANSACTION_ATTRIBUTE, props);
+		}
+		
+		Iterator<String> iterator = methodTransactions.keySet().iterator();
+		while (iterator.hasNext()) {
+			String methodName = (String) iterator.next();
+			if ("*".equals(methodName)) {
+				continue;
+			}
+			
+			List<MethodTransaction> transactions = methodTransactions.get(methodName);
+			MethodTransaction methodTransaction = transactions.get(0);
+			
+			Map<String, Object> props = new HashMap<String, Object>();
+			props.put("value", TransactionAttributeType.valueOf(methodTransaction.getAttribute().name()));
+			annotationHelper.addMethodAnnotation(bean.getEjbClass(), methodName, CLS_TRANSACTION_ATTRIBUTE, props);
+		}
+	}
+
+	private void processMessageDrivenBean(MessageDrivenBean entityBean) {
+		annotationHelper.addClassAnnotation(entityBean.getEjbClass(), CLS_MESSAGE_DRIVEN);
+	}
+
+	private void processEntityBean(EntityBean entityBean) {
+	}
+
+	private void processSessionBean(SessionBean sessionBean) {
+		String ejbClass = sessionBean.getEjbClass();
+		if (sessionBean instanceof StatelessBean || sessionBean.getSessionType() == SessionType.STATELESS) {
+			annotationHelper.addClassAnnotation(ejbClass, CLS_STATELESS);
+		} else if (sessionBean instanceof StatefulBean || sessionBean.getSessionType() == SessionType.STATELESS) {
+			annotationHelper.addClassAnnotation(ejbClass, CLS_STATEFUL);
+		} 
+	}
+}

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java Mon Oct 29 13:04:39 2007
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.apache.openejb.helper.annotation.actions;
+
+import org.apache.openejb.helper.annotation.Activator;
+import org.apache.openejb.helper.annotation.wizards.EJBMigrationRefactoring;
+import org.apache.openejb.helper.annotation.wizards.EJBMigrationWizard;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
+import org.eclipse.ui.IActionDelegate;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+public class GenerateAnnotationsAction implements IObjectActionDelegate, IWorkbenchWindowActionDelegate {
+
+	protected IResource resource;
+
+	/**
+	 * Constructor for Action1.
+	 */
+	public GenerateAnnotationsAction() {
+		super();
+		resource = null;
+	}
+
+	/**
+	 * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
+	 */
+	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+	}
+
+	/**
+	 * @see IActionDelegate#run(IAction)
+	 */
+	public void run(IAction action) {
+		if (resource == null) {
+			return;
+		}
+
+		EJBMigrationRefactoring refactoring = new EJBMigrationRefactoring();
+		refactoring.setProject(resource.getProject());
+		
+		if (resource instanceof IFile) {
+			refactoring.setEjbJarXmlFile(resource.getProjectRelativePath().toString());
+		}
+		
+		RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(new EJBMigrationWizard(refactoring, RefactoringWizard.WIZARD_BASED_USER_INTERFACE));
+		try {
+			op.run(Activator.getWorkbenchWindow().getShell(), "Dialog");
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * @see IActionDelegate#selectionChanged(IAction, ISelection)
+	 */
+	public void selectionChanged(IAction action, ISelection selection) {
+		if (selection instanceof IStructuredSelection) {
+			IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+			Object firstElement = structuredSelection.getFirstElement();
+			
+			if (firstElement instanceof IResource) {
+				resource = ((IResource) firstElement);
+			}
+			
+			if (firstElement instanceof IProject) {
+				resource = (IProject) firstElement;
+			}
+		}
+	}
+
+	public void dispose() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void init(IWorkbenchWindow window) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java Mon Oct 29 13:04:39 2007
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.apache.openejb.helper.annotation.wizards;
+
+import java.io.File;
+
+import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+
+public class EJBJarSelectionPage extends UserInputWizardPage {
+
+	protected String ejbJarXmlFile;
+	protected String openEjbJarXmlFile;
+	
+	protected Text ejbJarXmlFileText;
+	protected Text openEjbJarXmlFileText;
+
+	public EJBJarSelectionPage() {
+		super("wizardPage");
+		setTitle("EJB 3.0 Annotation Wizard");
+		setDescription("This wizard analyzes ejb-jar.xml and openejb-jar.xml and adds EJB 3.0 annotations to your source");
+	}
+	
+	public void createControl(Composite parent) {
+		Composite container = new Composite(parent, SWT.NULL);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 3;
+		container.setLayout(layout);
+		
+		Label ejbJarXmlLabel = new Label(container, SWT.NULL);
+		ejbJarXmlLabel.setText("&EJB Jar File");
+		
+		ejbJarXmlFileText = new Text(container, SWT.BORDER | SWT.SINGLE);
+		ejbJarXmlFileText.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				checkPage();
+			}
+		});
+		
+		Button ejbJarBrowseButton = new Button(container, SWT.PUSH);
+		ejbJarBrowseButton.setText("&Browse");
+		ejbJarBrowseButton.addListener(SWT.Selection, new Listener(){
+			public void handleEvent(Event event) {
+				handleEjbJarBrowse();
+			}
+		});
+		
+		setControl(container);
+	}
+	
+	protected void handleEjbJarBrowse() {
+		FileDialog fileDialog = new FileDialog(getShell());
+		fileDialog.setFilterNames(new String[] {"ejb-jar.xml"});
+		String filename = fileDialog.open();
+		ejbJarXmlFileText.setText(filename);
+		
+		checkPage();
+	}
+
+	protected void checkPage() {
+		ejbJarXmlFile = ejbJarXmlFileText.getText();
+		
+		if (! new File(ejbJarXmlFile).exists()) {
+			setErrorMessage("Please select an ejb-jar.xml file");
+			setPageComplete(false);
+		} else {
+			setErrorMessage(null);
+			setPageComplete(true);
+		}
+	}
+}

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java Mon Oct 29 13:04:39 2007
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openejb.helper.annotation.wizards;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.openejb.helper.annotation.JavaProjectAnnotationFacade;
+import org.apache.openejb.helper.annotation.OpenEjbXmlConverter;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.Refactoring;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.RefactoringStatusEntry;
+import org.xml.sax.InputSource;
+
+public class EJBMigrationRefactoring extends Refactoring {
+
+	protected String ejbJarXmlFile;
+	protected String openEjbJarXmlFile;
+	protected IProject project;
+	
+	@Override
+	public RefactoringStatus checkFinalConditions(IProgressMonitor pm)
+			throws CoreException, OperationCanceledException {
+
+		return new RefactoringStatus();
+	}
+
+	@Override
+	public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
+			throws CoreException, OperationCanceledException {
+
+		if (ejbJarXmlFile == null || ejbJarXmlFile.length() == 0) {
+			return RefactoringStatus.createErrorStatus("No ejb-jar.xml specified");
+		}
+
+		IFile file = project.getFile(ejbJarXmlFile);
+		if (! (file.exists())) {
+			return RefactoringStatus.createErrorStatus("Specified ejb-jar.xml does not exist");
+		}
+		
+		return new RefactoringStatus();
+	}
+
+	@Override
+	public Change createChange(IProgressMonitor pm) throws CoreException,
+			OperationCanceledException {
+		
+		IFile file = project.getFile(ejbJarXmlFile);
+		if (! (file.exists())) {
+			return null;
+		}
+
+		JavaProjectAnnotationFacade annotationFacade = new JavaProjectAnnotationFacade(project);
+		OpenEjbXmlConverter converter = new OpenEjbXmlConverter(annotationFacade);
+		converter.convert(new InputSource(file.getContents()));
+		
+		return annotationFacade.getChange();
+	}
+
+	@Override
+	public String getName() {
+		return "EJB 3.0 Annotation Migration Refactoring Wizard";
+	}
+
+	public String getEjbJarXmlFile() {
+		return ejbJarXmlFile;
+	}
+
+	public void setEjbJarXmlFile(String ejbJarXmlFile) {
+		this.ejbJarXmlFile = ejbJarXmlFile;
+	}
+
+	public String getOpenEjbJarXmlFile() {
+		return openEjbJarXmlFile;
+	}
+
+	public void setOpenEjbJarXmlFile(String openEjbJarXmlFile) {
+		this.openEjbJarXmlFile = openEjbJarXmlFile;
+	}
+
+	public IProject getProject() {
+		return project;
+	}
+
+	public void setProject(IProject project) {
+		this.project = project;
+	}
+
+	
+}

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationWizard.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationWizard.java?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationWizard.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationWizard.java Mon Oct 29 13:04:39 2007
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openejb.helper.annotation.wizards;
+
+import org.eclipse.ltk.core.refactoring.Refactoring;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+
+public class EJBMigrationWizard extends RefactoringWizard {
+	public EJBMigrationWizard(Refactoring refactoring, int flags) {
+		super(refactoring, flags);
+	}
+
+	protected EJBJarSelectionPage ejbJarSelectionPage;
+	
+	@Override
+	protected void addUserInputPages() {
+	}
+}
\ No newline at end of file

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/META-INF/MANIFEST.MF?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/META-INF/MANIFEST.MF (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/META-INF/MANIFEST.MF Mon Oct 29 13:04:39 2007
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.jst.server.generic.openejb;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.jst.server.core,
+ org.eclipse.jst.server.generic.core,
+ org.eclipse.jst.server.generic.ui,
+ org.eclipse.jst.server.ui,
+ org.eclipse.jst.common.project.facet.core,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.common.project.facet.ui

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/about.html
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/about.html?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/about.html (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/about.html Mon Oct 29 13:04:39 2007
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>September 06, 2007</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in 
+("Content"). Unless otherwise indicated below, the Content is provided to you 
+under the terms and conditions of the Eclipse Public License Version 1.0 
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. 
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from the Eclipse Foundation, the 
+Content is being redistributed by another party ("Redistributor") and different 
+terms and conditions may apply to your use of any object code in the Content. 
+Check the Redistributor’s license that was provided with the Content. If no such 
+license exists, contact the Redistributor. Unless otherwise indicated below, the 
+terms and conditions of the EPL still apply to any source code in the Content 
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/build.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/build.properties?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/build.properties (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/build.properties Mon Oct 29 13:04:39 2007
@@ -0,0 +1,16 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               plugin.properties,\
+               buildfiles/openejb.xml,\
+               about.html,\
+               build.properties
+src.includes = servers/openejb3.serverdef,\
+               plugin.xml,\
+               plugin.properties,\
+               buildfiles/openejb.xml,\
+               build.properties,\
+               about.html,\
+               META-INF/MANIFEST.MF

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/buildfiles/openejb.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/buildfiles/openejb.xml?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/buildfiles/openejb.xml (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/buildfiles/openejb.xml Mon Oct 29 13:04:39 2007
@@ -0,0 +1,17 @@
+<project name="deployextension"  default="deploy.j2ee.ejb"  basedir=".">
+	<target name="deploy.j2ee.ejb">
+		<jar destfile="${project.working.dir}/${module.name}.jar"> 
+			<zipfileset dir="${module.dir}">
+	        	<include name="**/*.*"/>
+	       		<exclude name="**/*.java"/>
+			</zipfileset>
+		</jar>
+  		<move file="${project.working.dir}/${module.name}.jar" todir="${server.publish.dir}"/>
+		
+	</target>
+	<target name="undeploy.j2ee.ejb">
+		<delete file="${server.publish.dir}/${module.name}.jar" failonerror="false"> </delete>
+		
+	</target>
+	
+</project>
\ No newline at end of file

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/maven-eclipse.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/maven-eclipse.xml?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/maven-eclipse.xml (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/maven-eclipse.xml Mon Oct 29 13:04:39 2007
@@ -0,0 +1,14 @@
+<project default="copy-resources">
+  <target name="init"/>
+  <target name="copy-resources" depends="init">
+    <copy todir="target/classes/META-INF" filtering="false">
+      <fileset dir="META-INF" includes="MANIFEST.MF"/>
+    </copy>
+    <copy todir="target/classes/buildfiles" filtering="false">
+      <fileset dir="buildfiles" includes="*"/>
+    </copy>
+    <copy todir="target/classes/servers" filtering="false">
+      <fileset dir="servers" includes="*"/>
+    </copy>
+  </target>
+</project>
\ No newline at end of file

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/plugin.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/plugin.properties?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/plugin.properties (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/plugin.properties Mon Oct 29 13:04:39 2007
@@ -0,0 +1,22 @@
+pluginName= OpenEJB Generic server definitions 
+providerName=openejb.apache.org
+pluginDescription=Provides OpenEJB server definitions 
+
+
+openejbCategory=Apache
+openejbRuntimeTypeName=OpenEJB 3.0.0
+openejbRuntimeTypeDescription=Publishes and runs EJB 3.0 modules on a local server.
+
+openejbServerTypeName=OpenEJB 3.0.0
+openejbServerTypeDescription=Publishes and runs EJB 3.0 modules on a local server.
+
+# ============== openejb3.serverdef  ================
+ApplicationServerDirectory=Application &Server Directory:
+serverAddress=A&ddress:
+serverPort=&Port:
+jndiPort=&JNDI Port:
+openejb3serverConfig=Server Co&nfiguration:
+serverclassPath=&Classpath Variable:
+serverName=Ser&ver Name:
+username=Use&r Name:
+password=Pass&word:

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/plugin.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/plugin.xml?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/plugin.xml (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/plugin.xml Mon Oct 29 13:04:39 2007
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+   <extension point="org.eclipse.wst.server.core.runtimeTypes">
+	    <runtimeType
+	       id="org.apache.openejb.server.generic.runtime.openejb3"
+	       name="%openejbRuntimeTypeName"
+	       description="%openejbRuntimeTypeDescription"
+	       vendor="%openejbCategory"
+	       version="3.0.0"
+	       class="org.eclipse.jst.server.generic.core.internal.GenericServerRuntime">
+	      <moduleType
+	         types="jst.ejb"
+	         versions="2.1, 3.0"/>
+	    </runtimeType>
+ 	</extension>
+
+	<extension point="org.eclipse.wst.server.core.serverTypes">
+	     <serverType
+	           runtime="true"
+	           class="org.eclipse.jst.server.generic.core.internal.GenericServer"
+	           id="org.apache.openejb.server.generic.openejb3"
+	           initialState="stopped"
+	           supportsRemoteHosts="false"
+	           runtimeTypeId="org.apache.openejb.server.generic.runtime.openejb3"
+	           description="%openejbRuntimeTypeDescription"
+	           launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
+	           behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
+	           name="%openejbServerTypeName"
+	           startTimeout="20000"
+		       stopTimeout="20000"
+	           hasConfiguration="false"
+	           launchModes="run">
+	          
+	     </serverType>
+	</extension>
+    <extension point="org.eclipse.wst.server.ui.wizardFragments">
+	     <fragment
+	        id="org.eclipse.jst.server.generic.runtime"
+	        typeIds="org.apache.openejb.server.generic.runtime.openejb3"
+	        class="org.eclipse.jst.server.generic.ui.internal.GenericServerRuntimeWizardFragment"/>           
+	     <fragment
+	        id="org.eclipse.jst.server.generic.server"
+	        typeIds="org.apache.openejb.server.generic.openejb3"
+	        class="org.eclipse.jst.server.generic.ui.internal.GenericServerWizardFragment"/>   
+	</extension>´
+	
+   <extension point="org.eclipse.jst.server.core.runtimeClasspathProviders">
+     <runtimeClasspathProvider
+        id="org.eclipse.jst.server.generic.runtimeTarget"
+        runtimeTypeIds="org.apache.openejb.server.generic.runtime.openejb*"
+        class="org.eclipse.jst.server.generic.core.internal.GenericServerRuntimeTargetHandler"/>
+	</extension>
+	
+   <extension point="org.eclipse.jst.server.generic.core.serverdefinition">
+		<serverdefinition id="org.apache.openejb.server.generic.runtime.openejb3" definitionfile="/servers/openejb3.serverdef">
+		</serverdefinition>
+   </extension>
+
+  <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+     <runtime-component-type
+       id="org.apache.openejb.server.generic.runtime.openejb"/>
+
+    <runtime-component-version
+       type="org.apache.openejb.server.generic.runtime.openejb"
+       version="3.0.0"/>
+    <adapter>
+      <runtime-component
+         id="org.apache.openejb.server.generic.runtime.openejb"/>
+      <factory
+         class="org.eclipse.jst.server.core.internal.RuntimeClasspathProvider$Factory"/>
+      <type
+         class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
+    </adapter>
+
+    <adapter>
+      <runtime-component id="org.apache.openejb.server.generic.runtime.openejb"/>
+      <factory class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"/>
+      <type class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
+    </adapter>
+    <supported>
+      <runtime-component
+         id="org.apache.openejb.server.generic.runtime.openejb"
+         version="3.0.0"/>
+       <facet
+         id="jst.ejb"
+         version="2.1, 3.0"/>
+
+    </supported>
+
+  </extension>
+
+
+  <extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
+    <runtimeFacetMapping
+      runtimeTypeId="org.apache.openejb.server.generic.runtime.openejb3"
+      runtime-component="org.apache.openejb.server.generic.runtime.openejb"
+      version="3.0.0"/>
+  </extension>
+</plugin>

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/pom.xml?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/pom.xml (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/pom.xml Mon Oct 29 13:04:39 2007
@@ -0,0 +1,75 @@
+<!--
+	~ Licensed to the Apache Software Foundation (ASF) under one or more
+	~ contributor license agreements.  See the NOTICE file distributed with
+	~ this work for additional information regarding copyright ownership.
+	~ The ASF licenses this file to You under the Apache License, Version 2.0
+	~ (the "License"); you may not use this file except in compliance with
+	~ the License.  You may obtain a copy of the License at
+	~
+	~    http://www.apache.org/licenses/LICENSE-2.0
+	~
+	~ Unless required by applicable law or agreed to in writing, software
+	~ distributed under the License is distributed on an "AS IS" BASIS,
+	~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	~ See the License for the specific language governing permissions and
+	~ limitations under the License.
+-->
+<!-- $Rev: 577554 $ $Date: 2007-09-20 06:35:12 +0100 (Thu, 20 Sep 2007) $ -->
+<project>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.openejb</groupId>
+	<artifactId>org.eclipse.jst.server.generic.openejb</artifactId>
+	<version>1.0.0</version>
+	<packaging>jar</packaging>
+	<name>${artifactId}</name>
+	<parent>
+		<groupId>org.apache.openejb</groupId>
+		<artifactId>eclipse-plugins-parent</artifactId>
+		<version>1.0.0</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+	<build>
+		<resources>
+			<resource>
+				<directory>.</directory>
+				<includes>
+					<include>plugin.xml</include>
+					<include>plugin.properties</include>
+				</includes>
+			</resource>
+			<resource>
+				<targetPath>META-INF</targetPath>
+				<directory>META-INF</directory>
+				<includes>
+					<include>MANIFEST.MF</include>
+				</includes>
+			</resource>
+			<resource>
+				<directory>buildfiles</directory>
+				<targetPath>buildfiles</targetPath>
+				<includes>
+					<include>*</include>
+				</includes>
+			</resource>
+			<resource>
+				<directory>servers</directory>
+				<targetPath>servers</targetPath>
+				<includes>
+					<include>*</include>
+				</includes>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.geronimo.devtools</groupId>
+				<artifactId>maven-eclipsepde-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<artifactId>maven-jar-plugin</artifactId>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/servers/openejb3.serverdef
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/servers/openejb3.serverdef?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/servers/openejb3.serverdef (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.eclipse.jst.server.generic.openejb/servers/openejb3.serverdef Mon Oct 29 13:04:39 2007
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:ServerRuntime
+	xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
+	name="OpenEJB" version="3.0.0">
+<property id="serverRootDirectory"
+	label="%ApplicationServerDirectory"
+	type="directory"
+	context="runtime"
+	default="/your_server_root" />
+<property id="serverAddress"
+	label="%serverAddress"
+	type="string"
+	context="server"
+	default="127.0.0.1" />
+<property id="port"
+	label="%serverPort"
+	type="string"
+	context="server"
+	default="4201" />
+
+
+	<port>
+		<no>${port}</no>
+		<name>ejbd</name>
+		<protocol>ejbd</protocol>
+	</port>
+
+	<module>
+		<type>jst.ejb</type>
+		<publishDir>${serverRootDirectory}/apps</publishDir>
+		<publisherReference>org.eclipse.jst.server.generic.antpublisher</publisherReference>
+	</module>
+
+
+	<project>
+		<classpathReference>openejb.project</classpathReference>
+	</project>
+	
+	<start>
+		<mainClass>org.apache.openejb.cli.Bootstrap</mainClass>
+		<workingDirectory>${serverRootDirectory}</workingDirectory>
+		<programArguments>start</programArguments>
+		<vmParameters>-Dopenejb.home=${serverRootDirectory} -javaagent:${serverRootDirectory}/lib/openejb-javaagent-3.0.0-SNAPSHOT.jar  </vmParameters>
+		<classpathReference>openejb</classpathReference>
+	</start>
+
+	<stop>
+		<mainClass>org.apache.openejb.cli.Bootstrap</mainClass>
+		<workingDirectory>${serverRootDirectory}</workingDirectory>
+		<programArguments>stop</programArguments>
+		<vmParameters>-Dopenejb.home=${serverRootDirectory} -javaagent:${serverRootDirectory}/lib/openejb-javaagent-3.0.0-SNAPSHOT.jar </vmParameters>
+		<classpathReference>openejb</classpathReference>
+	</stop>
+	<publisher id="org.eclipse.jst.server.generic.antpublisher">
+		<publisherdata>
+			<dataname>build.file</dataname>
+			<datavalue>/buildfiles/openejb.xml</datavalue>
+		</publisherdata>
+		<publisherdata>
+			<dataname>target.publish.jst.ejb</dataname>
+			<datavalue>deploy.j2ee.ejb</datavalue>
+		</publisherdata>
+		<publisherdata>
+			<dataname>target.unpublish.jst.ejb</dataname>
+			<datavalue>undeploy.j2ee.ejb</datavalue>
+		</publisherdata>		
+	</publisher>
+
+	<classpath id="openejb" >
+		<archive path="${serverRootDirectory}/lib/openejb-core-3.0.0-SNAPSHOT.jar" />
+		<archive path="${serverRootDirectory}/lib/openejb-javaagent-3.0.0-SNAPSHOT.jar" />
+		<archive path="${serverRootDirectory}/lib/geronimo-ejb_3.0_spec-1.0.jar" />
+	</classpath>
+	<classpath id="openejb.project" >
+		<archive path="${serverRootDirectory}/lib/geronimo-ejb_3.0_spec-1.0.jar" />
+	</classpath>
+
+</tns:ServerRuntime>
\ No newline at end of file

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/pom.xml?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/pom.xml (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/pom.xml Mon Oct 29 13:04:39 2007
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!-- $Rev: 577554 $ $Date: 2007-09-20 06:35:12 +0100 (Thu, 20 Sep 2007) $ -->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.openejb</groupId>
+    <artifactId>eclipse-plugins-parent</artifactId>
+    <packaging>pom</packaging>
+    <name>${artifactId}</name>
+    <parent>
+        <groupId>org.apache.openejb</groupId>
+        <artifactId>eclipse-plugins</artifactId>
+        <version>1.0.0</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-clean-plugin</artifactId>
+                <inherited>false</inherited>
+                <configuration>
+                    <filesets>
+                        <fileset>
+                            <directory>.</directory>
+                            <includes>
+                                <include>.metadata</include>
+                            </includes>
+                        </fileset>
+                    </filesets>
+                </configuration>
+            </plugin>
+        </plugins>
+        <pluginManagement>
+            <plugins>
+		<plugin>
+			<groupId>org.apache.maven.plugins</groupId>
+			<artifactId>maven-eclipse-plugin</artifactId>
+			<configuration>
+				<additionalProjectnatures>
+					<projectnature>org.eclipse.pde.PluginNature</projectnature>
+				</additionalProjectnatures>
+				<classpathContainers>
+					<classpathContainer>org.eclipse.pde.core.requiredPlugins</classpathContainer>
+					<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
+				</classpathContainers>
+			</configuration>
+		</plugin>
+                <plugin>
+                    <groupId>org.apache.geronimo.devtools</groupId>
+                    <artifactId>maven-eclipsepde-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>initialize</id>
+                            <phase>validate</phase>
+                            <goals>
+                                <goal>manifestbundles</goal>
+                                <goal>install</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>validate-bundle-classpath</id>
+                            <phase>process-resources</phase>
+                            <goals>
+                                <goal>validatemanifest</goal>
+                            </goals>
+                            <configuration>
+                                <classpathEntriesDir>lib</classpathEntriesDir>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <configuration>
+                        <archive>
+                            <manifestFile>${basedir}/META-INF/MANIFEST.MF</manifestFile>
+                        </archive>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <executions>
+                        <!-- workaround for bugzilla 147936 -->
+                        <execution>
+                            <id>backup</id>
+                            <phase>process-sources</phase>
+                            <configuration>
+                                <tasks>
+                                    <copy file="${basedir}/.classpath" todir="${project.build.directory}" overwrite="false" failonerror="false"/>
+                                    <copy file="${basedir}/.project" todir="${project.build.directory}" overwrite="false" failonerror="false"/>
+                                </tasks>
+                            </configuration>
+                            <goals>
+                                <goal>run</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>restore</id>
+                            <phase>compile</phase>
+                            <configuration>
+                                <tasks>
+                                    <copy file="${project.build.directory}/.classpath" todir="${basedir}" overwrite="true" failonerror="false"/>
+                                    <copy file="${project.build.directory}/.project" todir="${basedir}" overwrite="true" failonerror="false"/>
+                                </tasks>
+                            </configuration>
+                            <goals>
+                                <goal>run</goal>
+                            </goals>
+                        </execution>
+                        <!-- /workaround -->
+                    </executions>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-clean-plugin</artifactId>
+                    <configuration>
+                        <filesets>
+                            <fileset>
+                                <directory>.</directory>
+                                <includes>
+                                    <include>lib</include>
+                                </includes>
+                            </fileset>
+                        </filesets>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+    <modules>
+        <module>org.apache.openejb.helper.annotation</module>
+	<module>org.eclipse.jst.server.generic.openejb</module>
+    </modules>
+</project>

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/pom.xml?rev=589832&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/pom.xml (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/pom.xml Mon Oct 29 13:04:39 2007
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!-- $Rev: 577554 $ $Date: 2007-09-20 06:35:12 +0100 (Thu, 20 Sep 2007) $ -->
+<project>
+                        
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.openejb</groupId>
+    <artifactId>eclipse-plugins</artifactId>
+    <packaging>pom</packaging>
+    <name>${artifactId}</name>
+    <version>1.0.0</version>
+                        
+    <description>Eclipse Plugins for OpenEJB</description>
+                        
+    <organization>
+        <name>OpenEJB</name>
+        <url>http://openejb.apache.org/</url>
+    </organization>
+                        
+    <properties>
+        <eclipseInstall>${settings.localRepository}/eclipse</eclipseInstall>
+    </properties>
+                        
+    <build>
+        <defaultGoal>install</defaultGoal>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <dependencies>
+                        <dependency>
+                            <groupId>oro</groupId>
+                            <artifactId>oro</artifactId>
+                            <version>2.0.8</version>
+                        </dependency>
+                        <dependency>
+                            <groupId>ant</groupId>
+                            <artifactId>ant-apache-oro</artifactId>
+                            <version>1.6.4</version>
+                        </dependency>
+                        <dependency>
+                            <groupId>ant</groupId>
+                            <artifactId>ant-optional</artifactId>
+                            <version>1.5.3-1</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.geronimo.devtools</groupId>
+                    <artifactId>maven-eclipsepde-plugin</artifactId>
+                    <version>1.0-SNAPSHOT</version>
+                    <configuration>
+                        <eclipseHome>${settings.localRepository}/eclipse/eclipse/</eclipseHome>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+		    <debug>true</debug>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+                        
+    <repositories>
+        <repository>
+            <id>apache-snapshots</id>
+            <name>Apache Snapshots Repository</name>
+            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </snapshots>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+        <repository>
+            <id>apache.incubator</id>
+            <name>Apache Incubator Repository</name>
+            <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>false</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </snapshots>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+        <repository>
+            <id>codehaus-snapshots</id>
+            <name>Codehaus Snapshots Repository</name>
+            <url>http://snapshots.repository.codehaus.org</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>daily</updatePolicy>
+                <checksumPolicy>ignore</checksumPolicy>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
+    </repositories>
+                        
+    <pluginRepositories>
+        <pluginRepository>
+            <id>apache.org</id>
+            <name>Maven Plugin Snapshots</name>
+            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </pluginRepository>
+        <pluginRepository>
+            <id>tlc</id>
+            <name>TLC Repository</name>
+            <url>http://commons.ucalgary.ca/pub/m2</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+                        
+    <profiles>
+        <profile>
+            <id>windows</id>
+            <activation>
+                <os>
+                    <family>windows</family>
+                </os>
+            </activation>
+            <properties>
+                <eclipsePlatformFamily>win32</eclipsePlatformFamily>
+            </properties>
+        </profile>
+        <profile>
+            <id>unix</id>
+            <activation>
+                <os>
+                    <family>unix</family>
+                </os>
+            </activation>
+            <properties>
+                <eclipsePlatformFamily>linux</eclipsePlatformFamily>
+            </properties>
+        </profile>
+        <profile>
+            <id>mac</id>
+            <activation>
+                <os>
+                    <family>mac</family>
+                </os>
+            </activation>
+            <properties>
+                <eclipsePlatformFamily>macos</eclipsePlatformFamily>
+            </properties>
+        </profile>
+    </profiles>
+                        
+    <modules>
+        <module>eclipse</module>
+        <module>plugins</module>
+	<module>features</module>
+	<module>assembly</module>
+    </modules>
+                        
+</project>