Opened 14 years ago
Closed 13 years ago
#531 closed task (fixed)
Build / use maven profiles and resources filter
Reported by: | fxp | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | v2.7.0 |
Component: | General | Version: | |
Keywords: | Cc: | jesseeichar |
Description
Add profile support in maven pom.xml in order to:
- update properties (eg. version number, xsl factory) in different files (eg. config.xml, create-db-default.sql, server.prop)
- easily create custom build (eg. INSPIRE one)
Usage :
- mvn -Denv=dev
- mvn -Denv=inspire
- mvn -Denv=prod (default)
To do: apply to the installer build.xml and documentation ?
Attachments (2)
Change History (7)
by , 14 years ago
Attachment: | maven-profiles.patch added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Cc: | added |
---|
This change breaks running jetty because the filters are only ran the war is being built. I am looking into updating the jetty configuration
comment:3 by , 13 years ago
One idea is to not do the filtering in the war configuration but instead:
- move files in webResources back to webapp
- do the filtering as part of resource processing phase which copies all the webapp files to a directory in target
- update pom so that the webapp resources for both jetty and war are found in the filtered directory.
I will try to do this and create a patch.
by , 13 years ago
Attachment: | 531_fix_for_jetty.patch added |
---|
A patch so that the jetty can still be used and war will work correctly. The strategy I used was essentially the same as I described in an earlier comment
comment:4 by , 13 years ago
I found a problem with my patch. the line:
<directory>src/main/webResources</directory>
must be changed to
<directory>${basedir}/src/main/webResources</directory>
and
<filter>src/main/filters/${env}.properties</filter>
must be changed to
<filter>${basedir}/src/main/filters/${env}.properties</filter>
(after the previous patch has been applied)
And while applying previous patch you will probably have to apply it from web project as follows:
web> patch -p1 < 531_fix_for_jetty.patch
Committed revision 8062.