Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Dev/Release project support for Gradle #282

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mattbsox
Copy link
Member

@mattbsox mattbsox commented Mar 8, 2019

Added the boostApp configuration which can be used to specify files or Maven artifacts to be installed.
Will pull in transitive dependencies from Maven artifacts.
Currently only supports wars.


if (project.war.version == null) {
warName = project.war.baseName
} else {
warName = project.war.baseName + "-" + project.war.version
}
} else {
warName = getWarNameFromBoostApps()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be able to install multiple wars if we find them? Also install war both from the project and dependencies?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to use a list of war names.

return dependencies
}

public static Map<String, String> getAllDependenciesFromConfiguration(Configuration configuration, BoostLogger logger) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this method should be private since it is only called from getAllDependencies.

compile "io.openliberty.boosters:jaxrs"
compile "io.openliberty.boosters:jdbc"
compile("org.apache.httpcomponents:httpclient:4.5.6")
compile("org.apache.httpcomponents:httpcore:4.4.10")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indent

@@ -0,0 +1 @@
/META-INF/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can delete this file.


public static Map<String, String> getAllDependenciesFromConfiguration(Configuration configuration, BoostLogger logger) {
Map<String, String> dependencies = new HashMap<String, String>()
configuration.resolvedConfiguration.resolvedArtifacts.collect { it.moduleVersion.id }.each { ModuleVersionIdentifier id ->
logger.debug("Found dependency while processing project: " + id.group.toString() + ":"
+ id.name.toString() + ":" + id.version.toString())

dependencies.put(id.group.toString() + ":" + id.name.toString(), id.version.toString())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will only want to add the "booster" dependencies of the boostApp. Any non-booster dependency of the build project (like a db2 or mysql driver) should't be pulled in since it will conflict with what the dev project might be using. This is just my opinion and what I added into the maven build/release support, but I think additional runtime dependencies like that should be determined by the release project.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to only return the boosters.

@mattbsox mattbsox force-pushed the boostAppConfiguration branch 2 times, most recently from 6c4c023 to ffac928 Compare April 5, 2019 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants