Code Monkey home page Code Monkey logo

alfresco-developer-series's Introduction

Alfresco Developer Series Tutorials

Source code from the ecmarchitect.com Alfresco Developer Series tutorials.

These tutorials are written for Alfresco 7.x, both Community and Enterprise Editions. They leverage Alfresco SDK 4.2. That version of the SDK will not work with older versions of Alfresco. If you want to go through these tutorials using an older version of Alfresco and the SDK, switch to an older tag.

The tutorials build upon each other. The recommended order of progression is:

Repository Structure

The repository contains a folder for each tutorial. Within that, there is a tutorial directory that contains the actual tutorial text and images as well as one or more project folders that contain source code that goes along with the tutorial.

The projects roughly build on each other. So, for example, if you want to work through the Actions tutorial, you'll need to understand the content tutorial and you will need to check out the content tutorial source code and build it locally so that the actions project can pull in the content project as a dependency.

Each tutorial contains specifics on which earlier tutorials it needs as dependencies.

alfresco-developer-series's People

Contributors

dependabot[bot] avatar jpotts avatar juliomaqueda avatar markusf1 avatar sguberom avatar spino233 avatar trehak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfresco-developer-series's Issues

All projects with problems on Eclipse

There a problem with all these tutorial projects when I import for the Eclipse, ocurring the following issue:

Failure to transfer org.alfresco:alfresco-repository:jar:5.2.e from https://artifacts.alfresco.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of alfresco-public has elapsed or updates are forced. Original error: Could not transfer artifact org.alfresco:alfresco-repository:jar:5.2.e from/to alfresco-public (https://artifacts.alfresco.com/nexus/content/groups/public): GET request of: org/alfresco/alfresco-repository/5.2.e/alfresco-repository-5.2.e.jar from alfresco-public failed

Can anybody help me ?
Many thanks !

Stuck at Working With Custom Content Types in Alfresco: Part 3

Instructions under Setup read "...To facilitate this, I'm going to create two new Maven projects, but because they don't produce AMPs there is no reason to use the Alfresco Maven SDK to create them."

Can you explain how these projects are created please? I have tried creating directories on the file system, but can't import them into Eclipse as projects. If I create a project in Eclipse, it presents a wizard and I have to select a Maven archetype to use.

Either way, I can't arrive at the structure I see here on github.

Thanks,
Chris

Cannot establish dependency from content-tutorial-cmis to content-tutorial

Hello, I'm following the custom content types tutorial on ecmarchitect .

When I try to run this command in content-tutorial-cmis:

mvn exec:java
-Dexec.mainClass="com.someco.cmis.examples.SomeCoCMISDataCreator"
-Dexec.args="admin admin SomeCo whitepaper test"

I get the error:

[ERROR] Failed to execute goal on project content-tutorial-cmis: Could not resolve dependencies for project com.someco:content-tutorial-cmis:jar:1.0-SNAPSHOT: Could not find artifact com.someco:content-tutorial:jar:1.0-SNAPSHOT -> [Help 1]

After running mvn clean install on the content-tutorial project, I get tests errors:

[INFO] --- maven-failsafe-plugin:3.0.0-M1:integration-test (integration-test) @ content-tutorial-integration-tests ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.someco.platformsample.CustomContentModelIT
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.695 s <<< FAILURE! - in com.someco.platformsample.CustomContentModelIT
[ERROR] testCustomContentModelPresence(com.someco.platformsample.CustomContentModelIT) Time elapsed: 0.687 s <<< ERROR!
org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
Caused by: java.net.ConnectException: Connection refused (Connection refused)

[ERROR] testCreateAcmeDocument(com.someco.platformsample.CustomContentModelIT) Time elapsed: 0.002 s <<< ERROR!
org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
Caused by: java.net.ConnectException: Connection refused (Connection refused)

