Ate Douma wrote:
Frank Otto wrote:
Hi Ate,
now, I have a working mssql script. But how do I integrate it in my
custom portal building? I want to test it.
Hi Frank,
Assuming you're using a custom portal project generated using the
archetype there are several ways how you can do that.
I'm providing one solution below.
As an example I'll use an artifactId "MyPortal", you'll have to adjust
for your own chosen artifactId of course.
The generated MyPortal/MyPortal-portal/jetspeed-mvn-portal.xml custom
maven project file is handling the mvn jetspeed:mvn -Dtarget=db
execution which will create the database schema and seeding it.
The "db" profile within this file contains several plugin executions to
do so: <id>unpack</id>,<id>execute-sql</id> and <id>seed</id>.
If you make the following changes:
1) store your custom create-schema.sql and drop-schema.sql files under
new folder:
MyPortal/MyPortal-portal/src/sql/ddl/mssql
2) comment out the whole <execution><id>unpack<id>...</execution>
section in the "db" profile (optional, but you don't need it)
3) in the <execution><id>execute-sql</id>...</execution> section change
the two <path> elements pointing to the drop-schema.sql
and create-schema.sql by replacing the first part:
<path>${project.build.directory}/ddl/ [...]</path>
with:
<path>${basedir}/sql/ddl/ [...]</path>
Sorry, I made a typo in the example above, of course it should be:
<path>${basedir}/src/sql/ddl/ [...]</path>
instead of
<path>${basedir}/sql/ddl/ [...]</path>
you should be able to run mvn jetspeed-mvn -Dtarget=db which will then
use your custom sql instead.
Regards,
Ate
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]