Sunday, 15 March 2015

Alfresco Configuration to Eclipse or by Maven -



Alfresco Configuration to Eclipse or by Maven -

i trying configure development environment alfresco version 5.0.b. have tried per documentation maven , tried way in eclipse facing issue both

if maven command prompt

c:\maven_projects\project_1>mvn install [info] scanning projects... downloading: https ://repo.maven.apache.org/maven2/org/alfresco/maven/alfresco-sd k-parent/2.0.0-beta-4/alfresco-sdk-parent-2.0.0-beta-4.pom [error] build not read 1 project -> [help 1] [error] [error] project ipr.res.in:project_1:1.0-snapshot (c:\maven_projects\proje ct_1\pom.xml) has 1 error [error] non-resolvable parent pom: not transfer artifact org.alfresco. maven:alfresco-sdk-parent:pom:2.0.0-beta-4 from/to central (https: //repo.maven.a pache.org/maven2): repo.maven.apache.org , 'parent.relativepath' points @ wro ng local pom @ line 12, column 13: unknown host repo.maven.apache.org -> [help 2 ] [error] [error] see total stack trace of errors, re-run maven -e swit ch. [error] re-run maven using -x switch enable total debug logging. [error] [error] more info errors , possible solutions, please rea d next articles: [error] [help 1] http: //cwiki.apache.org/confluence/display/maven/projectbuildin gexception [error] [help 2] http: //cwiki.apache.org /confluence/display/maven/unresolvablemo delexception c:\maven_projects\project_1>

if seek in eclipse create 1 project maven project in add together catalog file maven central url (http: //repo1.maven.org/maven2/archetype-catalog.xml) when seek import archetype (org.alfresco. ..) not giving me anything.

so kindly help me out issue configure amp

my project pom.xml <?xml version="1.0" encoding="utf-8"?> <project xmlns="http: //maven.apache.org/pom/4.0.0" xmlns:xsi="http: //www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http: //maven.apache.org/pom/4.0.0 http: //maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.alfresco.tutorials</groupid> <artifactid>quick-start-project</artifactid> <version>1.0-snapshot</version> <name>quick-start-project repository amp project</name> <packaging>amp</packaging> <description>manages lifecycle of quick-start-project repository amp (alfresco module package)</description> <parent> <groupid>org.alfresco.maven</groupid> <artifactid>alfresco-sdk-parent</artifactid> <version>2.0.0-beta-4</version> </parent> <!-- | sdk properties have sensible defaults in sdk parent, | can override properties below utilize version. | more available properties see alfresco-sdk-parent pom. --> <properties> <!-- | defines groupid alfresco artifacts work against. of 4.2 allowed value is: org.alfresco | note: see http: //docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html details --> <alfresco.groupid>org.alfresco</alfresco.groupid> <!-- defines alfresco version work against. community versions typically identified major.minor.character (4.2.a) while enterprise versions identified major.minor.digit (4.2.0) --> <alfresco.version>5.0.a</alfresco.version> <app.log.root.level>warn</app.log.root.level> <alfresco.data.location>alf_data_dev</alfresco.data.location> <!-- defines target war artifactid run amp, used -pamp-to-war switch . | allowed values: alfresco | share. defaults repository amp, point foundation war --> <alfresco.client.war>alfresco</alfresco.client.war> <!-- defines target war groupid run amp, used -pamp-to-war switch . | org.alfresco or corporate groupid --> <alfresco.client.war.groupid>org.alfresco</alfresco.client.war.groupid> <!-- defines target war version run amp, used -pamp-to-war switch --> <alfresco.client.war.version>5.0.a</alfresco.client.war.version> <!-- controls properties picked in src/test/properties embedded run --> <env>local</env> </properties> <!-- here realize connection alfresco selected platform (e.g.version , edition) --> <dependencymanagement> <dependencies> <!-- import dependencymanagement artifacts in selected alfresco version/edition (see http: //maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#importing_dependencies) note: still need define dependencies in pom, can omit version it's enforced dependencymanagement. note: defaults latest version sdk pom has been tested with, alfresco version can/should overridden in project's pom --> <dependency> <groupid>${alfresco.groupid}</groupid> <artifactid>alfresco-platform-distribution</artifactid> <version>${alfresco.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencymanagement> <!-- next dependencies needed compiling java code in src/main/java; <scope>provided</scope> inherited each of following; more info, please refer alfresco-platform-distribution pom --> <dependencies> <dependency> <groupid>${alfresco.groupid}</groupid> <artifactid>alfresco-repository</artifactid> </dependency> </dependencies> </project>

as maven error message explains, alfresco maven sdk not available in maven central. available alfresco artifacts maven repository

you hence need add together snippet pom:

<repositories> <repository> <id>alfresco-public</id> <url>https://artifacts.alfresco.com/nexus/content/groups/public</url> </repository> </repositories>

you can find out more alfresco maven sdk wiki page , alfresco artifacts maven repository wiki page

alfresco alfresco-share archetypes

No comments:

Post a Comment