[INFO] Running com.someco.platformsample.HelloWorldWebScriptIT
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in com.someco.platformsample.HelloWorldWebScriptIT
[ERROR] testWebScriptCall(com.someco.platformsample.HelloWorldWebScriptIT) Time elapsed: 0 s <<< ERROR!
org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
at com.someco.platformsample.HelloWorldWebScriptIT.testWebScriptCall(HelloWorldWebScriptIT.java:67)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at com.someco.platformsample.HelloWorldWebScriptIT.testWebScriptCall(HelloWorldWebScriptIT.java:67)

[INFO] Running com.someco.platformsample.DemoComponentIT
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0 s <<< FAILURE! - in com.someco.platformsample.DemoComponentIT
[ERROR] testChildNodesCount(com.someco.platformsample.DemoComponentIT) Time elapsed: 0 s <<< ERROR!
org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
Caused by: java.net.ConnectException: Connection refused (Connection refused)

[ERROR] testGetCompanyHome(com.someco.platformsample.DemoComponentIT) Time elapsed: 0 s <<< ERROR!
org.apache.http.conn.HttpHostConnectException: Connect to localhost:8080 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
Caused by: java.net.ConnectException: Connection refused (Connection refused)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] CustomContentModelIT.testCreateAcmeDocument » HttpHostConnect Connect to local...
[ERROR] CustomContentModelIT.testCustomContentModelPresence » HttpHostConnect Connect ...
[ERROR] DemoComponentIT.testChildNodesCount » HttpHostConnect Connect to localhost:808...
[ERROR] DemoComponentIT.testGetCompanyHome » HttpHostConnect Connect to localhost:8080...
[ERROR] HelloWorldWebScriptIT.testWebScriptCall:67 » HttpHostConnect Connect to localh...
[INFO]
[ERROR] Tests run: 5, Failures: 0, Errors: 5, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M1:verify (verify-test) @ content-tutorial-integration-tests ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for AIO - SDK 4.0 1.0-SNAPSHOT:
[INFO]
[INFO] AIO - SDK 4.0 ...................................... SUCCESS [ 1.073 s]
[INFO] Alfresco Platform/Repository JAR Module ............ SUCCESS [ 12.933 s]
[INFO] Alfresco Share JAR Module .......................... SUCCESS [ 1.503 s]
[INFO] Integration Tests Module ........................... FAILURE [ 4.434 s]
[INFO] Alfresco Platform/Repository Docker Module ......... SKIPPED
[INFO] Alfresco Share Docker Module ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.055 s
[INFO] Finished at: 2021-07-15T19:12:29-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M1:verify (verify-test) on project content-tutorial-integration-tests: There are test failures.
[ERROR]
[ERROR] Please refer to /home/idebonis/Documents/Alfresco/2_Custom_Content_Types_Backup/content-tutorial/content-tutorial-integration-tests/target/failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :content-tutorial-integration-tests

I still can build the project using mvn clean install -DskipTests

Thansk beforehand for your help.

Best regards,
idebonis

Deploying target AMPs to Alfresco 5.0.d community fails

Hello,

I followed your great tutorial about alfresco workflows from here:
http://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html

I got everything working so far, both repo and share servers firing up when using mvn integration tests and i can use the workflow.
But once i deploy the target amps to a real alfresco 5.0.d community installation, the share part of alfresco starts and works, but the alfresco repo part doesn't work.
The worst thing is that i have an empty alfresco.log file.

The only thing i can think of is that i have built the AMP files on a windows box with Java x86, and deploying them with apply_amps.sh on a Linux box with Java x64.
As java is supposed to be a VM, that shouldn't be a issue, hopefully.

Now my questions is, does your tutorial apply to alfresco 5.0.d too ?
In the case it does, any clue where i could look at to find my problem ?

Regards,
Ozy.

Web scripts running in the repo require guest or higher if they have a JavaScript controller

The tutorial instructs people to create their first web script by creating files in the Data Dictionary folder. This works fine until the JavaScript controller is added. Once that happens the web script framework requires a security context.

Probably the best fix is to add guest to the descriptor when the controller is added and then have people test the URL by adding &guest=true to the URL.

