Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Failed to execute goal org.apache.felix:maven-scr-plugin:1.20.0:scr (generate-scr-scrdescriptor) on project

Avatar

Level 3

Hi All,

I am trying to expose some RESTfull webservices on AEM. I have followed the instructions in this http://techagyan.blogspot.in/2015/02/be-restful-on-aem6.html

I'm getting following error:
"@Component : Service interface information is missing! (org.apache.felix:maven-scr-plugin:1.20.0:scr:generate-scr-scrdescriptor:process-classes)"

and
build_failure.PNG

My Code is:

package com.nextrow.restservice.core;

import javax.ws.rs.GET;

import javax.ws.rs.Path;

import javax.ws.rs.Produces;

import javax.ws.rs.core.MediaType;

import org.apache.felix.scr.annotations.Component;

import org.apache.felix.scr.annotations.Service;

@Service

@Component(metatype = false)

@Path("/helloservice")

public class SampleResource {

  @GET

  @Path("/sayhi")

  public String helloWorld() {

  return "SampleResource says hi";

  }

  @GET

  @Path("/getoperation")

  @Produces({ MediaType.TEXT_PLAIN })

  public String getServiceOperation() {

  String status = "false";

  // service.dosomething return

  return status;

  }

}

1 Accepted Solution

Avatar

Correct answer by
Level 10

To build AEM projects with Maven -- see this article --

Adobe Experience Manager Help | Creating your first Adobe Experience Manager 6.2 Project using Adobe...

Always check to see if a HELPX article exists for your use case. They all have been tested. You will see a Servlet is generated by default.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

To build AEM projects with Maven -- see this article --

Adobe Experience Manager Help | Creating your first Adobe Experience Manager 6.2 Project using Adobe...

Always check to see if a HELPX article exists for your use case. They all have been tested. You will see a Servlet is generated by default.

Avatar

Level 10

If you are building for AEM 6.3 - change the UBER file to 6.3.