Skip to content
Snippets Groups Projects
Commit 4439fc7a authored by Sergiu Dumitriu's avatar Sergiu Dumitriu
Browse files

XWIKI-10829: Executing the import mojo after the package mojo in the same...

XWIKI-10829: Executing the import mojo after the package mojo in the same reactor causes the build to fail

Fixed.
parent dfd78eee
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,7 @@
import org.xwiki.extension.version.internal.DefaultVersionConstraint;
import org.xwiki.properties.ConverterManager;
import org.xwiki.tool.utils.LogUtils;
import org.hibernate.cfg.Environment;
import com.xpn.xwiki.XWikiContext;
......@@ -149,6 +150,9 @@ public void execute() throws MojoExecutionException, MojoFailureException
Importer importer = new Importer();
System.setProperty("xwiki.data.dir", this.xwikiDataDir.getAbsolutePath());
// If the package mojo was executed before, it might have left a different database connection URL in the
// environment, which apparently overrides the value in the configuration file
System.clearProperty(Environment.URL);
if (this.sourceDirectory != null) {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment