I'm following this tutorial: https://docs.alfresco.com/content-services/latest/develop/sdk/#gettingstarted
java -version java version "11.0.13" 2021-10-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370, mixed mode) mvn -v Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00) Maven home: C:\apache-maven-3.3.9\bin\.. Java version: 11.0.13, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk-11.0.13 Default locale: fr_FR, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos" docker -v Docker version 20.10.11, build dea9396
JAVA_HOME = C:\Program Files\Java\jdk-11.0.13.
then when I try to generate a new alfresco project I get the following message:
mvn archetype:generate -Dfilter=org.alfresco: [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-archetype-plugin:3.2.0:generate (default-cli) > generate-sources @ standalone-pom >>> [INFO] [INFO] <<< maven-archetype-plugin:3.2.0:generate (default-cli) < generate-sources @ standalone-pom <<< [INFO] [INFO] --- maven-archetype-plugin:3.2.0:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Interactive mode [WARNING] No archetype found in remote catalog. Defaulting to internal catalog [INFO] Your filter doesn't match any archetype, so try again with another value. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 47.903 s [INFO] Finished at: 2021-12-26T09:34:02+01:00 [INFO] Final Memory: 14M/60M [INFO] ------------------------------------------------------------------------
What could be the problem?
Thanks
Solved! Go to Solution.
Eventually the problem was in the repository. In user/.m2/repository folder I placed the archetype-catalog.xml file there, and it works!
You can download the file from THIS LINK
Best Regards
Try following command and choose appropriate version of sdk as per your requirement:
mvn archetype:generate -Dfilter="org.alfresco:"
You can also follow solutions, reference links on this thread and choose the sdk version as per your requirements. This thread is specifically about 6.x and 5.x but instructions would be same for latest versions as well :
it doesn't work; I have install alfresco 6.2 following your guid and it is working. However, where I try to generate the Alfresco SDK it gives me the same message.
That's strange. To cross check here is what i tried and i was able to generate boilerplate project with latest sdk.
C:\acs7>mvn archetype:generate -Dfilter="org.alfresco:" [INFO] Scanning for projects... Downloading: https://repo1.maven.org/maven2/net/thucydides/maven/plugins/maven-metadata.xml Downloading: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml Downloading: https://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml Downloaded: https://repo1.maven.org/maven2/net/thucydides/maven/plugins/maven-metadata.xml (433 B at 2.6 kB/s) Downloaded: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 55 kB/s) Downloaded: https://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kB at 76 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml Downloaded: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml (949 B at 9.3 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/3.2.0/maven-archetype-plugin-3.2.0.pom Downloaded: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/3.2.0/maven-archetype-plugin-3.2.0.pom (11 kB at 94 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype/3.2.0/maven-archetype-3.2.0.pom Downloaded: https://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype/3.2.0/maven-archetype-3.2.0.pom (12 kB at 101 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/maven/maven-parent/34/maven-parent-34.pom Downloaded: https://repo1.maven.org/maven2/org/apache/maven/maven-parent/34/maven-parent-34.pom (43 kB at 310 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/apache/23/apache-23.pom Downloaded: https://repo1.maven.org/maven2/org/apache/apache/23/apache-23.pom (18 kB at 109 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/3.2.0/maven-archetype-plugin-3.2.0.jar Downloaded: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/3.2.0/maven-archetype-plugin-3.2.0.jar (97 kB at 587 kB/s) [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-archetype-plugin:3.2.0:generate (default-cli) > generate-sources @ standalone-pom >>> [INFO] [INFO] <<< maven-archetype-plugin:3.2.0:generate (default-cli) < generate-sources @ standalone-pom <<< [INFO] [INFO] [INFO] --- maven-archetype-plugin:3.2.0:generate (default-cli) @ standalone-pom --- Downloading: https://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-catalog/3.2.0/archetype-catalog-3.2.0.pom Downloaded: https://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-catalog/3.2.0/archetype-catalog-3.2.0.pom (1.9 kB at 17 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-models/3.2.0/archetype-models-3.2.0.pom Downloaded: https://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-models/3.2.0/archetype-models-3.2.0.pom (2.7 kB at 26 kB/s) Downloading: https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/3.3.0/plexus-utils-3.3.0.pom Downloaded: https://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/3.3.0/plexus-utils-3.3.0.pom (5.2 kB at 32 kB/s) Downloading: https://repo1.maven.org/maven2/org/codehaus/plexus/plexus/5.1/plexus-5.1.pom Downloaded: https://repo1.maven.org/maven2/org/codehaus/plexus/plexus/5.1/plexus-5.1.pom (23 kB at 180 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-descriptor/3.2.0/archetype-descriptor-3.2.0.pom Downloaded: https://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-descriptor/3.2.0/archetype-descriptor-3.2.0.pom (2.0 kB at 16 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-common/3.2.0/archetype-common-3.2.0.pom Downloaded: https://repo1.maven.org/maven2/org/apache/maven/archetype/archetype-common/3.2.0/archetype-common-3.2.0.pom (17 kB at 154 kB/s) Downloading: https://repo1.maven.org/maven2/org/codehaus/groovy/groovy/2.4.16/groovy-2.4.16.pom Downloaded: https://repo1.maven.org/maven2/org/codehaus/groovy/groovy/2.4.16/groovy-2.4.16.pom (19 kB at 111 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.5.0/ivy-2.5.0.pom Downloaded: https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.5.0/ivy-2.5.0.pom (6.8 kB at 68 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/apache/7/apache-7.pom Downloaded: https://repo1.maven.org/maven2/org/apache/apache/7/apache-7.pom (14 kB at 136 kB/s) Downloading: https://repo1.maven.org/maven2/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.pom ............ Downloaded: https://repo1.maven.org/maven2/asm/asm-parent/3.2/asm-parent-3.2.pom (4.4 kB at 42 kB/s) Downloading: https://repo1.maven.org/maven2/asm/asm-commons/3.2/asm-commons-3.2.pom Downloaded: https://repo1.maven.org/maven2/asm/asm-commons/3.2/asm-commons-3.2.pom (415 B at 3.9 kB/s) Downloading: https://repo1.maven.org/maven2/asm/asm-tree/3.2/asm-tree-3.2.pom Downloaded: https://repo1.maven.org/maven2/asm/asm-tree/3.2/asm-tree-3.2.pom (404 B at 3.6 kB/s) Downloading: https://repo1.maven.org/maven2/asm/asm-util/3.2/asm-util-3.2.pom Downloaded: https://repo1.maven.org/maven2/asm/asm-util/3.2/asm-util-3.2.pom (409 B at 3.6 kB/s) Downloading: https://repo1.maven.org/maven2/asm/asm-analysis/3.2/asm-analysis-3.2.pom Downloaded: https://repo1.maven.org/maven2/asm/asm-analysis/3.2/asm-analysis-3.2.pom (417 B at 1.8 kB/s) Downloading: https://repo1.maven.org/maven2/org/beanshell/bsh/2.0b4/bsh-2.0b4.pom Downloaded: https://repo1.maven.org/maven2/org/beanshell/bsh/2.0b4/bsh-2.0b4.pom (1.2 kB at 9.8 kB/s) Downloading: https://repo1.maven.org/maven2/org/beanshell/beanshell/2.0b4/beanshell-2.0b4.pom Downloaded: https://repo1.maven.org/maven2/org/beanshell/beanshell/2.0b4/beanshell-2.0b4.pom (1.4 kB at 9.5 kB/s) ............. Downloaded: https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar (26 kB at 8.8 kB/s) Downloading: https://repo1.maven.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.jar Downloaded: https://repo1.maven.org/maven2/org/apache/maven/shared/maven-script-interpreter/1.0/maven-script-interpreter-1.0.jar (21 kB at 6.9 kB/s) Downloaded: https://repo1.maven.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.jar (335 kB at 109 kB/s) Downloaded: https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar (575 kB at 182 kB/s) Downloaded: https://repo1.maven.org/maven2/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar (282 kB at 89 kB/s) Downloaded: https://repo1.maven.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.jar (1.5 MB at 406 kB/s) [INFO] Generating project in Interactive mode [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0) Choose archetype: 1: remote -> org.alfresco.maven.archetype:activiti-jar-archetype (DEPRECATED - UNSUPPORTED - EXPERIMENTAL) 2: remote -> org.alfresco.maven.archetype:alfresco-allinone-archetype (Sample multi-module project for All-in-One development on the Alfresco platform. Includes modules for Platform/Repository JAR and Share JAR) 3: remote -> org.alfresco.maven.archetype:alfresco-amp-archetype (Sample project with full support for lifecycle and rapid development of Repository AMPs (Alfresco Module Packages)) 4: remote -> org.alfresco.maven.archetype:alfresco-platform-jar-archetype (Sample project with full support for lifecycle and rapid development of Platform/Repository JARs and AMPs (Alfresco Module Packages)) 5: remote -> org.alfresco.maven.archetype:alfresco-share-jar-archetype (Share project with full support for lifecycle and rapid development of JARs and AMPs (Alfresco Module Packages)) 6: remote -> org.alfresco.maven.archetype:share-amp-archetype (Share project with full support for lifecycle and rapid development of AMPs (Alfresco Module Packages)) Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 2 Choose org.alfresco.maven.archetype:alfresco-allinone-archetype version: 1: 2.0.0-beta-1 2: 2.0.0-beta-2 3: 2.0.0-beta-3 4: 2.0.0-beta-4 5: 2.0.0 6: 2.1.0 7: 2.1.1 8: 2.2.0 9: 3.0.0 10: 3.0.1 11: 3.1.0 12: 4.0.0-beta-1 13: 4.0.0 14: 4.1.0 15: 4.2.0 16: 4.3.0 Choose a number: 16: Downloading: https://repo1.maven.org/maven2/org/alfresco/maven/archetype/alfresco-allinone-archetype/4.3.0/alfresco-allinone-archetype-4.3.0.pom Downloaded: https://repo1.maven.org/maven2/org/alfresco/maven/archetype/alfresco-allinone-archetype/4.3.0/alfresco-allinone-archetype-4.3.0.pom (2.3 kB at 15 kB/s) Downloading: https://repo1.maven.org/maven2/org/alfresco/maven/alfresco-sdk-aggregator/4.3.0/alfresco-sdk-aggregator-4.3.0.pom Downloaded: https://repo1.maven.org/maven2/org/alfresco/maven/alfresco-sdk-aggregator/4.3.0/alfresco-sdk-aggregator-4.3.0.pom (26 kB at 283 kB/s) Downloading: https://repo1.maven.org/maven2/org/alfresco/maven/archetype/alfresco-allinone-archetype/4.3.0/alfresco-allinone-archetype-4.3.0.jar Downloaded: https://repo1.maven.org/maven2/org/alfresco/maven/archetype/alfresco-allinone-archetype/4.3.0/alfresco-allinone-archetype-4.3.0.jar (67 kB at 499 kB/s) Define value for property 'groupId': com.demo Define value for property 'artifactId': demo-project [INFO] Using property: version = 1.0-SNAPSHOT Define value for property 'package' com.demo: : Confirm properties configuration: groupId: com.demo artifactId: demo-project version: 1.0-SNAPSHOT package: com.demo Y: : [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Archetype: alfresco-allinone-archetype:4.3.0 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: com.demo [INFO] Parameter: artifactId, Value: demo-project [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parameter: package, Value: com.demo [INFO] Parameter: packageInPathFormat, Value: com/demo [INFO] Parameter: package, Value: com.demo [INFO] Parameter: groupId, Value: com.demo [INFO] Parameter: artifactId, Value: demo-project [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] Parent element not overwritten in C:\acs7\demo-project\demo-project-platform\pom.xml [INFO] Parent element not overwritten in C:\acs7\demo-project\demo-project-share\pom.xml [INFO] Parent element not overwritten in C:\acs7\demo-project\demo-project-integration-tests\pom.xml [INFO] Parent element not overwritten in C:\acs7\demo-project\demo-project-platform-docker\pom.xml [INFO] Parent element not overwritten in C:\acs7\demo-project\demo-project-share-docker\pom.xml [INFO] Executing META-INF/archetype-post-generate.groovy post-generation script [INFO] Project created from Archetype in dir: C:\acs7\demo-project [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:23 min [INFO] Finished at: 2021-12-27T11:52:25-05:00 [INFO] Final Memory: 20M/74M [INFO] ------------------------------------------------------------------------
Here is a demo video:
Maven Version same as yours, i am using java 11.0.4 though:
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00) Maven home: C:\Maven\apache-maven-3.3.9\bin\.. Java version: 11.0.4, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk-11.0.4 Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
It should work with this very basic maven settings too:
<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <!-- Default: ${user.home}/.m2/repository --> <!--<localRepository>C:\Maven\repository</localRepository>--> <pluginGroups> <pluginGroup>net.thucydides.maven.plugins</pluginGroup> </pluginGroups> <servers> </servers> <profiles> <profile> <id>alf</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>central</id> <url>https://repo1.maven.org/maven2/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>https://repo1.maven.org/maven2/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>alf</activeProfile> </activeProfiles> </settings>
Also check your maven settings.xml and see if it is able to connect to maven central. You can use above settings.xml as a reference. If you use VPN to connect, also check if it is blocking
I reconfigured my settings.xml and still the same problem.
<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd"> <pluginGroups> <pluginGroup>net.thucydides.maven.plugins</pluginGroup> </pluginGroups> <proxies> <proxy> <id>proxy</id> <active>true</active> <protocol>http</protocol> <host>proxy.sone.dz</host> <port>8080</port> </proxy> </proxies> <servers> </servers> <mirrors> <mirror> <id>maven-default-http-blocker</id> <mirrorOf>external:http:*</mirrorOf> <name>Pseudo repository to mirror external repositories initially using HTTP.</name> <url>http://0.0.0.0/</url> <blocked>true</blocked> </mirror> </mirrors> <profiles> <profile> <id>alf</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>central</id> <url>https://repo1.maven.org/maven2/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>https://repo1.maven.org/maven2/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>alf</activeProfile> </activeProfiles> </settings>
It may be specific to your environment. I see some additional settings in your settings.xml which may be causing the issue for your environment.
Please trying removing these:
<proxies> <proxy> <id>proxy</id> <active>true</active> <protocol>http</protocol> <host>proxy.sone.dz</host> <port>8080</port> </proxy> </proxies> <mirrors> <mirror> <id>maven-default-http-blocker</id> <mirrorOf>external:http:*</mirrorOf> <name>Pseudo repository to mirror external repositories initially using HTTP.</name> <url>http://0.0.0.0/</url> <blocked>true</blocked> </mirror> </mirrors>
I don't see any issues generating the project with latest sdk so definitely no issues with the sdk templating toolkit.
Have a also tried/considered to generate the project outside the VPN (if you are using one) and another machine?
I tried removing the </mirrors> and it doesn't work either. However I also believe that the problem is caused by the <proxies>. Unfortunately, I can only connect through the proxy (as a part of the company policy).
Thank you so much sir for your help.
In that you may have to work with your IT team to allow the connectivity and downloads from maven central and alfresco repositories.
Urls that may be required to be whitelisted:
https://repo1.maven.org/maven2/ http://maven.alfresco.com/nexus/content/groups/public https://artifacts.alfresco.com/nexus/content/groups/public-snapshots https://artifacts.alfresco.com/nexus/content/groups/private https://artifacts.alfresco.com/nexus/content/repositories/releases
Good luck @KarekMedAM
Thank you so mush
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.