Git Product home page Git Product logo

idempiere-plugin-scaffold's Introduction

Quick reference

iDempiere Plugin Generator

This project creates an iDempiere plugin skeleton. Current iDempiere Version 8.2.

Examples

Prerequisites

  • Java 11, commands java and javac.
  • Set IDEMPIERE_REPOSITORY env variable

Commands

Command Description
./plugin-scaffold Creates a new plugin
./plugin-scaffold clean Restart the scaffold configuration

To use .\plugin-scaffold.bat for windows.

Plugin Documentation

Components

The new plugin will have three components:

  • The New iDempiere Plugin
  • iDempiere Unit Test Fragment
  • iDempiere Target Platform

And a build.sh script to compile it.

Prerequisites

  • Java 11, commands java and javac.
  • Set IDEMPIERE_REPOSITORY env variable

Commands

Compile plugin and run tests:

./build

Use the parameter debug for debug mode example:

./build debug

Use .\build.bat for windows.

iDempiere Plugin Target Platform

A target platform is necessary to compile a iDempiere plugin. This is a smart target platform. Current iDempiere Version 8.2.

The scaffold is going to provide you a target platform and a way to compile it in your new plugin.

For more information go to https://github.com/ingeint/idempiere-target-platform-plugin

iDempiere Plugin Deployer

This tool allows you connect to iDempiere's OSGI platform and deploy a plugin, it's useful for continuous integration platforms.

For more information go to https://github.com/ingeint/idempiere-plugin-deployer

idempiere-plugin-scaffold's People

Contributors

matheus-marcelinux avatar ocurieles avatar sauljabin avatar saulojg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

idempiere-plugin-scaffold's Issues

java.nio.file.InvalidPathException running build.bat

Running the build script from Windows 10 command prompt, is returning the following exception:

'cmd' is not recognized as an internal or external command, operable program or batch file. Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:> at index 21: org.roca.ws;singleton:=true-8.2.0.202106171437.jar at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229) at java.base/java.nio.file.Path.resolve(Path.java:515) at TargetPlatformPluginTagger.copyJars(TargetPlatformPluginTagger.java:39) at TargetPlatformPluginTagger.main(TargetPlatformPluginTagger.java:23)

iDempiere 9 support

iDempiere 9 adds a few compatibility-breaking changes in their pom.xml structure. Also it'd be adviced to implement most new annotation-based factories.

[ERROR] Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact

[ERROR] Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.idempiere:dz.shamel.core.p2.targetplatform:target:11.0.0-SNAPSHOT -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.idempiere:dz.shamel.core.p2.targetplatform:target:11.0.0-SNAPSHOT
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:109)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: java.lang.RuntimeException: Could not resolve target platform specification artifact org.idempiere:dz.shamel.core.p2.targetplatform:target:11.0.0-SNAPSHOT
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.addTargetArtifact (DefaultTargetPlatformConfigurationReader.java:457)
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.setTarget (DefaultTargetPlatformConfigurationReader.java:370)
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.getTargetPlatformConfiguration (DefaultTargetPlatformConfigurationReader.java:105)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject (DefaultTychoResolver.java:100)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:139)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:223)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
[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/InternalErrorException
[INFO] Scanning for projects...
Downloading from OpenNMS: https://repo.opennms.org/maven2/org/idempiere/dz.shamel.core.p2.targetplatform/11.0.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.idempiere:dz.shamel.core.p2.targetplatform:11.0.0-SNAPSHOT/maven-metadata.xml from/to OpenNMS (https://repo.opennms.org/maven2): Certificate for <repo.opennms.org> doesn't match any of the subject alternative names: [maven.mirrors.opennms.org]
Downloading from OpenNMS: https://repo.opennms.org/maven2/org/idempiere/dz.shamel.core.p2.targetplatform/11.0.0-SNAPSHOT/dz.shamel.core.p2.targetplatform-11.0.0-SNAPSHOT.target
Downloading from jr-ce-releases: https://jaspersoft.jfrog.io/jaspersoft/jr-ce-releases/org/idempiere/dz.shamel.core.p2.targetplatform/11.0.0-SNAPSHOT/dz.shamel.core.p2.targetplatform-11.0.0-SNAPSHOT.target
Downloading from jenkins: https://repo.jenkins-ci.org/releases/org/idempiere/dz.shamel.core.p2.targetplatform/11.0.0-SNAPSHOT/dz.shamel.core.p2.targetplatform-11.0.0-SNAPSHOT.target
[ERROR] Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.idempiere:dz.shamel.core.p2.targetplatform:target:11.0.0-SNAPSHOT -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.idempiere:dz.shamel.core.p2.targetplatform:target:11.0.0-SNAPSHOT
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:109)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: java.lang.RuntimeException: Could not resolve target platform specification artifact org.idempiere:dz.shamel.core.p2.targetplatform:target:11.0.0-SNAPSHOT
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.addTargetArtifact (DefaultTargetPlatformConfigurationReader.java:457)
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.setTarget (DefaultTargetPlatformConfigurationReader.java:370)
at org.eclipse.tycho.core.resolver.DefaultTargetPlatformConfigurationReader.getTargetPlatformConfiguration (DefaultTargetPlatformConfigurationReader.java:105)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject (DefaultTychoResolver.java:100)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:139)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:223)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
[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/InternalErrorException
Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "" is null
at TargetPlatformPluginTagger.copyJars(TargetPlatformPluginTagger.java:30)
at TargetPlatformPluginTagger.main(TargetPlatformPluginTagger.java:23)

C:\Users\info\Dev\idempiere-plugin-scaffold\shamel-plugin (11.0 -> origin)
λ

Idempiere 11 FAILURE: Build failed with an exception.

C:\Users\info\Dev\idempiere-plugin-scaffold (11.0 -> origin)
λ .\plugin-scaffold.bat

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

Exception java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache [in thread "Daemon worker"]

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s
The system cannot find the path specified.

Error: set the 'IDEMPIERE_REPOSITORY' env variable first

.\build.bat
Source Idempiere : C:\Users\Djoudi\Source\DevRepo
plugin : C:\Users\Djoudi\Source\idempiere-plugin-scaffold-master\dz.test.plugin

Error: set the 'IDEMPIERE_REPOSITORY' env variable first
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.189 s
[INFO] Finished at: 2020-02-05T05:41:41+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\Djoudi\Source\idempiere-plugin-scaffold-m
aster\dz.test.plugin\dz.test.plugin.targetplatform). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
Exception in thread "main" java.lang.NullPointerException
at TargetPlatformPluginTagger.copyJars(TargetPlatformPluginTagger.java:30)
at TargetPlatformPluginTagger.main(TargetPlatformPluginTagger.java:23)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.