Hi,
I wonder if it's possible to use JGitFlow plugin in a multi-module setup with individual git repositories for each module?
I already started a basic test setup, but i have problems. Here is the pom of the parent project:
<project xmlns="
http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.X</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>external.atlassian.jgitflow</groupId>
<artifactId>jgitflow-maven-plugin</artifactId>
<version>1.0-m2</version>
<configuration>
<!-- see goals wiki page for configuration options -->
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>../child</module>
</modules>
</project>
This is the pom of the module:
<project xmlns="
http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>child</artifactId>
<parent>
<groupId>com.X</groupId>
<artifactId>parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
</project>
Both of them are versioned by git with a local repository in each root directory (parent/.git and child/.git)
So here are my current problems: If i use goal "jgitfflow:feature-start" from within the parent directory, the feature branch is created, but only on the parent project. How do i convince the plugin to do the same in the module?
The second problem is, when i use "jgitfflow:feature-finish", the process fails with this exception:
org.apache.maven.lifecycle.LifecycleExecutionException: Error finishing feature: Error finish feature: Error building project from MavenBuildCommand
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error finishing feature: Error finish feature: Error building project from MavenBuildCommand
at com.atlassian.maven.plugins.jgitflow.mojo.FeatureFinishMojo.execute(FeatureFinishMojo.java:90)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: com.atlassian.maven.plugins.jgitflow.exception.MavenJGitFlowException: Error finish feature: Error building project from MavenBuildCommand
at com.atlassian.maven.plugins.jgitflow.manager.DefaultFlowFeatureManager.finish(DefaultFlowFeatureManager.java:129)
at com.atlassian.maven.plugins.jgitflow.mojo.FeatureFinishMojo.execute(FeatureFinishMojo.java:86)
... 19 more
Caused by: com.atlassian.jgitflow.core.exception.JGitFlowExtensionException: Error building project from MavenBuildCommand
at com.atlassian.maven.plugins.jgitflow.extension.command.MavenBuildCommand.execute(MavenBuildCommand.java:50)
at com.atlassian.jgitflow.core.command.AbstractGitFlowCommand.runExtensionCommands(AbstractGitFlowCommand.java:219)
at com.atlassian.jgitflow.core.command.AbstractBranchMergingCommand.checkoutTopicBranch(AbstractBranchMergingCommand.java:156)
at com.atlassian.jgitflow.core.command.FeatureFinishCommand.call(FeatureFinishCommand.java:145)
at com.atlassian.maven.plugins.jgitflow.manager.DefaultFlowFeatureManager.finish(DefaultFlowFeatureManager.java:105)
... 20 more
Caused by: java.lang.NullPointerException
at com.atlassian.maven.plugins.jgitflow.helper.DefaultMavenExecutionHelper.execute(DefaultMavenExecutionHelper.java:95)
at com.atlassian.maven.plugins.jgitflow.helper.DefaultMavenExecutionHelper.execute(DefaultMavenExecutionHelper.java:61)
at com.atlassian.maven.plugins.jgitflow.extension.command.MavenBuildCommand.execute(MavenBuildCommand.java:45)
... 24 more
Any suggestions?
Best regards
Henning