You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ws...@apache.org on 2005/09/01 07:59:48 UTC

svn commit: r265659 - in /struts/shale/trunk: -project.xml build.properties.sample core-library/project.xml jsfri-project.xml maven.xml myfaces-project.xml project.properties project.xml use-cases/maven.xml use-cases/project.xml

Author: wsmoak
Date: Wed Aug 31 22:59:36 2005
New Revision: 265659

URL: http://svn.apache.org/viewcvs?rev=265659&view=rev
Log:
Reworked the Maven build files for Shale

- Modified myfaces-project.xml and added jsfri-project.xml as top-level project files that express dependencies on a particular JSF implementation.

- Changed project.xml to inherit from ${maven.shale.jsf.impl}-project.xml, which should be one of either myfaces-project.xml or jsfri-project.xml.  Thanks to Jay Hartley on maven-user for this suggestion!

- Added '-project.xml' for the case where maven.shale.jsf.impl is not specified.  It looks to 'maven.shale.jsf.impl.default' in project.properties for a value, and inherits from that project file.

- Removed Maven properties from build.properties.sample and classpath modifications based on those properties from maven.xml.

- Removed duplicate spring-web dependency and added URLs for all Spring jars in core-library/project.xml

- Reworked scripting to modify web.xml for use-cases app.  Instead of checking to see if a particular class is available, it uses the value of 'maven.shale.jsf.impl'.  This is not currently working when maven.shale.jsf.impl is set to 'jsfri'.


Added:
    struts/shale/trunk/-project.xml
    struts/shale/trunk/jsfri-project.xml
Modified:
    struts/shale/trunk/build.properties.sample
    struts/shale/trunk/core-library/project.xml
    struts/shale/trunk/maven.xml
    struts/shale/trunk/myfaces-project.xml
    struts/shale/trunk/project.properties
    struts/shale/trunk/project.xml
    struts/shale/trunk/use-cases/maven.xml
    struts/shale/trunk/use-cases/project.xml

Added: struts/shale/trunk/-project.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/-project.xml?rev=265659&view=auto
==============================================================================
--- struts/shale/trunk/-project.xml (added)
+++ struts/shale/trunk/-project.xml Wed Aug 31 22:59:36 2005
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!-- 
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ -->
+
+<project>
+
+  <extend>${maven.shale.jsf.impl.default}-project.xml</extend>
+
+  <description>
+  This file exists to protect against the case where no value was supplied for
+  the 'maven.shale.jsf.impl' property.  If that happens, we'll look to the 
+  default value set in project.properties, and inherit from that project file.
+  </description>
+
+  <shortDescription>Shale Framework with default JSF Implementation</shortDescription>
+  
+  <!-- dependencies are inherited from the default project file -->
+  <dependencies />
+
+</project>

Modified: struts/shale/trunk/build.properties.sample
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/build.properties.sample?rev=265659&r1=265658&r2=265659&view=diff
==============================================================================
--- struts/shale/trunk/build.properties.sample (original)
+++ struts/shale/trunk/build.properties.sample Wed Aug 31 22:59:36 2005
@@ -74,14 +74,3 @@
 webflow.home=/usr/local/spring-webflow-pr4
 spring-webflow.jar=${webflow.home}/spring-webflow-pr4.jar
 
-####  Maven build properties ####
-
-# The location and names of the JSF api and implementation JAR files
-maven.shale.jsf.api.jar=${maven.repo.local}/myfaces/jars/myfaces-jsf-api-1.0.9.jar
-maven.shale.jsf.impl.jar=${maven.repo.local}/myfaces/jars/myfaces-impl-1.0.9.jar
-
-# Alternately, if you have downloaded and installed the JavaServer Faces
-# Reference Implementation into your local repository (or elsewhere) you may use:
-#maven.shale.jsf.api.jar=${maven.repo.local}/jsf/jars/jsf-api-1.1.jar
-#maven.shale.jsf.impl.jar=${maven.repo.local}/jsf/jars/jsf-impl-1.1.jar
-

Modified: struts/shale/trunk/core-library/project.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/project.xml?rev=265659&r1=265658&r2=265659&view=diff
==============================================================================
--- struts/shale/trunk/core-library/project.xml (original)
+++ struts/shale/trunk/core-library/project.xml Wed Aug 31 22:59:36 2005
@@ -108,13 +108,6 @@
       </dependency>
 
       <dependency>
-        <groupId>springframework</groupId>
-        <artifactId>spring-web</artifactId>
-        <version>1.1.5</version>
-        <url>http://www.springframework.org/</url>
-      </dependency>
-
-      <dependency>
         <groupId>tiles</groupId>
         <artifactId>tiles-core</artifactId>
         <version>SNAPSHOT</version>
@@ -144,90 +137,105 @@
         <groupId>springframework</groupId>
         <artifactId>spring</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-aop</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-beans</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-context</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-core</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-dao</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-hibernate</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-jdbc</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-mock</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-orm</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-remoting</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-support</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-web</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-webmvc</artifactId>
         <version>1.2.2</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
       <dependency>
         <groupId>springframework</groupId>
         <artifactId>spring-webflow</artifactId>
         <version>PR4</version>