"Working With Custom Content Types in Alfresco " not working for me on alfresco production server.

Hi Jeff, greettings from Venezuela.

I hope you'll be fine and could see this message because elsewhere I haven't found any email or contact about you ;-)

I have made "Working With Custom Content Types in Alfresco" tutorial step by step and everything works as expected with "mvn integration-test -Pamp-to-war". New custom types are loaded and showed.

Then, I uploaded amp files generated on target folder (for repo and share) to amp's folder on an alfresco wizard-made-fresh-installation within a VPS server using ./apply_amps.sh.
Apparently everything goes find, when I run java/bin/java -jar bin/alfresco-mmt.jar list tomcat/webapps/alfresco.war both modules "content-tutorial-repo AMP project" and "content-tutorial-share AMP project" are listed, but inside alfresco share nothing it's showed about them. (Even restarting tomcat server after /apply_amps.sh )

This tests was made on several versions of alfresco, from 5.1.e (maven sdk defaults) to 5.2.c. Even I have cloned the alfresco-developers-series github repo, and I haved repeated generation steps using run.sh script included and got nothing.

I don't know what to do. I'm a new alfresco user. Could you give me some advice?.

Thanks a lot.

no purge profile

Nothing major. Purely FYI. Using SDK 3. Getting Started says: "If you also want to delete the embedded database, Alfresco content store, indexes, and log files that were created by running the test Alfresco server, you can run: mvn clean -Ppurge". Maven responds: "[WARNING] The requested profile "purge" could not be activated because it does not exist."

'Workflow could not be started'

I'm working through the workflow tutorial, and I'm having difficulty with the publishWhitepaper workflow. The other share-configured workflow, helloWorld UI works fine, but each time I try to start the publishWhitepaper workflow, be it from the content edit page or from the "My Tasks" applet, I receive an error "Workflow could not be started" with the message "Failed to start workflow.. "

I've applied the amps to an existing 5.0.d server with the previous tutorial's amps, using the -force parameter on apply_amps. I'm using the code downloaded directly from here in case I made a mistake.

Any ideas?

Discrepancy in workflow tutorial for script task vs service task

Discrepancy in workflow tutorial for script task vs service task.

In this tutorial: http://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html
Script Task is used in the process diagram but in the section where extension elements are defined, a service task configuration is being used. The confusion arise after i see the serviceTask tag in the xml. We have a Service Task option as well in tasks pallet where we can choose which task we want to use.

<serviceTask id="alfrescoScripttask1" name="Alfresco Script Task" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate"> <extensionElements> <activiti:field name="script"> <activiti:string>logger.log("The outcome of the review task is: " + wf_reviewOutcome);</activiti:string> </activiti:field> </extensionElements> </serviceTask>

image

scriptFailed and undefined behaviour.args

What is the purpose of scriptFailed ? Appears to not do anything.

