feat(dissertation): add section on creating a maven package for xpc

This commit is contained in:
Anthony Berg 2024-05-13 20:49:11 +01:00
parent fd60cb3988
commit 7f3248dbaf
3 changed files with 87 additions and 0 deletions

View File

@ -120,6 +120,40 @@ Brief overview of what it is supposed to do... % TODO
\subsection{Creating Maven Package} \subsection{Creating Maven Package}
% Gradle
% Testing
% GitHub CI
\begin{itemize}
\item XPC package is not published on a public Maven repository
\item There has been a pull request that was merged to the \textit{develop} branch
that provides Maven POMs~\cite{xpc:pom}. However, the maintainer for the
project, at the time, did not have enough time to figure out the process of
publishing the package to a Maven repository~\cite{xpc:pom-time}
\item Therefore, had to find an alternative way to implement
\item Jitpack~\cite{jitpack}
\begin{itemize}
\item In theory, simple to publish a repository, all that is required is a GitHub
repository and searching if one has already been created on JitPack or build and publish
a specific version
\item However, due to the structure of the XPC repository, JitPack could not locate the
build tools (Apache Maven in this case) as JitPack only searches on the root directory
for the compatible build tools
\end{itemize}
\item Gradle gitRepository~\cite{gradle:gitRepository}
\begin{itemize}
\item There was not a lot of documentation
\item Ambiguous on how to define directory for where the Java library is located in the Git repository
\item However, as XPC was only built with Maven, Gradle was not able add the dependency as \verb|gitRepository()|
only works with Gradle builds~\cite{gradle:gitRepoGradleOnly}
\end{itemize}
\item Resorted to using a compiled Jar file and adding the dependency to Gradle
\item Not happy about that because it means maintaining it will be more difficult as
it is not as simple as just changing the version number
\item Later, resorted to adding Gradle build files to XPC
\item Used automatic conversion from Maven to Gradle using \verb|gradle init| command~\cite{gradle:migratePOM}
\item Had to add local dependencies due to how Gradle works differently
\item Had to fix previous structure of Maven POM as the grouping as not good
\end{itemize}
\subsection{Submitting a Pull Request} \subsection{Submitting a Pull Request}

Binary file not shown.

View File

@ -223,3 +223,56 @@
urldate = {2024-05-13}, urldate = {2024-05-13},
} }
@online{xpc:pom,
author = {Mike Frizzell},
title = {Maven Folder Structure Re-org by frizman21 · Pull Request \#227 ·
nasa/XPlaneConnect},
url = {https://github.com/nasa/XPlaneConnect/pull/227},
urldate = {2024-05-13},
}
@online{xpc:pom-time,
author = {Jason Watkins},
title = {Publish Java library to maven repo · Issue \#223 · nasa/XPlaneConnect
- Comment},
url = {https://github.com/nasa/XPlaneConnect/issues/223#issuecomment-870819396
},
urldate = {2024-05-13},
}
@online{jitpack,
author = {JitPack},
title = {JitPack | Publish JVM and Android libraries},
url = {https://jitpack.io/},
urldate = {2024-05-13},
}
@online{gradle:gitRepository,
author = {Gradle Inc.},
title = {gitRepository},
url = {
https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.vcs/-source-control/git-repository.html
},
urldate = {2024-05-13},
}
@manual{gradle:migratePOM,
author = {Gradle Inc.},
title = {Migrating Builds From Apache Maven},
version = {8.7},
year = {2023},
url = {
https://docs.gradle.org/current/userguide/migrating_from_maven.html#migmvn:automatic_conversion
},
}
@online{gradle:gitRepoGradleOnly,
author = {Jendrik Johannes},
title = {Git repository at <url> did not contain a project publishing the
specified dependency},
url = {
https://discuss.gradle.org/t/git-repository-at-url-did-not-contain-a-project-publishing-the-specified-dependency/34019/2
},
urldate = {2024-05-13},
}