+        <url>http://www.springframework.org/download</url>
       </dependency>
 
   </dependencies>

Added: struts/shale/trunk/jsfri-project.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/jsfri-project.xml?rev=265659&view=auto
==============================================================================
--- struts/shale/trunk/jsfri-project.xml (added)
+++ struts/shale/trunk/jsfri-project.xml Wed Aug 31 22:59:36 2005
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!-- 
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ -->
+
+<project>
+
+  <description>
+  This project file declares dependencies on the JavaServer Faces Reference
+  Implementation.  To build the Shale Framework project with MyFaces, use
+  maven.shale.jsf.impl=jsfri
+  </description>
+
+  <shortDescription>Shale Framework with JSF RI</shortDescription>
+  
+  <dependencies>
+  
+    <dependency>
+      <groupId>javax.faces</groupId>
+      <artifactId>jsf-api</artifactId>
+      <version>1.1</version>
+      <url>http://java.sun.com/j2ee/javaserverfaces/</url>
+        <properties>
+          <war.bundle>true</war.bundle>
+        </properties>
+      </dependency>
+
+    <dependency>
+      <groupId>javax.faces</groupId>
+      <artifactId>jsf-impl</artifactId>
+      <version>1.1</version>
+      <url>http://java.sun.com/j2ee/javaserverfaces/</url>
+        <properties>
+          <war.bundle>true</war.bundle>
+        </properties>
+    </dependency>
+
+  </dependencies>
+
+</project>

Modified: struts/shale/trunk/maven.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/maven.xml?rev=265659&r1=265658&r2=265659&view=diff
==============================================================================
--- struts/shale/trunk/maven.xml (original)
+++ struts/shale/trunk/maven.xml Wed Aug 31 22:59:36 2005
@@ -19,27 +19,5 @@
    <postGoal name="dist">
       <attainGoal name="jar:install"/>
    </postGoal>
-   
-   <!-- Pick up the choice of JSF implementation from properties -->
-   <goal name="shale-jsf">
-       <ant:path id="shale.jsf.path">
-         <ant:pathelement path="${maven.shale.jsf.api.jar}"/>
-         <ant:pathelement path="${maven.shale.jsf.impl.jar}"/>
-       </ant:path>
-       <ant:echo>Using JSF api: ${maven.shale.jsf.api.jar}</ant:echo>
-       <ant:echo>Using JSF impl: ${maven.shale.jsf.impl.jar}</ant:echo>
-   </goal>
-   
-   <!-- Include the correct JSF implementation in the compile classpath -->
-   <preGoal name="java:compile">
-     <attainGoal name="shale-jsf"/>
-     <maven:addPath id="maven.dependency.classpath" refid="shale.jsf.path"/>
-   </preGoal>
-   
-   <!-- Include the correct JSF implementation in the test classpath -->
-   <preGoal name="test:compile">
-     <attainGoal name="shale-jsf"/>
-     <maven:addPath id="maven.dependency.classpath" refid="shale.jsf.path"/>
-   </preGoal>
-   
-</project>
\ No newline at end of file
+
+</project>

Modified: struts/shale/trunk/myfaces-project.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/myfaces-project.xml?rev=265659&r1=265658&r2=265659&view=diff
==============================================================================
--- struts/shale/trunk/myfaces-project.xml (original)
+++ struts/shale/trunk/myfaces-project.xml Wed Aug 31 22:59:36 2005
@@ -18,21 +18,14 @@
  -->
 
 <project>
-  <pomVersion>3</pomVersion>
-  <name>MyFaces Download</name>
 
   <description>
-  This project file will download the MyFaces JSF Implementation and install
-  the files in your local Maven repository.  Use it with the '-p' command-line
-  switch:  $ maven -p myfaces.project.xml
-  This dependency is NOT declared as part of the Shale build files.  
-  Instead you must choose a JavaServer Faces implementation and provide the 
-  full path and name of the .jar files as 'maven.shale.jsf.api.jar' and 
-  'maven.shale.jsf.impl.jar'.  
-  See the build.properties.sample file for more information.
+  This project file declares dependencies on the Apache MyFaces JSF
+  Implementation.  To build the Shale Framework project with MyFaces, use
+  maven.shale.jsf.impl=myfaces
   </description>
 
-  <shortDescription>Download MyFaces JSF Implementation files</shortDescription>
+  <shortDescription>Shale Framework with MyFaces</shortDescription>
   
   <dependencies>
   
@@ -41,14 +34,30 @@
       <artifactId>myfaces-jsf-api</artifactId>
       <version>1.0.9</version>
       <url>http://myfaces.apache.org/</url>
