Skip to content
Snippets Groups Projects
Commit 3f6dc678 authored by Carlos Eduardo da Silva's avatar Carlos Eduardo da Silva
Browse files

Atualizando projeto para maven e com as últimas versões das APIS.

parent 72914fc1
No related branches found
No related tags found
No related merge requests found
Showing
with 174 additions and 48 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="ejbModule"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4">
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/WildFly 10.x Runtime">
<classpathentry including="**/*.java" kind="src" output="target/classes" path="ejbModule">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/WildFly 12.0 Runtime">
<attributes>
<attribute name="owner.project.facets" value="jst.ejb"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.8.0-openjdk-1.8.0.121-1.b14.fc24.x86_64">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 8 [1.8.0_162]">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="build/classes"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
/build/
/target/
......@@ -30,8 +30,20 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.fusesource.ide.project.RiderProjectBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.fusesource.ide.project.RiderProjectNature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
......
......@@ -4,4 +4,5 @@ org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="Calculator-Bean">
<wb-resource deploy-path="/" source-path="/ejbModule" tag="defaultRootSource"/>
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/ejbModule"/>
<property name="java-output-path" value="/Calculator-Bean/build/classes"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="WildFly 10.x Runtime"/>
<runtime name="WildFly 12.0 Runtime"/>
<fixed facet="jst.ejb"/>
<fixed facet="java"/>
<installed facet="java" version="1.8"/>
......
disabled=06target
eclipse.preferences.version=1
/**
*
*/
package br.ufrn.imd.imd0409.calculator.bean;
/**
* @author kaduardo
*
*/
public interface CalculatorLocalBusiness extends CalculatorCommonBusiness {
}
/**
*
*/
package br.ufrn.imd.imd0409.calculator.bean;
/**
* @author kaduardo
*
*/
public interface CalculatorRemoteBusiness extends CalculatorCommonBusiness {
}
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.ufrn.imd.web2</groupId>
<artifactId>Calculator-Bean</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>ejb</packaging>
<build>
<sourceDirectory>ejbModule</sourceDirectory>
<resources>
<resource>
<directory>ejbModule</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.5</version>
<configuration>
<ejbVersion>3.2</ejbVersion>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>javax.ejb-api</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
/**
*
*/
package br.ufrn.imd.imd0409.calculator.bean;
package br.ufrn.imd.web2.calculator.bean;
/**
* @author kaduardo
*
*/
public interface CalculatorCommonBusiness {
public interface Calculator {
public int add(int... arguments);
}
/**
*
*/
package br.ufrn.imd.imd0409.calculator.bean;
package br.ufrn.imd.web2.calculator.bean;
/**
* @author kaduardo
*
*/
public class CalculatorBeanBase implements CalculatorCommonBusiness {
public class CalculatorBeanBase implements Calculator {
/**
*
*/
public CalculatorBeanBase() {
// TODO Auto-generated constructor stub
}
/* (non-Javadoc)
......
/**
*
*/
package br.ufrn.imd.web2.calculator.bean;
/**
* @author kaduardo
*
*/
public interface CalculatorLocal extends Calculator {
}
/**
*
*/
package br.ufrn.imd.web2.calculator.bean;
/**
* @author kaduardo
*
*/
public interface CalculatorRemote extends Calculator {
}
package br.ufrn.imd.imd0409.calculator.bean;
package br.ufrn.imd.web2.calculator.bean;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
......
package br.ufrn.imd.imd0409.calculator.test;
package br.ufrn.imd.web2.calculator.bean;
import static org.junit.Assert.*;
import org.junit.Test;
import br.ufrn.imd.imd0409.calculator.bean.CalculatorCommonBusiness;
import br.ufrn.imd.imd0409.calculator.bean.NoInterfaceViewCalculatorBean;
import br.ufrn.imd.web2.calculator.bean.Calculator;
import br.ufrn.imd.web2.calculator.bean.NoInterfaceViewCalculatorBean;
public class CalculatorUnitTestCase {
@Test
public void testAdd() {
final CalculatorCommonBusiness calc = new NoInterfaceViewCalculatorBean();
final Calculator calc = new NoInterfaceViewCalculatorBean();
final int expectedSum = 2 + 3 + 5;
final int actualSum = calc.add(2, 3, 5);
......
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="JavaSource"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/WildFly 10.x Runtime">
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="owner.project.facets" value="jst.web;jst.jsf"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.8.0-openjdk-1.8.0.121-1.b14.fc24.x86_64">
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
/target/
......@@ -25,13 +25,30 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.jboss.tools.ws.jaxrs.metamodelBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.fusesource.ide.project.RiderProjectBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.fusesource.ide.project.RiderProjectNature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
......@@ -39,5 +56,6 @@
<nature>org.jboss.tools.jsf.jsfnature</nature>
<nature>org.jboss.tools.jst.web.kb.kbnature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.jboss.tools.ws.jaxrs.nature</nature>
</natures>
</projectDescription>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment