How to port a Plugin from basic Entando to mavenized Entando - EntandoOldVersions/Entando GitHub Wiki
Port jpuserreg
to mavenized jpuserreg
- Have the project entando-plugins-parent
- Check the dependencies: if
jpuserreg
depends on another Plugin which is yet-to-be-ported, port that other Plugin first. - Create a new maven module project under
entando-plugins-parent
- Call it
entando-plugin-jppuserreg
- Use the
entando-archetype-plugin-generic
archetype -
groupId
:org.entando.entando.plugins
-
artifactId
:entando-plugin-jpuserreg
-
package
:com.agiletec.plugins.jpuserreg
- Configure the two additional properties:
-
pluginCode
:jpuserreg
-
pluginName
:User Registration
-
- Now check the
entando-plugins-parent/pom.xml
.
Find:
- Call it
<modules>
.....
<module>entando-plugin-jpuserreg</module>
.....
</modules>
- Place all the files from the basic Entando Plugin, into the proper places of the mavenized one, and do some minor adjustments:
Place here | This |
---|---|
src/main/java/com/agiletec/plugins/jpuserreg |
src/com/agiletec/plugins/jpuserreg/** |
src/main/resources/entando-struts-plugin.xml |
the contents of src/jpuserreg_japs-struts-plugin.xml
|
src/main/resources/api/plugins/jpuserreg/aps |
WebContent/WEB-INF/plugins/jpuserreg/aps/api/apiMethods.xml |
src/main/resources/shortcuts/plugins/jpuserreg/apsadmin |
WebContent/WEB-INF/plugins/jpuserreg/apsadmin/shortcuts.xml |
src/main/resources/spring/plugins/jpuserreg/aps/ |
WebContent/WEB-INF/plugins/jpuserreg/conf/** |
src/main/resources/spring/plugins/jpuserreg/apsadmin |
WebContent/WEB-INF/plugins/jpuserreg/apsadmin/conf/** |
src/main/resource/sql/plugins/jpuserreg/port_data_production.sql |
the contents of docs/jpuserreg/sql/mysql/portScript.sql with the exclusion of the table creation queries |
src/mainresource/sql/plugins/jpuserreg/serv_data_production.sql |
the contents of docs/jpuserreg/sql/mysql/servScript.sql with the exclusion of the table creation queries |
src/main/tld/plugins/jpuserreg |
WebContent/WEB-INF/plugins/jpuserreg/aps/tld/* and WebContent/WEB-INF/plugins/jpuserreg/apsadmin/tld/*
|
src/main/webapp/resources/plugins/jpuserreg |
WebContent/resources/plugins/jpuserreg/** |
src/main/webapp/WEB-INF/plugins/jpuserreg |
WebContent/WEB-INF/plugins/jpuserreg/** excluding the Spring files, the api directory, all the tld files and the file shortcuts.xml , placed elsewhere in one of the previous steps |
src/test/java/com/agiletec/plugins/jpuserreg |
test/com/agiletec/plugins/jpuserreg/** changing all the packages and imports from test.com.agiletec... to com.agiletec... , using the base test cases and config utils auto-generated by the archetype, and changing all the extends accordingly.Plus, if there are any old paths buried somewhere in the sources, change them accordingly. Example: admin/test/somefile.png may have become target/test/somefile.png . |
src/test/resource/sql/plugins/jpuserreg/port_data_test.sql |
the contents of docs/jpuserreg/sql/mysql/portTestScript.sql once again, the queries which create tables must be excluded |
src/test/resource/sql/plugins/jpuserreg/serv_data_test.sql |
the contents of docs/jpuserreg/sql/mysql/servTestScript.sql with the exclusion of the table creation queries |
src/test/sql/postgresql/port.sql |
the contents of docs/jpuserreg/sql/postgresql/portTestScript.sql
|
src/test/sql/postgresql/serv.sql |
the contents of docs/jpuserreg/sql/postgresql/servTestScript.sql
|