-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submodule support #1
Comments
For our purpose it would be fine if was not expected by default to be in the parent folder of basedir, but located by looking in the parent folder of basedir, and if not found the parent of the parent, etc. all the way to the top. |
If I understand you, you're not having Git submodules, but one Git repository for several Maven projects, right? |
Yes. I am still new to the Maven mindset and apparently misunderstood what you were describing. Can the current version do what I describe? |
It won't work out of the box. I guess that this would work, but may require a somewhat complex configuration. You will at least need to specify the |
That is what I did, but I don't quite understand why it would not be possible to ask to search up towards the root. Ant can do it when looking for build.xml. |
I didn't say that this isn't entirely impossible, but it won't work with the current version of Mavanagaiata out-of-the-box. I just opened a new issue (#8) for this use case. |
I have now tried moving the mavanagaiata configuration snippet into a parent pom (sitting a directory level above each module which need this) and the parent pom.xml is next to .git/ and the automatic search does not work with 0.4.1. What is the proper way to do this for automatic searching of .git to work? |
A parent POM won't help, because the Please try to setup the configuration as follows. You can choose to set either <plugin>
<groupId>com.github.koraktor</groupId>
<artifactId>mavanagaiata</artifactId>
<version>0.4.1</version>
<configuration>
<baseDir>${project.basedir}/..</baseDir>
<gitDir>${project.basedir}/../.git</gitDir>
</configuration>
</plugin> |
I am now experimenting with submodules (we essentially want a single super pom pulling in all our branches) and interestingly enough hit this exact open issue. In my case the explicitly pointed out ".git" folder has now become a .git-file containing "gitdir: ../.git/modules/DVER" which mavanagaiata dislikes causing our builds to break. Is this anyone else seeing this issue? |
This is Git's new format for submodules, the actual |
Until now, the working tree was forced to be the parent of a found GIT_DIR. This is true for plain repositories, but fails for worktrees and submodules. The GIT_DIR for those special repositories resides inside the main now. This is not supported by JGit out-of-the-box as of now. So we try to find the `commondir` of a worktree and set it as the repository‘s GIT_DIR. See https://git-scm.com/docs/gitrepository-layout for further information. See #1 Closes #98
Mavanagaiata works great with submodules through customized plugin executions using different settings for
gitDir
and other properties.But it would be great, if there was a way to let this happen automagically, creating properties (and files) based on submodules.
The text was updated successfully, but these errors were encountered: