Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Using Maven overlay functionality, it is easy to deploy custom resources with the Resource Server. 

  1. Create a new Maven project with the resources you want to add or modify.  At Yale we wanted to include custom xsl and css required by some of our portlets, and to modify jquery-ui-1.7.2-smoothness.css to fix a bug in the accordion menu styles for IE6.  All other resources will be inherited from the Resource Server.
     src
        main
          webapp
            rs
              jqueryui
                1.7.2
                  theme
                    smoothness
                      jquery-ui-1.7.2-smoothness.css
              yale
                <custom resources>
    
  2. Create a pom for the project using the maven war plugin overlay functionality to merge the Resource  Server 1.0.3 with your project.  Note the exclusion of the .min.css file that is being modified in the custom resource project. 
           <dependencies>
            <!-- ===== Compile Time Dependencies ============================== -->
    	  	<dependency>
    	  		<groupId>org.jasig.resourceserver</groupId>
    	  		<artifactId>resource-server-webapp</artifactId>
    	  		<version>1.0.3</version>
    	  		<type>war</type>
    	  	</dependency>
        </dependencies>
    
        <build>
           <plugins>
                <plugin>
                    <groupId>net.sf.alchim</groupId>
                    <artifactId>yuicompressor-maven-plugin</artifactId>
                    <version>0.7.1</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>compress</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <excludes>
                            <exclude>**/*.min.js</exclude>
                            <exclude>**/*.min.css</exclude>
                        </excludes>
                        <linebreakpos>10000</linebreakpos>
                        <suffix>.min</suffix>
                    </configuration>
                </plugin>
               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1-beta-1</version>
                    <configuration>
                        <nonFilteredFileExtensions>
                            <!-- default value contains jpg,jpeg,gif,bmp,png -->
                            <nonFilteredFileExtension>jar</nonFilteredFileExtension>
                            <nonFilteredFileExtension>class</nonFilteredFileExtension>
                        </nonFilteredFileExtensions>
                        <overlays>
    			 <overlay>
    			    <groupId>org.jasig.resourceserver</groupId>
    			    <artifactId>resource-server-webapp</artifactId>
    			    <filtered>false</filtered>
    			</overlay>
                        </overlays>
                        <dependentWarExcludes>**/jquery-ui-1.7.2-smoothness.min.css</dependentWarExcludes>
                    </configuration>
                </plugin>
              </plugins>
         </build>
    
    
  3. Add the custom resource server to your UPortal installation. 
  4.  
  • No labels