Expand my Community achievements bar.

What is the default Maven SCR Plugin Phase?

Avatar

Community Advisor

What is the default phase for maven SCR plugin execution?

<plugin><groupId>org.apache.felix</groupId><artifactId>maven-scr-plugin</artifactId><version>1.20.0</version><executions><execution><id>generate-scr-scrdescriptor</id><goals><goal>scr</goal></goals><phase>?</phase></execution></executions></plugin>

Regards,

Peter

3 Replies

Avatar

Level 5

Just a guess here but going to say it probably changes while it's running... If you have a look at the Built-In Lifecycle Bindings[1] for maven plugins, it starts with "generate-resources" and then moves through the different phases of processing, compiling, testing, packaging, deploying, etc.

Again though, just guessing here. Don't know why you'd need to specify a specific phase instead of letting the plugin do it's thing. 

 

[1] https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Built-in_Lifecycle_B...

Avatar

Community Advisor

Thank you both for your replys,

Specifically, we have logic that runs in test phase.

The problem is that whenever scr plugin runs with test phase it fails due to SlingServlet annotation.

It tells us that there is a 'duplicate definition of property.servlet.methods'. While in our code we don't mention this prop. It's pulled directly from Sling.

The work around for now is to set specific phase for plugin.