Also if behavior is null, then the check on line 4 will log and continue executing, when we then reach line 19 behaviour.args will throw exception (we can't get args on undefined behaviour).

var scriptFailed = false;
// Have a look at the behaviour object that should have been passed
if (behaviour == null) {
logger.log("The behaviour object has not been set.");
scriptFailed = true;
}
// Check the name of the behaviour
if (behaviour.name == null && behaviour.name != "onDeleteNode") {
logger.log("The behaviour name has not been set correctly.");
scriptFailed = true;
} else {
logger.log("Behaviour name: " + behaviour.name);
}
// Check the arguments
if (behaviour.args == null) {

Issue implementing the javascript version in behavior tutorial

``First of all, thank you for this guide! These tutorials have proven to be a great starting point and I've learned a lot about alfresco, java, maven and a bit of javascript.

Currently, I'm doing the behaviors tutorial. I have no problem with the java part, but when testing the JavaScript method, I get thiserror after running ./run.sh build_start_it_supported.
behavior-tutorial-ass_1 | org.alfresco.error.AlfrescoRuntimeException: 07170097 api/solr/aclchangesets return status:404 behavior-tutorial-ass_1 | at org.alfresco.solr.client.SOLRAPIClient.getAclChangeSets(SOLRAPIClient.java:169) behavior-tutorial-ass_1 | at org.alfresco.solr.tracker.AclTracker.checkRepoAndIndexConsistency(AclTracker.java:338) behavior-tutorial-ass_1 | at org.alfresco.solr.tracker.AclTracker.trackRepository(AclTracker.java:303) behavior-tutorial-ass_1 | at org.alfresco.solr.tracker.AclTracker.doTrack(AclTracker.java:95) behavior-tutorial-ass_1 | at org.alfresco.solr.tracker.AbstractTracker.track(AbstractTracker.java:215) behavior-tutorial-ass_1 | at org.alfresco.solr.tracker.TrackerJob.execute(TrackerJob.java:47) behavior-tutorial-ass_1 | at org.quartz.core.JobRunShell.run(JobRunShell.java:216) behavior-tutorial-ass_1 | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563) behavior-tutorial-ass_1 | 2021-08-17 06:52:10.053 ERROR (org.alfresco.solr.AlfrescoCoreAdminHandler@59d4cd39_Worker-35) [ ] o.a.s.t.AbstractTracker Tracking failed for ModelTracker - alfresco

I hope you can help me out.

Best regards,
Mr De Bonis

Querying against properties in multiple aspects

In the tutorial content there is some discussion about querying across properties that reside in multiple aspects. The text implies that it is not supported or that it is difficult to do and then shows an alternative that uses sub-selects. This is misleading as it is possible to do multiple joins to query across multiple aspects.

Directory creation language needs a scrub

A reader sent me an email:

Maybe this is old news or maybe I’m just confused, but your tutorial (for which, many thanks) states the following, with the questionable part marked in red, i.e, “The "model" directory does not exist when the project is initially created by the Alfresco Maven SDK . . .”. However, when I run the mvn command to generate the artifact, it does appear to exist.

“Models belong in a directory called “model” in your project's module directory, which is:

$TUTORIAL_HOME/content-tutorial-repo/src/main/amp/config/alfresco/module/content-tutorial-repo

“The "model" directory does not exist when the project is initially created by the Alfresco Maven SDK, so go ahead and create it now in the directory above.”

Which is a good observation. The newer version of the SDK creates the model directory for you and populates it with sample XML files.

The 3.0 version of the SDK makes some directory changes. When that ships, I'll scrub this for directory locations and related language.

Out of memory error when running tests

Hi !

I was following your tutorial at http://ecmarchitect.com/alfresco-developer-series-tutorials/maven-sdk/tutorial/tutorial.html

when running

mvn integration-test -Pamp-to-war

I get the following errors :

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RMI RenewClean-[192.168.0.54:50508]"
Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal UNKNOWN to handler- the VM may need to be forcibly terminated

then a bit later followed by

    at java.util.concurrent.FutureTask.report(FutureTask.java:122)                                            
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)                                               
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)                          
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)                             
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)                                   
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)                        
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)                        
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)                                               
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)                        
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)                        
    at java.lang.Thread.run(Thread.java:744)                                                                  

Caused by: java.lang.OutOfMemoryError: PermGen space

fÚvr. 14, 2014 11:27:55 AM org.apache.catalina.core.ContainerBase startInternal
Grave: A child container failed during start
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:335)
at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:1091)
at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:512)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.OutOfMemoryError: PermGen space

I'm trying to fix it right now by increasing the memory allocated to maven.
Any ideas how ?

Error in Part 3: Working with Content Programmatically

Hi

When i want to test to create a custom content in Alfresco by your tutorial "Working With Custom Content Types in Alfresco - Part 3", i have an error by deploying content-tutorial-cmis by a maven command : mvn exec:java -Dexec.mainClass="com.someco.cmis.examples.SomeCoCMISDataCreator" -Dexec.args="admin admin SomeCo whitepaper test"

