34. Using Cl@ve (II). Using Eclipse
0. Introduction
Any mention to "ximo", should be replaced by an existing user name
Make sure you have followed all the required steps in the previous post
1. Rename the folder
1. Create a folder (for storing the Eclipse workspace):
/home/ximo/WORKSPACES/WS_CLAVE20
2. Copy the folder
/home/ximo/CLAVE20/Curso Tecnico Cl-ve 2/kit/Paquete de Integracion Java 8 2-0-2/Paquete_Integracion_Java_Clave_2_0
into
/home/ximo/WORKSPACES/WS_CLAVE20
3. Go to the /home/ximo/WORKSPACES/WS_CLAVE20 and rename the folder name
Paquete_Integracion_Java_Clave_2_0
to
SP
2. Open Eclipse and select a jdk 1.8.xx
1. Download a jdk 1.8. xx(you can use adopt) (for instance in the folder /home/ximo/MyPrograms)
2. Uncompress the file
3. In Eclipse select this jdk
Window-> Preferences -> Java -> Installed JREs
and select the folder where the JDK is
Apply and Close
3. Import the project to the Workspace
1. Switch to the workspace /home/ximo/WORKSPACES/WS_CLAVE20
File -> Switch workspace
and select thr folder /home/ximo/WORKSPACES/WS_CLAVE20
2. Import the project (the renamed folder SP)
File -> Import ->Maven -> Existing Maven Project
and select the SP folder
4. Edit the pom.xml file and compile
1. Edit the section <repositories> and vomment the line
<url>file://Dependencias</url>
and add this one:
<url>file:///home/xim/WORKSPACES/WS_CLAVE20/SP/Dependencias</url>
like this:
<repositories> <repository> <id>repoDependencias</id> <name>repoDependencias</name> <!-- <url>file://Dependencias</url> --> <url>file:///home/ximo/WORKSPACES/WS_CLAVE20/SP/Dependencias</url> </repository> </repositories>
2. Compile and create the war file.
Right-click on the project:
Maven -> Update Project
Now the errors should disappear.
Right-Click on the project
Run As -> Maven build ... and type package in the "Goals" textbox
And these messages should appear:[INFO] Scanning for projects... [WARNING] Failed to build parent project for es.clave:SP2:war:1.4.3-clave [INFO] [INFO] ----------------------------< es.clave:SP2 >---------------------------- [INFO] Building Clave SP 1.4.3-clave [INFO] --------------------------------[ war ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ SP2 --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ SP2 --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ SP2 --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /home/ximo/WORKSPACES/WS_CLAVE20/SP/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ SP2 --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ SP2 --- [INFO] [INFO] --- maven-war-plugin:2.0.2:war (default-war) @ SP2 --- [INFO] Exploding webapp... [INFO] Assembling webapp SP2 in /home/ximo/WORKSPACES/WS_CLAVE20/SP/target/SP2 [INFO] Copy webapp webResources to /home/ximo/WORKSPACES/WS_CLAVE20/SP/target/SP2 [INFO] Copy webapp webResources to /home/ximo/WORKSPACES/WS_CLAVE20/SP/target/SP2 [INFO] Generating war /home/ximo/WORKSPACES/WS_CLAVE20/SP/target/SP2.war [INFO] Building war: /home/ximo/WORKSPACES/WS_CLAVE20/SP/target/SP2.war [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.124 s [INFO] Finished at: 2022-01-17T16:51:26+01:00 [INFO] ------------------------------------------------------------------------
And the file SP2.war is created in the target folder
Comentarios
Publicar un comentario