Compilar Alfresco en Eclipse (SOLUCIONADO)

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Compilar Alfresco en Eclipse (SOLUCIONADO)

Que tal,

Estoy intentando compilar Alfresco desde el codigo fuente de los repositorios de SVN, para realizarlo he seguido las instrucciones de la WIKI de Alfresco, todo iba bien hasta que me encontre con un detalle en el codigo…

Clase: ADMLuceneTest.java
Linea: linea 498
Carpeta: Repository/source/java/org/alfresco/repo/search/impl/lucene

mlText.addValue(Locale.CHINESE, new String(new char[] { (char) ('香' + orderTextCount) }) + " 香蕉");

En este trozo de codigo es donde me indica que hay caracteres invalidos: '香'

El error que me muestra en el eclipse es el siguiente: Invalid character constant

He intentado solucionarlo modificando la codificacion del editor en eclipse a UTF-8 y me sigue lanzando el mismo error…

Tambien tengo el siguiente error: Project 'Extension Samples' is missing required source folder: 'source/java'

En el paquete o proyecto: Extension Samples

Esto me indica que: The project cannot be built until build path errors are resolved

He borrado la referencia al source/java, eso me soluciona el problema pero no se si sea lo correcto.
3 Replies
Highlighted
Member II

Re: Compilar Alfresco en Eclipse (SOLUCIONADO)

Hola nuevamente, me autorespondo…

El problema con el error: Invalid character constant lo solucione colocando otro caracter.
El problema con el error: Project 'Extension Samples' is missing required source folder: 'source/java' lo solucione quitando la referencia a esta carpeta en las propiedades del proyecto desde el eclipse.

En realidad no se si son las soluciones optimas pero los errores han desaparecido.


Ahora bien en el momento de compilar el codigo para ello basicamente hago lo siguiente Tomado de la wiki de alfresco de un foro:

Create Ant project
1.Select New > Project in the Eclipse toolbar. Under "General" choose "Project".
2.Right-click the project and choose New > File
3.When the new file dialog box appears click the Advanced button and select "Link to file in the file system".
4.Browse to the build.xml file located in the HEAD\root directory.

Compile and deploy Alfresco
Right click build.xml and choose Run As > Ant Build
Highlighted
Member II

Re: Compilar Alfresco en Eclipse (SOLUCIONADO)

Al momento de compilar la consola de eclipse me lanza el siguiente error:

Buildfile: C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\build.xml
init:
     [echo] user.home = C:\Users\XXX
clean-core:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\core\build\classes
clean-jlan:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\alfresco-jlan\build\classes
clean-mbeans:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\mbeans\build\classes
clean-deployment:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\deployment\build\classes
clean-repository:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\repository\build\classes
clean-wdrdeployment:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\wdr-deployment\build\classes
clean-remoteapi:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\remote-api\build\classes
clean-jndi:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\jndi-client\build\classes
clean-catalinavirtual:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\catalina-virtual\build\classes
clean-linkvalidation:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\link-validation\build\classes
clean-webframeworkcommons:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\web-framework-commons\build\classes
clean-webclient:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\web-client\build\classes
clean-webclient-projects:
clean-slingshot:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\slingshot\build\classes
clean-slingshot-projects:
clean-mobile:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\mobile\build\classes
clean-mobile-projects:
clean-webeditor-plugin:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\web-editor-plugin\build\classes
clean-webeditor:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\web-editor\build\classes
clean-webeditor-customersite-sample:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\web-editor-samples\customer-site\build\classes
clean-webeditor-projects:
clean-webserviceclient:
   [delete] Deleting directory C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\web-service-client\build\classes
clean-projects:
clean-avmcompare:
clean-blog:
clean-fb-doclib:
clean-mediawiki:
clean-php:
clean-rm:
clean-sharepoint:
clean-truncatemalformedxml:
clean-dod5015:
clean-dod5015-share:
clean-quickr:
clean-modules:
clean-webclient-tomcat-deploy:
clean-application-tomcat-deploy:
clean-virtual-tomcat-deploy:
clean-tomcat-deployments:
clean:
compile-core:
    [mkdir] Created dir: C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\core\build\classes
    [javac] Compiling 87 source files to C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects\core\build\classes

BUILD FAILED
C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects.xml:25: The following error occurred while executing this line:
C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\macros.xml:27: Error running javac.exe compiler

Total time: 4 minutes 6 seconds

BUILD FAILED
C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\projects.xml:25: The following error occurred while executing this line:
C:\workspace\ALFRESCO_SVN\alfresco\HEAD\root\macros.xml:27: Error running javac.exe compiler
Highlighted
Member II

Re: Compilar Alfresco en Eclipse (SOLUCIONADO)

Al parecer no es suficiente con tener configurada la variable de entorno JAVA_HOME, fue necesario agregar a la variable de entorno PATH la ruta donde se encuentra javac.

Encontre la solucion aqui: http://forums.alfresco.com/en/viewtopic.php?f=10&t=16292