impossible to generate custom library artifact
hello i try to develop my own custom library : https://documentation.bonitasoft.com/bonita/latest/software-extensibilit...
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-...
[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-...
[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.
Comments
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"?>
<
p>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
xyz.bindtech.extension
bonita-extension-bank
1.0-SNAPSHOT
bonita-extension-bank
jar
11
UTF-8
UTF-8
yyyy.MM.dd-hh.mm
9.0.0
2.3-groovy-3.0
1.2.12
3.2.2
3.11.0
${java.version}
${java.version}
${java.version}
3.7.0
org.bonitasoft.runtime
bonita-runtime-bom
${bonita-runtime.version}
pom
import
bonita-common
org.bonitasoft.engine
provided
org.codehaus.groovy
groovy
provided
org.slf4j
slf4j-api
provided
`
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