maven - Deploy as ROOT and SpringLoaded Hippo CMS -


spring loaded has been working fine me until switched deploy root. (to rid of "/site" in urls of website)

i've modified original config brought jeroen here it's not working. (the files under ${project.basedir}/target/tomcat7x/webapps/root not updated , website referring outdated source instead of up-to-date ${project.basedir}/site/target/root)

what missing?

my ${project.basedir}/pom.xml:

<profile>   <id>cargo.run</id>   <build>     <plugins>       <plugin>         <groupid>org.apache.maven.plugins</groupid>         <artifactid>maven-resources-plugin</artifactid>         <executions>           <execution>             <id>copy-tomcat-resources</id>             <phase>validate</phase>             <goals>               <goal>copy-resources</goal>             </goals>             <configuration>               <outputdirectory>${project.build.directory}/contexts</outputdirectory>               <resources>                 <resource>                   <directory>conf</directory>                   <includes>                     <include>*-context.xml</include>                   </includes>                   <filtering>true</filtering>                 </resource>               </resources>             </configuration>           </execution>         </executions>       </plugin>       <plugin>         <groupid>org.codehaus.cargo</groupid>           <artifactid>cargo-maven2-plugin</artifactid>           <configuration>             <configuration>               <properties>                 <cargo.jvmargs>-xmx1920m -xdebug -xrunjdwp:transport=dt_socket,address=${cargo.debug.address},server=y,suspend=${cargo.debug.suspend} -noverify -javaagent:/users/eric/libs/springloaded.jar ${cargo.jvm.args}</cargo.jvmargs>               </properties>               <configfiles>                 <configfile>                   <file>${project.build.directory}/contexts/site-context.xml</file>                   <todir>conf/catalina/localhost/</todir>                   <tofile>site.xml</tofile>                 </configfile>               </configfiles>             </configuration>           </configuration>         </plugin>       ...     </plugins>   </build> </profile> 

my ${project.basedir}/site/pom.xml

<finalname>root</finalname> ... <plugin>         <groupid>com.googlecode.mavenfilesync</groupid>         <artifactid>maven-filesync-plugin</artifactid>         <configuration>           <mappings>             <mapping>               <sourcefolder>src/main/resources</sourcefolder>               <destinationfolder>@../target/tomcat${cargo.tomcat.major.version}x/webapps/site/web-inf/classes</destinationfolder>             </mapping>             <mapping>               <sourcefolder>src/main/webapp</sourcefolder>               <destinationfolder>@../target/tomcat${cargo.tomcat.major.version}x/webapps/site</destinationfolder>             </mapping>           </mappings>         </configuration>       </plugin> 

${project.basedir}/conf/site-context.xml (i've tried having both path empty string , "/" , neither works)

<?xml version="1.0" encoding="utf-8"?> <context path="/" docbase="${project.basedir}/site/target/root">      <loader classname="org.apache.catalina.loader.virtualwebapploader" searchvirtualfirst="true"             virtualclasspath="${project.basedir}/site/target/classes" />  </context> 

because renamed deployed application root might need change name of site-context.xml root.xml. according tomcat context docs it's required match war files name.

<plugin>   <groupid>org.codehaus.cargo</groupid>   <artifactid>cargo-maven2-plugin</artifactid>   <configuration>     <configuration>       <properties>         <cargo.jvmargs>-xmx1920m -xdebug -xrunjdwp:transport=dt_socket,address=${cargo.debug.address},server=y,suspend=${cargo.debug.suspend} -noverify -javaagent:/users/eric/libs/springloaded.jar ${cargo.jvm.args}</cargo.jvmargs>       </properties>       <configfiles>         <configfile>           <file>${project.build.directory}/contexts/site-context.xml</file>           <todir>conf/catalina/localhost/</todir>           <tofile>root.xml</tofile>         </configfile>       </configfiles>     </configuration>   </configuration> </plugin> 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -