Skip to content

I want to update my pom

Philippe Bareille edited this page Jan 16, 2025 · 3 revisions

Add/Update a plugin

Add a plugin

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.


Update a plugin

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.

Update your dataset

Before spinning up your container, you have to make a new dump file to ensure that your new plugin can run.

  1. Copy the pom.xml file in a temp folder
mkdir temp
cp pom.xml temp/pom.xml
cd temp
  1. Modify your pom.xml and remove its dependency to site-theme-citelibre.

  2. Run the command mvn clean lutece:site-assembly and wait for your app to be built.

  3. Go to the generated conf directory

cd target/<your site artifact Id>-<the version of your site>/WEB-INF/conf/
  1. 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>
  1. Go back to the root directory and launch the following command and wait for completion.
cd ../../../..
mvn lutece:site-assembly antrun:run
  1. 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
  1. Replace the dump.sql file in your mysql container with the newly generated one. 😃
Clone this wiki locally