开发者

Maven: filtering seam components.xml in target directory

I'm trying to convert an Ant project to Maven. The existing build uses Ant-style properties in src/main/webapp/WEB-INF/components.xml, which is a Seam file.

I'm able to get the properties expanded in the actual resulting war file, via the maven-war-plugin. But I can't seem to get the properties expanded in target/myproject/WEB-INF/components.xml.

This means that when I try to run the Jetty plugin, it doesn't see the expanded properties.

I tried defining the properties in both an external file, and also right in the build. My profile section looks like the following:

  <profiles>
      <profile>
          <id>dev</id>

          <activation>
              <activeByDefault>true</activeByDefault>
          </activation>

          <build>
              <filters>
                  <filter>src/main/filters/components-dev.properties</filter>
              </filters>
          </build>

        <properties>
            <debug>true</debug>
            <开发者_StackOverflow中文版jndiPattern>FOO</jndiPattern>
        </properties>

       </profile>
  </profiles>


When you run mvn jetty:run it executes the lifecycle up through test-compile. The web resources don't get filtered until the war plugin runs as part of package. I found a question on stackoverflow that seems similar, does that solution work for you?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