[Tutorial] Install Alfresco into Eclipse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2008 07:23 PM
I wrote a document about setup Alfresco into Eclipse and run it. It is more detailed than what I found on Alfresco website
and maybe it can help. Don't hesitate to help me improve this document.
STEP by STEP TUTORIAL TO SET UP ALFRESCO IN ECLIPSE
+ BUILD AND LAUNCH ALFRESCO
PART 1 : SET UP ALFRESCO IN ECLIPSE
I) Install the plugin Subclipse in Eclipse
Help > Software Updates > Find and Install …
select “Search for new features to install”
select “New Remote Site”
Name : Subclipse
URL : http://subclipse.tigris.org/update_1.4.x
follow until install Subclipse
II) Get Alfresco from SVN
create a directory called ALFRESCO_SVN into the directory workspaces of Eclipse
open Eclipse by selecting ALFRESCO_SVN as workspace directory
click : File > New > Project > SVN > Checkout Projects from SVN
choose “Create a new repository location” and use this URL : svn://svn.alfresco.com
Select the alfresco folder and click Next
Choose : “Check out as a project in the workspace” and click finish
III) Setup Eclipse
create a directory called ALFRESCO into the directory workspaces of Eclipse and switch Eclipse to this directory
Select : File > Import > General > Existing Projects into Workspace
In the dialog box select “Select Root Directory” and choose the directory “/workspace/ALFRESCO/alfresco/HEAD/root/projects”
Select all the projects except the ones starting with SDK (you don't need them to build Alfresco). Verify “Copy projects into workspace” is unchecked
Click Finish
When the import is finished build the workspace (note : after the compilation I had 42 errors, they didn't avoid the building of alfresco for me).
PART 2 : BUILD AND LAUNCH ALFRESCO
1) Install TOMCAT 5.5.x ( and not TOMCAT 6.x )
catalina.sh has to be modified to avoid Out of Memory exceptions.
Modify the line :
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
by the line :
JAVA_OPTS="$JAVA_OPTS -Xms256m -Xmx1024m -XX:MaxPermSize=256m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
2) Install ImageMagick
It is necessary if you are using Linux. I don't know for Windows. I use Ubuntu and ImageMagick is present in the repositories.
3) Setup Mysql
Launch Mysql.
Create a database called “alfresco” (using PhpMyAdmin for example) and in a SQL editor execute :
grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
4) Add a missing jar
Copy rt.jar (you can find it in jdk1.6.0_06/jre/lib) into workspace/ALFRESCO_SVN/alfresco/HEAD/root/projects/3rd-party/lib
5) Setup Ant into Eclipse
Note : it's a copy and paste from Alfresco website
You can run the Ant targets mentioned above from within Eclipse. Firstly, you need to complete the following setup:
Create a new Simple Project (not a Java Project). I call mine Ant.
1.Right click on the Ant project and select New > File.
2.Click the Advanced button.
3.Select the option Link to file in the filesystem.
4.Browse for the build.xml file. If you expanded to c:\alfresco you need to browse to c:\alfresco\common, select build.xml and click the Open button.
5.Enter build.xml in the File name field.
6.Click Finish.
You should now see a link to build.xml in your Ant project. Double-click the file to see the contents. Eclipse also has several options to allow you to run targets in the file.
One way is to use the Outline window as it shows you all the targets in the project. Find the target you want to run and right click. Choose Run As > Ant build.
If you get errors because the environment variables, like TOMCAT_HOME, are not defined, then you can define them via Window > Preferences > Ant > Runtime > Properties and add env.TOMCAT_HOME
5) Compile and deploy Alfresco
Right click build.xml and choose Run As > Ant Build
6) Access Alfresco
launch tomcat
access Alfresco at http://localhost:8080/alfresco
user : admin, password : admin
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 05:09 AM
http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 06:17 AM
Modify the line :
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
by the line :
JAVA_OPTS="$JAVA_OPTS -Xms256m -Xmx1024m -XX:MaxPermSize=256m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
i cant seem to find catalina.sh in my tomcat folder. can someone please tell me where to locate it? thanks you very much for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 06:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2012 10:34 AM
4.Browse for the build.xml file. If you expanded to c:\alfresco you need to browse to c:\alfresco\common, select build.xml and click the Open button.
i cant seem to find the "common" folder in my alfresco directory. where can i find my "build.xml"?
i am using alfresco 3.2
thank you for all your responses

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2012 09:50 PM
Description Resource Path Location TypeProject 'Extension Samples' is missing required source folder: 'source/java' Extension Samples Build path Build Path Problem
how to resolve this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2012 06:58 AM
Thanks,
Joanna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2012 05:13 AM
While configuring the svn ie ,Create a new repository location” and use this URL : svn://svn.alfresco.com
Select the alfresco folder and click Next then
i am getting the error like this "The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for.
svn: Unknown hostname 'svn.alfresco.com'"
Please provide me any solution.
Thanks
Himansu

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2012 11:45 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2013 02:25 AM
I have checked out alfresco projects into my local directory. Now I am getting following errors on build.
I am using jdk 1.6 as given in developing guide, but Java 7 is required to build.
If I am not wrong then wanna suggest to all of you use Java 7 to access Alfresco.
Buildfile: C:\Repo\alfresco\HEAD\root\build.xml
BUILD FAILED
C:\Repo\alfresco\HEAD\root\build.xml:24: Java 7 is required to build. 1.6.0_39 detected
Total time: 249 milliseconds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2013 03:41 AM
Current community requires Java 7 to build. So make your, you java 7 installed and it is available for compilation.
http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/build.xml
