Impossible to generate custom library artifact

hello i try to develop my own custom library : https://documentation.bonitasoft.com/bonita/latest/software-extensibility/custom-library-development

wirk environment ( maven and groovy) need a little help to generate my groovy folder structure and create my first class. 

 

```

mvn archetype:generate -DgroupId=xyz.bindtech.extension -DartifactId=bonita-bank-library -DarchetypeArtifactId=groovy

[INFO] Scanning for projects...
[INFO] 
[INFO] -------------< xyz.bindtech.extension:bonita-bank-library >-------------
[INFO] Building bonita-bank-library 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] >>> maven-archetype-plugin:3.2.1:generate (default-cli) > generate-sources @ bonita-bank-library >>>
[INFO] 
[INFO] <<< maven-archetype-plugin:3.2.1:generate (default-cli) < generate-sources @ bonita-bank-library <<<
[INFO] 
[INFO] 
[INFO] --- maven-archetype-plugin:3.2.1:generate (default-cli) @ bonita-bank-library ---
[INFO] Generating project in Interactive mode
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/archetypes/groovy-jar/1.0/groovy-jar-1.0.pom
[WARNING] The POM for org.apache.maven.archetypes:groovy-jar:jar:1.0 is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/archetypes/groovy-jar/1.0/groovy-jar-1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.707 s
[INFO] Finished at: 2023-12-05T22:16:52+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project bonita-bank-library: The desired archetype does not exist (org.apache.maven.archetypes:groovy-jar:1.0) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
```

Hi,

You are trying to use a Maven archetype that does not exist.

Maven archetype can be used to scaffold your project structure.

Bonita provides a couple of archetypes for its specific extensions, like:

You may re-use one of those for your use case and remove the unwanted features (eg: use the connector archetype with groovy)

You can also use the simple archetype provided by maven and follow the tutorial to fill your pom.xml

HTH
Romain

Thank you for your reply. 
My problem is that I want to use the grrovy language instead of java, which is less accessible for me. 
I don't know how to generate the directory structure for groovy and also how to declare the first class. Maybe there are package dependencies to add in the name.xml for using groovy. all this is vague for me. I'll continue the research if you have a zip or repo of custom extension library in groovy not java.

hi thalia.cruz

AweSome i Will Check it, it will be helpfull

 

Best

I suggest using the connector archetype with groovy to get you started.

Hello i have try to use custom connector on this way : 

```

mvn -B archetype:generate \

-DarchetypeGroupId=org.bonitasoft.archetypes \

-DarchetypeArtifactId=bonita-connector-archetype \

-DgroupId=xyz.bindtech.extension -DartifactId=bonita-extension-bank -Dversion=1.0-SNAPSHOT \

-Dpackage=xyz.bindtech.extension -DbonitaVersion=9.0.0 -DclassName=Bank -Dlanguage=groovy -Dwrapper=true

```

 

after i delete some folders

```shell

rm -rf /DevEnvironment/bonita-extension-bank/schemas

rm -rf /DevEnvironment/bonita-extension-bank/src/assembly

rm -rf /DevEnvironment/bonita-extension-bank/src/main/resources

rm -rf /DevEnvironment/bonita-extension-bank/src/main/resources-filtered

rm -rf /DevEnvironment/bonita-extension-bank/target

```

 

my structure is 

 

my 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/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

 

<groupId>xyz.bindtech.extension</groupId>

<artifactId>bonita-extension-bank</artifactId>

<version>1.0-SNAPSHOT</version>

<name>bonita-extension-bank</name>

<packaging>jar</packaging>

 

<properties>

<!-- Maven -->

<java.version>11</java.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<maven.build.timestamp.format>yyyy.MM.dd-hh.mm</maven.build.timestamp.format>

 

<!-- Bonita -->

<bonita-runtime.version>9.0.0</bonita-runtime.version>

 

<!-- Test -->

<spock-core.version>2.3-groovy-3.0</spock-core.version>

<logback-classic.version>1.2.12</logback-classic.version>

<maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>

 

<!-- Maven plugins -->

<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>

<maven.compiler.release>${java.version}</maven.compiler.release>

<maven.compiler.source>${java.version}</maven.compiler.source>

<maven.compiler.target>${java.version}</maven.compiler.target>

<groovy-eclipse-compiler.version>3.7.0</groovy-eclipse-compiler.version>

</properties>

 

<dependencyManagement>

<dependencies>

<dependency>

<groupId>org.bonitasoft.runtime</groupId>

<artifactId>bonita-runtime-bom</artifactId>

<version>${bonita-runtime.version}</version>

<type>pom</type>

<scope>import</scope>

</dependency>

</dependencies>

</dependencyManagement>

 

<dependencies>

<!-- Bonita -->

<dependency>

<artifactId>bonita-common</artifactId>

<groupId>org.bonitasoft.engine</groupId>

<scope>provided</scope>

</dependency>

<dependency>

<groupId>org.codehaus.groovy</groupId>

<artifactId>groovy</artifactId>

<scope>provided</scope>

</dependency>

<!-- You may add more Groovy modules if required, see https://groovy-lang.org/documentation.html#groovymoduleguides -->

<dependency>

<groupId>org.slf4j</groupId>

<artifactId>slf4j-api</artifactId>

<scope>provided</scope>

</dependency>

<!-- Test -->

 

</dependencies>

 

</project>

 

`

 

To load 

Pour l'utilisation 

 

i can't see my library 

maybe i forget something, i'm newbiee

Hi DrakunDry ,

Maybe a good way to get you started with a Groovy connector is watching the replay of this webinar where we create a custom connector step-by-step: https://www.bonitasoft.com/videos/replay-stop3-back-to-school

Hope this helps

hi thalia.cruz

AweSome i Will Check it, it will be helpfull

Best