-
Notifications
You must be signed in to change notification settings - Fork 3
What if I want to write and test a new feature in my own portal?
No panic.
entando-archetype-portal-generic
comes with all the necessary to write and test your own feature.
If you want to do the testing in your IDE, just run mvn clean process-test-classes
or ant Test-init
, and then start JUnit as appropriate.
Else, you can run mvn clean test
or ant Test
.
Anyway, if you need to add some tables or custom data to your test database, just do it.
Then, you can backup it in tar format using ant PG-db-backup
, or in plain text using ant PG-db-export-SQL
.
If it finds a tar db backup or custom plain test db backup, ant Test-init
will use it instead of the usual test db backup coming from entando-core-engine.
Same as above, but you have to add some dependencies as well.
Say your are writing a feature that uses entando-plugin-jpaddressbook
, here is the POM snippet:
<!--
For compile time, and with scope = provided because we need it only
at compile time (the real jar used at runtime comes within the
dependency of type = war)
-->
<dependency>
<groupId>org.entando.entando.plugins</groupId>
<artifactId>entando-plugin-jpaddressbook</artifactId>
<version>0.0.3-SNAPSHOT</version>
<type>jar</type>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<!--
Now, this is weird.
If you want to test against a Plugin, you have to add the classes
at scope = test for all of its dependencies.
Quite sure this is a bug of Maven, or of Entando, or both.
-->
<dependency>
<groupId>org.entando.entando.plugins</groupId>
<artifactId>entando-plugin-jpuserprofile</artifactId>
<version>0.0.2-SNAPSHOT</version>
<type>jar</type>
<classifier>classes</classifier>
<scope>test</scope>
</dependency>
All the material here contained is published under the GNU Free Documentation License v1.3
The Entando trademark and logo are registered trademarks of Entando, srl. All
Rights Reserved.
All other trademarks are the property of their respective owners.