Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Hi
I'm trying to generate a plugin based on http://dev.joget.org/community/display/KBv2/Developing+Plugins
When running the command:
C:\work\jogetsource>wflow-plugin-archetype\create-plugin.bat com.company.plugin.test TestPlugin 4.0-SNAPSHOT
It outputs:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] -- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo1.maven.org/maven2/org/joget/wflow-plugin-archetype/4.0-SNAPSHOT/maven-metadata.xml
[INFO] Using property: groupId = com.company.plugin.test
[INFO] Using property: artifactId = TestPlugin
Define value for property 'version': 1.0-SNAPSHOT: :
[INFO] Using property: package = com.company.plugin.test
Confirm properties configuration:
groupId: com.company.plugin.test
artifactId: TestPlugin
version: 1.0-SNAPSHOT
package: com.company.plugin.test
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: wflow-plugin-archetype:4.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.company.plugin.test
[INFO] Parameter: packageName, Value: com.company.plugin.test
[INFO] Parameter: package, Value: com.company.plugin.test
[INFO] Parameter: artifactId, Value: TestPlugin
[INFO] Parameter: basedir, Value: C:\work\jogetsource
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: C:\work\jogetsource\TestPlugin
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.104 s
[INFO] Finished at: 2014-04-01T10:24:13+10:00
[INFO] Final Memory: 14M/489M
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] -- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo1.maven.org/maven2/org/joget/wflow-plugin-archetype/4.0-SNAPSHOT/maven-metadata.xml
[INFO] Using property: groupId = com.company.plugin.test
[INFO] Using property: artifactId = TestPlugin
Define value for property 'version': 1.0-SNAPSHOT: :
[INFO] Using property: package = com.company.plugin.test
Confirm properties configuration:
groupId: com.company.plugin.test
artifactId: TestPlugin
version: 1.0-SNAPSHOT
package: com.company.plugin.test
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: wflow-plugin-archetype:4.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.company.plugin.test
[INFO] Parameter: packageName, Value: com.company.plugin.test
[INFO] Parameter: package, Value: com.company.plugin.test
[INFO] Parameter: artifactId, Value: TestPlugin
[INFO] Parameter: basedir, Value: C:\work\jogetsource
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: C:\work\jogetsource\TestPlugin
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.104 s
[INFO] Finished at: 2014-04-01T10:24:13+10:00
[INFO] Final Memory: 14M/489M
[INFO] ------------------------------------------------------------------------
But the generated C:\work\jogetsource\TestPlugin only contains C:\work\jogetsource\TestPlugin\src\main\java\com\company\plugin\test\Activator.java no other files as I'd expect including TestPlugin.
Please can you advise?
I'd also be interested if you could point me in the direction of tutorials for creating all types of Plugins.
Thanks
3 Comments
Julian
Hi,
There's an article on creating a plugin at Create Userview Theme. This is for a userview theme, but the general concepts are presented. There's also a YouTube video for this.
Hope this helps!
AH
Hi Julian
Thanks for the reply. I have seen this article but I'm hoping to create a Tool logic Plugin. Can you please outline the differences to the Userview Theme Plugin?
Should the generated TestPlugin I created above contain a TestPlugin.java file? If not, could you direct me towards an empty file to use as a Tool logic Plugin?
Thanks,
Andrew
Julian
Hi Andrew,
Nope it doesn't create a TestPlugin.java for you. You could create one based on the source codes of some of the bundled Tool plugins in GitHub, for example the Database Update Tool or the Email Tool.
Essentially, you'd be extending the org.joget.plugin.base.DefaultApplicationPlugin as defined in http://dev.joget.org/community/display/KB/Process+Tool+Plugin
Best Regards,
Julian