-
Notifications
You must be signed in to change notification settings - Fork 3
I want to update my pom
To add a new plugin to your pom, add before the </dependencies>
tag the block below.
<dependencies>
...
<dependency>
<groupId>fr.paris.lutece.plugins</groupId>
<artifactId>**PLUGIN TECHNICAL NAME**</artifactId>
<version>**[PLUGIN VERSION]**</version>
<type>lutece-plugin</type>
</dependency>
...
</dependencies>
For example, adding the dependency information for the plugin htmlpage :
<dependencies>
...
<dependency>
<groupId>fr.paris.lutece.plugins</groupId>
<artifactId>plugin-htmlpage</artifactId>
<version>[5.1.2]</version>
<type>lutece-plugin</type>
</dependency>
...
</dependencies>
Before spinning up your application, you have to change the dump in your mysql container, see the Update your dump section.
To update a new plugin to your pom, modify the version tag to set the plugin version you want to update it to.
<dependencies>
...
<dependency>
<groupId>fr.paris.lutece.plugins</groupId>
<artifactId>**PLUGIN TECHNICAL NAME**</artifactId>
<version>**[PLUGIN VERSION]**</version>
<type>lutece-plugin</type>
</dependency>
...
</dependencies>
Whilst updating a plugin may not necessarely result in changes to the database, we recommand you make a new dump to prevent any issues.
Before spinning up your container, you have to make a new dump file to ensure that your new plugin can run.
- Copy the pom.xml file in a temp folder
mkdir temp
cp pom.xml temp/pom.xml
cd temp
-
Modify your pom.xml and remove its dependency to site-theme-citelibre.
-
Run the command
mvn clean lutece:site-assembly
and wait for your app to be built. -
Go to the generated conf directory
cd target/<your site artifact Id>-<the version of your site>/WEB-INF/conf/
- Edit db.properties
portal.url=jdbc:mysql://127.0.0.1:3307/temp_database?autoReconnect=true&useUnicode=yes&characterEncoding=utf8
portal.user=<your database username>
portal.password=<your database password>
- Go back to the root directory and launch the following command and wait for completion.
cd ../../../..
mvn lutece:site-assembly antrun:run
- Create a dump of the newly generated database.
mysqldump -u <your database user> -p<your password> --compatible=no_table_options --skip-set-charset --result-file=dump.sql temp_database
- Replace the dump.sql file in your mysql container with the newly generated one. 😃