I have launched th repo made on the part 1 of this tutorial. This repo Amp tier works perfectly.
But i can't create a content with the tutorial part 3. I have copied all your source code and i have no errors in Eclipse.
But in my cmd window , this is :

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building content-tutorial-cmis 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.someco:content-tutorial-common:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.301 s
[INFO] Finished at: 2014-09-18T15:22:55+02:00
[INFO] Final Memory: 7M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project content-tutorial-cmis: Could not resolve dependencies for project com.someco:content-tutorial-cmis:jar:0.0.1-SNAPSHOT: Failure to find com.someco:content-tutorial-common:jar:1.0-SNAPSHOT in https://artifacts.alfresco.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of artifacts.alfresco.com has elapsed or updates are forced -> [Help 1]

Please help me :-/

Could not resolve dependencies

Good day

I am quite new to alfresco and have been trying to implement the examples you gave in the alfresco developer series.

I am currently stuck on dependencies issues. I would like to be able to follow along, but I am not sure how I can fix these issues. I have even downloaded the source as a zip file and tried to start the servers as is, but I keep on getting the following error(s):

Implementing custom actions:
[ERROR] Failed to execute goal on project actions-tutorial-repo: Could not resol
ve dependencies for project com.someco:actions-tutorial-repo:jar:1.0-SNAPSHOT: F
ailed to collect dependencies at com.someco:content-tutorial-common:jar:1.0.0-SN
APSHOT: Failed to read artifact descriptor for com.someco:content-tutorial-commo
n:jar:1.0.0-SNAPSHOT: Could not transfer artifact com.someco:content-tutorial-co
mmon:pom:1.0.0-SNAPSHOT from/to alfresco-private-repository (https://artifacts.a
lfresco.com/nexus/content/groups/private): Not authorized , ReasonPhrase:Unautho
rized. -> [Help 1]
[ERROR]

When trying to start the actions server based on the code provided on github:
[ERROR] Failed to execute goal on project actions-tutorial-repo: Could not resol
ve dependencies for project com.someco:actions-tutorial-repo:jar:1.0.0-SNAPSHOT:
Failed to collect dependencies at org.alfresco.maven:alfresco-rad:jar:3.0.0-SNA
PSHOT: Failed to read artifact descriptor for org.alfresco.maven:alfresco-rad:ja
r:3.0.0-SNAPSHOT: Could not transfer artifact org.alfresco.maven:alfresco-rad:po
m:3.0.0-SNAPSHOT from/to alfresco-private-repository (https://artifacts.alfresco
.com/nexus/content/groups/private): Not authorized , ReasonPhrase:Unauthorized.
-> [Help 1]
[ERROR]

