Custom Connector Template Generation Issue

Hi Team , I am using below plugin to generate template

<plugin>
				<groupId>io.camunda.connector</groupId>
				<artifactId>element-template-generator-maven-plugin</artifactId>
				<version>8.6.5</version>
				<configuration>
					<connectorClasses>
						<connectorClass>
							io.camunda.example.ConcatenationConnectorFunction</connectorClass>
					</connectorClasses>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>generate-templates</goal>
						</goals>
					</execution>
				</executions>
			</plugin> 

where ConcatenationConnectorFunction is the function inside io.camunda.example package .But it is giving error as invalid plugin configuration connectorClasses.Kindly advise here.

Could you share a code snippet along with the full error stack?

Getting below warning while doing maven build NFO] [INFO] e[1m--------------< e[0;36mio.camunda.connector:connector-templatee[0;1m >---------------e[m [INFO] e[1mBuilding connector-template 0.1.0-SNAPSHOTe[m [INFO] from pom.xml [INFO] e[1m--------------------------------[ jar ]---------------------------------e[m [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-shade-plugin/maven-metadata.xml [INFO] Downloading from connectors-snapshots: https://artifacts.camunda.com/artifactory/connectors-snapshots/org/apache/maven/plugins/maven-shade-plugin/maven-metadata.xml [INFO] Downloading from connectors: https://artifacts.camunda.com/artifactory/connectors/org/apache/maven/plugins/maven-shade-plugin/maven-metadata.xml [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-shade-plugin/maven-metadata.xml (1.6 kB at 2.0 kB/s) [WARNING] e[1;33mParameter 'e[0;1;33mconnectorClassese[0;1;33m' is unknown for plugin 'e[0;1;33melement-template-generator-maven-plugine[0;1;33m:e[0;1;33m8.6.5e[0;1;33m:e[0;1;33mgenerate-templatese[0;1;33m (e[0;1;33mdefaulte[0;1;33m)e[0;1;33m'e[m [INFO] and its not generating the templates. Below is the connector function class `
package io.camunda.example;

import io.camunda.connector.api.annotation.OutboundConnector;
import io.camunda.connector.api.outbound.OutboundConnectorContext;
import io.camunda.connector.api.outbound.OutboundConnectorFunction;
import io.camunda.example.dto.ConcatenationConnectorRequest;
import io.camunda.example.dto.ConcatenationConnectorResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@OutboundConnector(
name = “concatenation-connector”,
inputVariables = {“input1”, “input2”},
type = “io.camunda:concatenation-api:1”)

public class ConcatenationConnectorFunction implements OutboundConnectorFunction {

private static final Logger LOGGER = LoggerFactory.getLogger(ConcatenationConnectorFunction.class);

@Override
public Object execute(OutboundConnectorContext context) {
final var connectorRequest = context.bindVariables(ConcatenationConnectorRequest.class);
return executeConnector(connectorRequest);
}

private ConcatenationConnectorResult executeConnector(final ConcatenationConnectorRequest connectorRequest) {
LOGGER.info(“Executing my connector with request {}”, connectorRequest);
String concatenationResult = connectorRequest.input1() + " " +connectorRequest.input2();
var result = new ConcatenationConnectorResult(concatenationResult);
LOGGER.info(“Connector executed with result {}:”, result);
return result;
}
}
`

Have you tried to downgrade the plugin to previous versions, like 8.6.2 or 8.5.11 to check if it works?

Hi, Tried with both versions,issue still exists. e[1;33mParameter ‘e[0;1;33mconnectorClassese[0;1;33m’ is unknown for plugin 'e[0;1;33melement-template-generator-maven-plugine[0;1;33m:e[0;1;33m8.5.0e[0;1;33m:e[0;1;33mgenerate-templatese[0;1;33m (e[0;1;33mdefaulte[0;1;33m)e[0;1;33m’e[m
[INFO]
[INFO] e[1m— e[0;32mclean:3.3.2:cleane[m e[1m(default-clean)e[m @ e[36mconnector-templatee[0;1m —e[m
[INFO] Deleting C:\Users\subhasna\Downloads\connector-template-outbound-main\connector-template-outbound-main\target
[INFO]
[INFO] e[1m— e[0;32mresources:3.3.1:resourcese[m e[1m(default-resources)e[m @ e[36mconnector-templatee[0;1m —e[m
[INFO] Copying 2 resources from src\main\resources to target\classes
[INFO]
[INFO] e[1m— e[0;32mcompiler:3.13.0:compilee[m e[1m(default-compile)e[m @ e[36mconnector-templatee[0;1m —e[m
[INFO] Recompiling the module because of e[1mchanged source codee[m.
[INFO] Compiling 4 source files with javac [debug release 21] to target\classes
[INFO]
[INFO] e[1m— e[0;32melement-template-generator:8.5.0:generate-templatese[m e[1m(default)e[m @ e[36mconnector-templatee[0;1m —e[m
[WARNING] No connector classes specified. Skipping generation of element templates.``
is there any other way to mention connectorfunction for this particular plugin.
Using below plugin:

<plugin>
					<groupId>io.camunda.connector</groupId>
					<artifactId>element-template-generator-maven-plugin</artifactId>
					<version>${version.connectors}</version>
					<configuration>
						<connectorClasses>
							<connectorClass>
								io.camunda.example.ConcatenationConnectorFunction</connectorClass>
						</connectorClasses>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>generate-templates</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

According to documentation to use the plugin, your Connector must be annotated with @ElementTemplate annotation. I do not see it in your code or I’m missing something.
You can see more information here.

I am also getting the same error.
How we can resolve?
In 8.4 version it automatically generate the template after adding plugin