cancel
Showing results for 
Search instead for 
Did you mean: 

Cant get Maven AMP project working

pkasson
Champ in-the-making
Champ in-the-making
Hi,

Not sure why there is nowhere to be found, a sample Eclipse / Maven sample project.  All searches I have found all point  to generating a project using archetype.

Well, having done that and having Eclipse yell about missing deps and bad packaing ("amp") … clearly something is awry.

Where can I find a simple starter pom.xml and/or Eclipse project  so that I can modify my model to support items like invoices (or, is there an AMP somewhere already built I can use to jump start ?)

Thanks !

Peter
4 REPLIES 4

gravitonian
Star Collaborator
Star Collaborator
Hi,

I would recommend starting with an All-In-One project (http://docs.alfresco.com/5.1/concepts/alfresco-sdk-archetypes-aio.html) so you can test model deployment and model UI from the same project. Generate the project following these instructions: http://docs.alfresco.com/5.1/tasks/alfresco-sdk-tutorials-all-in-one-archetype.html
Import the AIO project into Eclipse following these instructions: http://docs.alfresco.com/5.1/tasks/alfresco-sdk-rad-eclipse-import-projects.html

Then define your content model following these instructions: http://docs.alfresco.com/5.1/references/dev-extension-points-content-model-define-and-deploy.html
And configure the UI for the content model following these instructions: http://docs.alfresco.com/5.1/references/dev-extension-points-content-model-configure-ui.html

pkasson
Champ in-the-making
Champ in-the-making
Well … after doing a mvn clean install, here is what I get:

Downloading: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-platform-...
alfresco-platform-distribution-5.1.e.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.mig:alfresco:1.0-SNAPSHOT (C:\dev\_alfresco\AMP_etc\project\alfresco\pom.xml) has 4 errors
[ERROR]     Child module C:\dev\_alfresco\AMP_etc\project\alfresco\alfresco-repo-amp of C:\dev\_alfresco\AMP_etc\project\alfresco\po
m.xml does not exist
[ERROR]     Child module C:\dev\_alfresco\AMP_etc\project\alfresco\alfresco-share-amp of C:\dev\_alfresco\AMP_etc\project\alfresco\p
om.xml does not exist
[ERROR]     Unresolveable build extension: Plugin org.alfresco.maven.plugin:alfresco-maven-plugin:2.2.0 or one of its dependencies c
ould not be resolved: Failed to collect dependencies at org.alfresco.maven.plugin:alfresco-maven-plugin:jar:2.2.0 -> org.alfresco:al
fresco-mmt:jar:5.1.e: Failed to read artifact descriptor for org.alfresco:alfresco-mmt:jar:5.1.e: Could not transfer artifact org.al
fresco:alfresco-mmtSmiley Tongueom:5.1.e from/to java.net-Public (https://maven.java.net/content/groups/public/😞 sun.security.validator.Valida
torException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certificat
ion path to requested target -> [Help 2]
[ERROR]     Non-resolvable import POM: Could not transfer artifact org.alfresco:alfresco-platform-distributionSmiley Tongueom:5.1.e from/to rep
ository.jboss.org-public (https://repository.jboss.org/nexus/content/groups/public😞 sun.security.validator.ValidatorException: PKIX
path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to reques
ted target @ line 69, column 25 -> [Help 3]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
[ERROR] [Help 3] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Have dealt with a lot of difficult builds/setups, confused why this is so difficult.

pkasson
Champ in-the-making
Champ in-the-making
I see there are some sample models in the community (5.0):  googledocs (under subsystem). Not sure if this is exactly a new content model, but seems to match the articles in creating a new one.

If all I need to do is create a model, does one need to create an AMP.war ?

steven_okennedy
Star Contributor
Star Contributor
Hi,

Did you use the all-in-one archetype to create your project as was suggested above?  I know that sometimes in some IDEs (like Eclipse) creating a project using the all-in-one archetype can seem to create multiple separate projects (7 in total I think) because the pom file contains some nested maven modules.  Did you delete or remove these before you ran your build?  The error messages would seem to indicate that alfresco-repo-amp and alfresco-share-amp module pom files are both missing…

To answer the other part of your question, if you're using Alfresco 5.1 then no you don't need to use any deployed customisations to create custom models, there is a built in Content Model Management tool available in the Share Admin Tools available to admin users.  It's not quite at feature-parity with a model you can define via a deployed customisation but its pretty good for most use cases.

Regards

Steven