[
https://issues.apache.org/jira/browse/ISIS-912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14162700#comment-14162700
]
Dan Haywood commented on ISIS-912:
----------------------------------
So, to be clear....
with org.apache.isis.WebServer, can use:
a) java -cp ... org.apache.isis.WebServer -D
isis.persistor.datanucleus.install-fixtures=true --fixtures
com.mycompany.foo.MyFixtures
this is using the OptionHandlerFixture for the --fixture and the
OptionHandlerAdditionalProperty to parse the -D and load into
IsisConfiguration; the space is REQUIRED after the -D
b) java -Disis.persistor.datanucleus.install-fixtures=true -cp ...
org.apache.isis.WebServer --fixtures com.mycompany.foo.MyFixtures
this is using the OptionHandlerFixture for the --fixture and the
OptionHandlerSystemProperties to parse the -D and load into IsisConfiguration;
note that the system property is before the class name and also there must be
NO SPACE after the -D
for (b) and (c) could also use -D isis.fixtures = ... instead of --fixtures
c) java -jar myapp-jetty-console.war --initParam
isis.persistor.datanucleus.install-fixtures=true --initParam
isis.fixtures=com.mycompany.foo.MyFixtures
this is using the OptionHandlerInitParameters to load any init param named
"isis.", and loads into IsisConfiguration.
eg:
java -jar webapp/target/todoapp-webapp-1.7.0-SNAPSHOT-jetty-console.jar \
--initParam isis.persistor.datanucleus.install-fixtures=true \
--initParam isis.fixtures=fixture.todo.scenarios.RecreateToDoItemsForSven
> Not possible to specify the fixtures to be loaded from the command line (ie
> --fixture flag is broken).
> ------------------------------------------------------------------------------------------------------
>
> Key: ISIS-912
> URL: https://issues.apache.org/jira/browse/ISIS-912
> Project: Isis
> Issue Type: Bug
> Components: Core
> Affects Versions: core-1.6.0
> Reporter: Jeroen van der Wal
> Assignee: Jeroen van der Wal
> Priority: Minor
> Fix For: core-1.7.0
>
>
> In addition, need better documentation so that can see that it's also
> necessary to enable fixtures to be loaded using an additional system property
> "isis.persistor.datanucleus.install-fixtures".
> eg:
> -D isis.persistor.datanucleus.install-fixtures=true \
> --fixture org.estatio.fixture.EstatioDemoFixture \
> --type PROTOTYPE \
> --port 8080
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)