[
http://jira.codehaus.org/browse/MSQL-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163641#action_163641
]
John Newman commented on MSQL-34:
---------------------------------
Depending on which environment we are deploying to, we may or may not want to
send a certain set of SQL scripts out. For example, if I am deploying to dev, I
want to send everything, all test data, run the post test script, etc. But if
I'm going to pre production, I need to skip the test data phases, but I still
have to initialize and seed the database with the procedures and some standard
data.
<configuration> <!-- global -->
<skip>${maven.test.skip}</skip>
</configuration>
<execution><id>execution1</id> <!-- always run this one -->
<execution><id>execution2</id><skip>${skipExecution2}</skip> <!-- skip for
certain environments, the active profile may set this to true -->
<execution><id>execution2</id><skip>${skipExecution3}</skip> <!-- skip for
certain environments, the active profile may set this to true -->
<profiles>
<profile>
<id>dev</id>
</profile>
<profile>
<id>pre-prod</id>
<properties>
<skipExecution2>true</skipExecution2>
<skipExecution3>true</skipExecution3>
</properties>
</profile>
</profiles>
This works fine up to this point, "mvn install", "mvn -Pdev install", and "mvn
-Ppre-prod install" work as expected. =)
The issue comes in when the developer just wants to do a quick build - skip the
tests, and leave the database as is. Running "mvn install -DskipTests=true"
behaves unexpectedly: Since the skip exec 2 & 3 properties are not set to
true, it tries to run them, but this fails since it skipped exec 1 which is a
dependency.
If this were configurable it would be sweet. If you agree I see three options
for the default:
A) If the global skip is true all executions are skipped (my vote)
B) if the global skip is true all executions are skipped UNLESS a skip property
is listed (current)
C) if the global skip is true all executions are skipped UNLESS a skip property
is listed AND it is explicitly set to false, i.e. not null (similar to current
implementation but this is more of what I would expect.
> More control over skip property - global configuration vs individual
> executions
> -------------------------------------------------------------------------------
>
> Key: MSQL-34
> URL: http://jira.codehaus.org/browse/MSQL-34
> Project: Maven 2.x SQL Plugin
> Issue Type: Wish
> Reporter: John Newman
>
> Hello,
> I'm having issues with the scope of the skip property.
> If I pass maven test skip, i don't want anything at all to run. So I have
> <configuration>
> <skip>${maven.test.skip}</skip>
> But i have a bunch of different executions, I need some of them to not run
> for certain environments.
> <execution><id>test-data</id><skip>${skipTestData}</skip>
> However if I simply run mvn -Dmaven.test.skip=true , the test data tries to
> run anyway (skip is overridden). To me, this is a bug. To others, it might
> be a feature.
> Really what is needed is a property <globalSkipOverridesIndividual> which is
> false by default. As of now I have to do -Dmaven.test.skip=true
> -DskipTestData=true, which is fine, but I have 8 or so skip lines to pass
> in...
> Thanks.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email