-    </dependency>
+        <properties>
+          <war.bundle>true</war.bundle>
+        </properties>
+      </dependency>
     
     <dependency>
       <groupId>myfaces</groupId>
       <artifactId>myfaces-impl</artifactId>
       <version>1.0.9</version>
       <url>http://myfaces.apache.org/</url>
+        <properties>
+          <war.bundle>true</war.bundle>
+        </properties>
     </dependency>
+
+    <dependency>
+      <groupId>myfaces</groupId>
+      <artifactId>myfaces-extensions</artifactId>
+      <version>1.0.9</version>
+      <url>http://myfaces.apache.org/</url>
+        <properties>
+          <war.bundle>true</war.bundle>
+        </properties>
+      </dependency>
 
   </dependencies>
 

Modified: struts/shale/trunk/project.properties
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/project.properties?rev=265659&r1=265658&r2=265659&view=diff
==============================================================================
--- struts/shale/trunk/project.properties (original)
+++ struts/shale/trunk/project.properties Wed Aug 31 22:59:36 2005
@@ -12,4 +12,4 @@
 maven.multiproject.includes = */project.xml
 maven.multiproject.aggregateDir = 
 
-
+maven.shale.jsf.impl.default=myfaces

Modified: struts/shale/trunk/project.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/project.xml?rev=265659&r1=265658&r2=265659&view=diff
==============================================================================
--- struts/shale/trunk/project.xml (original)
+++ struts/shale/trunk/project.xml Wed Aug 31 22:59:36 2005
@@ -19,6 +19,7 @@
 -->
 
 <project>
+  <extend>${maven.shale.jsf.impl}-project.xml</extend>
   <pomVersion>3</pomVersion>
   <id>shale</id>
   <groupId>shale</groupId>

Modified: struts/shale/trunk/use-cases/maven.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/use-cases/maven.xml?rev=265659&r1=265658&r2=265659&view=diff
==============================================================================
--- struts/shale/trunk/use-cases/maven.xml (original)
+++ struts/shale/trunk/use-cases/maven.xml Wed Aug 31 22:59:36 2005
@@ -12,12 +12,10 @@
 
   <preGoal name="war:war">
 
-      <ant:available   property="myfaces.present"
-                       classname="org.apache.myfaces.config.MyfacesConfig"
-                       classpath="${maven.shale.jsf.impl.jar}"/>
-
-       <j:if test="${myfaces.present}">
-           <ant:echo>MyFaces JSF Implementation present: ${myfaces.present} </ant:echo>
+       <ant:echo>maven.shale.jsf.impl is ${maven.shale.jsf.impl}</ant:echo>
+  
+       <j:if test="${maven.shale.jsf.impl=='myfaces' || maven.shale.jsf.impl==null}">
+           <ant:echo>Building Use Cases with Apache MyFaces</ant:echo>
            <ant:replace  dir="${maven.war.webapp.dir}/WEB-INF"
                          token="MYFACES_BEGIN"
                          value="&lt;!-- MyFaces Listener --&gt;"/>
@@ -26,12 +24,8 @@
                          value=""/>
        </j:if>
 
-      <ant:available     property="jsfri.present"
-                         classname="com.sun.faces.RIConstants"
-                         classpath="${maven.shale.jsf.impl.jar}"/>
-
-      <j:if test="${jsfri.present}">
-          <ant:echo>JSF Reference Implementation present: ${jsfri.present} </ant:echo>
+      <j:if test="${maven.shale.jsf.impl=='jsfri'}">
+          <ant:echo>Building Use Cases with JSF Reference Implementation</ant:echo>
           <ant:replace  dir="${maven.war.webapp.dir}/WEB-INF"
                         token="MYFACES_BEGIN"
                         value="&lt;!-- MyFaces Listener"/>
@@ -39,12 +33,6 @@
                         token="MYFACES_END"
                         value="--&gt;"/>
       </j:if>
-
-      <!-- Include the JSF api and implementation in the webapp -->
-      <ant:copy todir="${maven.war.webapp.dir}/WEB-INF/lib/" overwrite="false"
-              file="${maven.shale.jsf.api.jar}"/>
-      <ant:copy todir="${maven.war.webapp.dir}/WEB-INF/lib/" overwrite="false"
-              file="${maven.shale.jsf.impl.jar}"/>
 
         <!-- Include source code in the .war file -->
         <ant:copy todir="${maven.war.webapp.dir}/WEB-INF/src/" overwrite="false">

Modified: struts/shale/trunk/use-cases/project.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/use-cases/project.xml?rev=265659&r1=265658&r2=265659&view=diff
==============================================================================
--- struts/shale/trunk/use-cases/project.xml (original)
+++ struts/shale/trunk/use-cases/project.xml Wed Aug 31 22:59:36 2005
@@ -21,7 +21,7 @@
 
   <extend>../project.xml</extend>
   <id>use-cases</id>
-  <artifactId>struts-shale-usecases</artifactId>
+  <artifactId>shale-usecases</artifactId>
   <name>Shale Use Cases</name>
   
   <build>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org