04-25-2019 09:32 PM
05-25-2020 02:58 PM
Try using this command:
mvn archetype:generate -Dfilter="org.alfresco":
Include the " character in the filter.
06-25-2020 09:20 AM
Hi Experts,
I am new to Alfresco & also getting the same error while performing maven build from Eclipse as below:
[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 repositories [local (C:\Users\USER\.m2\repository), alfresco-plugin-public (https://artifacts.alfresco.com/nexus/content/groups/public), alfresco-plugin-public-snapshots (https://artifacts.alfresco.com/nexus/content/groups/public-snapshots), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'alfresco' in the current project and in the plugin groups
I have used the latest archetype version as below for maven:
org.alfresco.maven.archetype:alfresco-allinone-archetype version 4.1.0
FYI, the below command with quotes in the filter is not working for me giving syntax error:
mvn archetype:generate -Dfilter="org.alfresco":
Kindly suggest.
06-25-2020 09:49 AM
Welcome @supriyoece to community.
Seems you are using wrong command. It is:
mvn archetype:generate -Dfilter=org.alfresco: or mvn archetype:generate -Dfilter="org.alfresco:"
Have a look at this documentation to get started with SDK :
https://docs.alfresco.com/5.2/concepts/sdk-getting-started.html
In the above documentation, it asks to chose "10" (3.0.1) version, but you select "11" (3.1.0)
3.1.0 is the latest sdk to work with ACS5.2.x and 4.1.0 is the latest SDK for ACS6.2.x. Look at the below given post for details.
06-25-2020 11:10 AM
@abhinavmishra14 , Thank you so much for your reply.
I am using the Alfresco Community Edition 6.2 & selected the SDK 4.1.0 while generating the artifacts.
I have followed the same steps as suggested by you from the below link but still getting the listed error while perfroming Maven->Build from Eclipse:
My Maven version is 3.5.0. Do I need to update tothe latest maven version ?
06-25-2020 01:40 PM
The command you mentioned is wrong, i see "colon" is outside quote:
mvn archetype:generate -Dfilter="org.alfresco":
Did you tried using the correct commands i provided in previous reply ?
you should use:
mvn archetype:generate -Dfilter="org.alfresco:"
07-02-2020 09:27 AM
Hi Abhinav,
The error still persists even after generating the artifacts using the below command:
mvn archetype:generate -Dfilter="org.alfresco:"
Note:- In Maven build under Goals, when I am giving :clean install alfresco:run, the build is failing, however when I am giving 'test' in Goals, the build is successful.
FYI, I am running Alfresco Community Edition 6.2 from my local system & using the latest Alfresco SDK 4.1
I also ran Debug configurations in Eclipse & it is giving the below error:
DEBUG] Resolving plugin prefix alfresco from [org.apache.maven.plugins, org.codehaus.mojo]
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 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 alfresco-plugin-public has elapsed or updates are forced
org.apache.maven.plugin.PluginResolutionException: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 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 alfresco-plugin-public has elapsed or updates are forced
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:131)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:182)
at org.apache.maven.plugin.DefaultBuildPluginManager.loadPlugin(DefaultBuildPluginManager.java:86)
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 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 alfresco-plugin-public has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:218)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:193)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:559)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:483)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:401)
... 28 more
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (C:\Users\USER\.m2\repository)
[DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (C:\Users\USER\.m2\repository)
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in https://artifacts.alfresco.com/nexus/content/groups/public was cached in the local repository
Any pointers on where I am going wrong, would be really helpful. Thank you in advance.
07-02-2020 10:28 AM
@supriyoece Your statement- "I am running Alfresco Community Edition 6.2 from my local system & using the latest Alfresco SDK 4.1" clarifies the error.
"alfresco:run" is not meant for SDK4.x, it was for SDK 3.x
If you are using SDK4.x, you should be looking at the ReadMe, file that is available at the root of the base project. ACS 6.x is fully based on docker containers, you need to use run.bat/run.sh to start and launch the containers.
Before going to use SDK4.x you must know about docker, docker-compose, DockerFile etc. You can go through this blog to understand the docker based deployments: https://hub.alfresco.com/t5/alfresco-content-services-blog/deploying-and-running-alfresco-content-se...
You can follow the below given steps:
1- Generate the archetype [ use: mvn archetype:generate -Dfilter=org.alfresco: ] using SDK 4.1.0 (meant for ACS 6.2.0). Decide to generate AIO or individual archetypes based on your current setup/preference. You would get additional project named "yourproject-share-docker/yourproject-platform-docker". It will have DockerFile containing the base image and steps to be performed while launching the containers. You will also get a project named as "docker", this will have docker-compose.yml file which basically defines all the services which using which containers will be launced.
To get basic idea of DockerFile, refer:
https://dzone.com/articles/understanding-dockerfile
https://docs.docker.com/engine/reference/builder/
To get basic idea of docker-compose.yml, refer: https://docs.docker.com/compose/
2- Build and Start the containers using "run.bat build_start" (run.sh build_start for linux) command to build and start the docker containers. You can refer "run.bat or run.sh" files.
3- To remote debug and put breakpoints you can follow these documents. Make sure you add below step in platform DockerFile:
Add the below given line in your platform-docker project's DockerFile:
COPY hotswap-agent.properties $TOMCAT_DIR/webapps/alfresco/WEB-INF/classes
For remote debugging follow the instructions given here:
https://github.com/Alfresco/alfresco-sdk/blob/master/docs/advanced-topics/debugging/debug-eclipse.md
For more details on SDK4.x: https://github.com/Alfresco/alfresco-sdk/blob/master/docs/README.md
07-03-2020 03:34 AM
@abhinavmishra14 , Thank you so much for your reply & detailed explanations.
I would just like to clarify on the below point as it is one of the requirement in our client environment & whether it will work correctly:
Can we use the Alfresco 6.2 Enterprise Edition with latest SDK 4.1 without using Docker ? We will do the amp deployments manually in different environments without using Docker.
Thank you in advance for any further insights in the above scenario or if you foresee any challenges on the same.
07-03-2020 08:43 AM
SDK 4.x and above relies heavily on Docker for any kind of testing, however you can build your artifacts (JAR or AMP) without invoking Docker by simply bypassing the integration tests. If create a SDK 4.1 project you can simply run "mvn package" / "mvn install" / "mvn deploy". This will run unit tests (but not integration tests) and will not invoke any Docker work at all. You can then deploy your resulting artifacts to your ACS instance.
Explore our Alfresco products with the links below. Use labels to filter content by product module.