When trying to start the workflow repo based on the code provided on github:
[ERROR] No plugin found for prefix 'alfresco' in the current project and in the
plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the r
epositories [local (C:\Users\Jaco-Louis.m2\repository), alfresco-plugin-public
(https://artifacts.alfresco.com/nexus/content/groups/public), alfresco-plugin-pu
blic-snapshots (https://artifacts.alfresco.com/nexus/content/groups/public-snaps
hots), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]

Any help would be appreciated as I am quite new to alfresco and would like to be able to customize alfresco as per the examples provided.

Kind regards
Jaco-Louis

CMIS Example error

Hello,
first of all let me thank you for the Alfresco Developer Series Tutorial I'm currently following! :-)
It is really a very good starting point.

I think I found some issues, which I will post here. The first one:

    public static void main(String[] args) throws Exception {
    	CMISExampleBase ex = new CMISExampleBase ();
    	ex.setUser(args[0]);
    	ex.setPassword(args[1]);
    	ex.getProductInfo();
    }

This code is not working, because the method getProductInfo() nox exists in CMISExampleBase.

Webscript Tutorial with ACS 6.2

Digging my way through the tutorial I found a few things that I'd like to report here...
Basically all minor things, but just to let you and maybe others know.

In the files rating.get.js and rating.delete.js the search wasn't working for me. So I changed
var curNode = search.findNode("workspace://SpacesStore/" + args.id);
to

var referenceType = "node"; 
var reference = ["workspace", "SpacesStore", args.id];   
var curNode = search.findNode(referenceType, reference);

As there is a webscript-context file I put the Java-backed controller
<bean id="webscript.com.somco.ratings.rating.post" class="com.somco.scripts.PostRating" parent="webscript">
into it to separate the controller from the "normal" beans.

In the descriptor file rating.delete.desc.xml I changed

<url>/someco/rating/delete?id={id}</url>
<url>/someco/rating/delete.html?id={id}</url>

to

<url>/someco/rating?id={id}</url>
<url>/someco/rating?id={id}</url>

because this matches with the rest of the rating webscripts.

In rating.delete.html.ftl there is a quotation mark missing. So I changed
<a href="${url.serviceContext}/binformed/rating2.html?id=${args.id}>Back to Ratings</a>
to
<a href="${url.serviceContext}/binformed/rating2.html?id=${args.id}">Back to Ratings</a>

No I'm looking forward to the workflow part :-) Which, as I saw, you have just updated!

pom missing artifact

Hello!
Now my maven can't resolve

com.someco
content-tutorial-common
1.0-SNAPSHOT

I have error:
Missing artifact com.someco:content-tutorial-common:jar:1.0-SNAPSHOT
Can you help me for this? Thanks!

Spring Bean NodeService injection

Hi,
Awesome examples. I found that a permission exception occurs if I declare the bean as in the example. ("No authentication provider")

<bean id="ratingBehavior" class="com.someco.behavior.Rating"
init-method="init">
    <property name="nodeService">
        <ref bean="NodeService" />
    </property>
    <property name="policyComponent">
        <ref bean="policyComponent" />
    </property>
</bean>

The Issue is solved by using the "nodeService" bean instead of "NodeService".

<bean id="ratingBehavior" class="com.someco.behavior.Rating"
init-method="init">
    <property name="nodeService">
        <ref bean="nodeService" />
    </property>
    <property name="policyComponent">
        <ref bean="policyComponent" />
    </property>
</bean>

Hope helps someone!

Thanks

Error Running Test for moveReplacedAction

When I run the test for moveReplacedAction using mvn install, I get the error:

Tests in error:
  testGetAction(ca.kfpl.actions.test.MoveReplacedActionTest): AuthenticationUtil not yet initialised; default guest username not available 

Upload or Download file to alfresco using java spring boot

I am a software engineering student and i am currently working on my final year project , the project consist on creating a REST API spring boot which communicates with Alfresco, that means my Spring boot application and angular7 interface can post, delete, get and put documents from alfresco.
Can you please help me to find some useful documents.
Thank you.

Error Running Test for RateableAspectTest

Tests in error:
testAddRateableAspect(com.someco.behavior.test.RateableAspectTest): AuthenticationUtil not yet initialised; default guest username not available
ratingTypeTest(com.someco.behavior.test.RatingTest): AuthenticationUtil not yet initialised; default guest username not available

Maven build errors

Running SDK 4.1.0 i had some maven build errors when following the Webscript Tutorial

The "rating" scripts must be stored under ...src/main/resources/alfresco/module/[Artifact.id]/scripts
Which, I think, is a good place for scripts that belong to a module.

But the Maven yuicompressor-maven-plugin tries to compress these files. And as they are not regular Javascript it complains about syntax errors.

Not finding a better solution I excluded the scripts directory from the processing by the plugin by adding
<exclude>**/scripts/**</exclude>
to the projects pom.xml two times.

under
<id>compress-assembly</id> &
<id>compress-resources</id>

Hope this information helps others who fall into the same pit...

Could not find artifact com.someco:actions-tutorial-platform-jar:amp:1.0-SNAPSHOT

Hello!
Following this ecmarchitect tutorial just try to run alfresco-developer-series/workflow/workflow-tutorial/run.sh
Got it from git early for alfresco 5.2.xxx (not need 6.0, still need 5.2..).
But it stops after some downloading(?) error:
[INFO] Configured Artifact: org.alfresco:alfresco-share-services:5.2.e:amp [INFO] Configured Artifact: com.someco:workflow-tutorial-platform-jar:1.0-SNAPSHOT:amp [INFO] Configured Artifact: com.someco:content-tutorial-platform-jar:1.0-SNAPSHOT:amp [INFO] Configured Artifact: com.someco:actions-tutorial-platform-jar:1.0-SNAPSHOT:amp Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/com/someco/actions-tutorial-platform-jar/1.0-SNAPSHOT/maven-metadata.xml Downloading: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/com/someco/actions-tutorial-platform-jar/1.0-SNAPSHOT/maven-metadata.xml Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/com/someco/actions-tutorial-platform-jar/1.0-SNAPSHOT/actions-tutorial-platform-jar-1.0-SNAPSHOT.amp Downloading: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/com/someco/actions-tutorial-platform-jar/1.0-SNAPSHOT/actions-tutorial-platform-jar-1.0-SNAPSHOT.amp [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] ecmarchitect.com workflow tutorial ................. FAILURE [ 4.536 s] [INFO] workflow-tutorial repo tier AMP project ............ SUCCESS [ 5.490 s] [INFO] workflow-tutorial share tier AMP project ........... SUCCESS [ 1.195 s] [INFO] Integration Tests Module ........................... SUCCESS [ 0.787 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.229 s [INFO] Finished at: 2020-02-13T11:04:15+02:00 [INFO] Final Memory: 60M/365M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.alfresco.maven.plugin:alfresco-maven-plugin:3.0.1:run (default-cli) on project workflow-tutorial: Unable to execute mojo: Unable to find artifact. Could not find artifact com.someco:actions-tutorial-platform-jar:amp:1.0-SNAPSHOT in alfresco-public (https://artifacts.alfresco.com/nexus/content/groups/public) [ERROR] [ERROR] Try downloading the file manually from the project website. [ERROR] [ERROR] Then, install it using the command: [ERROR] mvn install:install-file -DgroupId=com.someco -DartifactId=actions-tutorial-platform-jar -Dversion=1.0-SNAPSHOT -Dpackaging=amp -Dfile=/path/to/file [ERROR] [ERROR] Alternatively, if you host your own repository you can deploy the file there: [ERROR] mvn deploy:deploy-file -DgroupId=com.someco -DartifactId=actions-tutorial-platform-jar -Dversion=1.0-SNAPSHOT -Dpackaging=amp -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] [ERROR] [ERROR] [ERROR] com.someco:actions-tutorial-platform-jar:amp:1.0-SNAPSHOT [ERROR] [ERROR] from the specified remote repositories: [ERROR] alfresco-public (https://artifacts.alfresco.com/nexus/content/groups/public, releases=true, snapshots=true), [ERROR] alfresco-public-snapshots (https://artifacts.alfresco.com/nexus/content/groups/public-snapshots, releases=true, snapshots=true), [ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false) [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/MojoExecutionException
So there I can get actions-tutorial-platform-jar-1.0-SNAPSHOT.amp now? Looks like its really not exist in path. (com/someco/?)

BTW content-tutorial run OK. Need working workflow tutorial. Thank you!

Behavior Alfresco

Good afternoon, I had referred you to several articles on alfresco I have read. I am writing because I need to develop a behavior on the creation of a node of a custom type. This node has an association with other nodes. I developed the first part of behavior javascript onNodeUpdate under the policy, but it turns out I get the modified properties but can not access the array association because it is null. Please if you can direct me to finish the job. Thank you. Best regards

Note: my email is [email protected]

Problems with properties

In this specific project when I externalize the strings of models and processes, the accents and the ñ are shown with strange characters, how can I improve this aspect in the .properties file
Has something to do with the specific specifications of the file, I would appreciate an example of how to solve this problem, sorry for my spanglish. thank you
How the user sees it:
example

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.