Search code examples
javaalfrescoadd-on

Alfresco-Addon Java


I want to develop a ticket-system Add-On for Alfresco,

I am new into Alfresco so I have some troubles getting started

I have downloaded maven and set the path var Also for java and javac

And now I installed an simple Maven projects with the command

mvn archetype:generate -Dfilter=org.alfresco:

everything installed fine. Then I tried used the command

mvn install

but there I get the error:

[INFO] Compiling 3 source files to E:\HTL\Alfresco\maven_projects\quick- 
start-project\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.473 s
[INFO] Finished at: 2018-04-17T15:58:33+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5:compile (default-compile) on project quick-start-project: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

I also tried to run the run.bat file in my folder, but it closed after some time with an error!

Can anyone help me and has some tips for getting started in developing for Alfresco?


Solution

  • please try this

    On your Eclipse IDE, go into Window > Preferences > Java > Installed JREs > and check your installed JREs.

    You should have an entry with a JDK there. Select the Execution Env as show below. Click OK

    Then Right-Click on your Project -> Maven -> Update Project

    and select jdk

    refer this community link may help you