05-04-2017 07:37 AM
Greetings,
I'm in the process to upgrading Alfresco from 5.0 to 5.2, i have share and repo extension projects (not an all-in-one), i noticed i cannot create a repo amp when i enter mvn clean package, this is the pom.xml for the repo
<?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>pe.pucp</groupId>
<artifactId>pucp-share2</artifactId>
<version>1.0-SNAPSHOT</version>
<name>pucp-share2 AMP project</name>
<packaging>amp</packaging>
<description>Manages the lifecycle of the pucp-share2 AMP (Alfresco Module Package)</description>
<parent>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-sdk-parent</artifactId>
<version>2.2.0</version>
</parent>
<!--
SDK properties have sensible defaults in the SDK parent,
but you can override the properties below to use another version.
For more available properties see the alfresco-sdk-parent POM.
-->
<properties>
<!-- The following are default values for data location and Alfresco version.
Uncomment if you need to change-->
<alfresco.version>5.2.e</alfresco.version>
<!-- This control the root logging level for all apps uncomment and change, defaults to WARN
<app.log.root.level>WARN</app.log.root.level>
-->
<!-- Set the enviroment to use, this controls which properties will be picked in src/test/properties
for embedded run, defaults to the 'local' environment. See SDK Parent POM for more info.
<env>other environment name</env>
-->
<!-- The Maven artifact ID to use when loading the Share.WAR that the AMP should be applied to,
defaults to the alfresco.war artifact ID, so we need to override here. -->
<app.amp.client.war.artifactId>${alfresco.share.artifactId}</app.amp.client.war.artifactId>
<!-- Since Alfresco.WAR (i.e. the Repository) is already running on port 8080, we run Share.WAR on port 8081 -->
<maven.tomcat.port>8081</maven.tomcat.port>
<!-- Used in share-config-custom.xml. By default points to local installation of Alfresco Repo -->
<alfresco.repo.url>http://localhost:8080/alfresco</alfresco.repo.url>
</properties>
<!-- Here we realize the connection with the Alfresco selected platform
(e.g.version and edition) -->
<dependencyManagement>
<dependencies>
<!-- This will import the dependencyManagement for all artifacts in the selected Alfresco version/edition
(see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Depe...)
NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement. NOTE: It defaults
to the latest version this SDK pom has been tested with, but alfresco version can/should be overridden in your 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>
<!-- Following dependencies are needed for compiling Java code in src/main/java; -->
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<version>${alfresco.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.alfresco.surf</groupId>
<artifactId>spring-surf-api</artifactId>
<version>${dependency.surf.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Compress JavaScript files and store as *-min.js -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
i tried looking for a solution and i found that it could be because i need to upgrade to SDK 3.0.0, i created a new repo project that used SDK 3.0.0 and the pom.xml for that project is significally diferent to the one i have.
What do i need to change in my pom.xml so i can use SDK 3.0.0?
Sincere thanks
10-31-2017 02:08 AM
Hi Oscar,
A bit late
Amps are not the default packaging from SDK 3 onwards. You can create amps by uncommenting the maven-assembly-plugin which comes commented by default in the share and repo extensions project's pom.xml.
If you run mvn clean package now then you will see jar as well as amps created in your project target folder.
Hope this helps.
Explore our Alfresco products with the links below. Use labels to filter content by product module.