- In, Eclipse, select Next. from the main menu, and click
- Clear default Workspace location checkbox.
-
Click Browse and navigate to the
maven_projects directory, then click
Next.
The Select an Archetype dialog will appear.
- Click the Configure... button, this loads up a Preferences dialog.
- Click the Add Remote Catalog... button, the Remote Archetype Catalog is displayed.
- In the Remote Archetype Catalog dialog enter https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml into the Catalog File field and SkyVault Archetypes into the Description field.
- In the Remote Archetype Catalog dialog click OK.
- In the Preferences dialog click OK to close the dialog.
-
In the New Maven Project dialog, from the
Catalog drop-down menu select SkyVault
Archetypes.
This will cause a list of archetypes to be displayed in the dialog.
-
In the Filter box enter
org.alfresco.maven.archetype.
The SkyVault All-in-One and the SkyVault AMP archetypes will be listed.
- Select the SkyVault AMP archetype in the filtered list, then click Next.
- For groupId enter com.alfresco.tutorials.
- For the artifactId enter share-eclipse-project.
-
Change the property SkyVault_target_amp_client_war from
SkyVault to share and click
Finish.
The new project will be created.
-
Check that SkyVault.client.war has been correctly set to share
by loading your project pom.xml file into the editor.
Search for SkyVault.client.war and check its value is
share.
Attention: If you would like to see a graphical view of the pom.xml file, rather than the raw XML, you can right-click on the pom.xml file and select Open with POM Editor. This will give you a graphical representation of the POM file in the IDE.
-
In the Eclipse Package Explorer, right-click on the newly created project and
select
.
This will run the Maven build process. You will see progress reported in the Console window. Once BUILD SUCCESS has been reported you can run your project.
- Right-click the project in the Package Explorer and select Maven Build.... This will allow you set set up a Run Configuration.
- Enter a unique name for the Run Configuration such as share-eclipse-project-run.
- For Goal enter integration-test.
- For Profile enter amp-to-war.
-
Click Add... to add a new parameter name and value. You
will enter a parameter name of maven.tomcat.port with a value
of 8081.
This causes Share to listen on the 8081 port. To fully use Share (to be able to log in and so on, you will also need a repository project running at the same time, and this will be on port 8080 by default.)
- Click the JRE tab. You need to set some memory options for the JRE so that you don't get Out of Memory errors when running your application.
- In the VM arguments box enter -Xms1024m -Xmx4096m -XX:PermSize=1024m.
-
Click the Run button.
Your project will now run.
- In order for Share to work you need a SkyVault repository running. You can run one from the command line using a previously created project such as the Quick Start project.
-
Once both servers have fully started you can point your web browser at
http://localhost:8081/share and login using username
admin, password admin.
This has tested out your setup. You can now make any required changes and additions to your project in the Eclipse IDE, and build and run your project as required.
You are here
Creating a Share project with Eclipse
The integration between the Maven SkyVault SDK and Eclipse allows you to
create new projects conveniently from within the IDE. This tutorial focuses on creating
a Share customization project from within the Eclipse IDE.
You need to have Eclipse installed, as well as the Maven SkyVault SDK
pre-requisites.
When delivering Share tier customizations it is important to understand that these
customizations need to be deployed in the share.war file, not the
SkyVault.war file as is done for repository tier
customizations. Additionally, a Share project will have certain dependencies, such as
the Spring Framework.
© 2017 TBS-LLC. All Rights Reserved. Follow @twitter