]
Michal Matloka commented on SHRINKRES-192:
------------------------------------------
Hi,
I will try to check why they are not available in embedded build. Have you tried also
passing them via -D ? (
embedded gradle shrinkwrap-resolver - propagate project properties
via API
--------------------------------------------------------------------------
Key: SHRINKRES-192
URL:
https://issues.jboss.org/browse/SHRINKRES-192
Project: ShrinkWrap Resolvers
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Environment: gradle 1.12, jdk 1.7_u45, fedora,
org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-gradle-embedded-archive:2.2.0-alpha-1
Reporter: Peter Butkovic
Assignee: Michal Matloka
Labels: gradle
I'd like to propagate project properties to embedded gradle build.
I tried following:
{code}
ShrinkWrap.create(EmbeddedGradleImporter.class)
.forThisProjectDirectory().forTasks("build").withArguments("-x",
"test", "-Psomepropname=somepropvalue")
.importBuildOutput().as(WebArchive.class)
{code}
but the {{somepropname}} is not set in embedded build.
Using the gradle.properties is not an option for me, as {{somepropname}} value changes
from build to build.
Workaround was to write temp properties file and read it in embedded build with silent
failure (as suggested here:
http://issues.gradle.org/browse/GRADLE-1419?focusedCommentId=16245&pa...)
but that sounds too much work to do for such a simple task.