You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2009/07/30 05:51:19 UTC

svn commit: r799163 - in /myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets: ./ src/main/resources/META-INF/maven/ src/main/resources/archetype-resources/ src/main/resources/archetype-resources/src/main/java/org/...

Author: lu4242
Date: Thu Jul 30 03:51:19 2009
New Revision: 799163

URL: http://svn.apache.org/viewvc?rev=799163&view=rev
Log:
MYFACES-2295 Add debug maven profile for myfaces archetypes when using jetty

Added:
    myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/log4j/
    myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/log4j/log4j.properties   (with props)
    myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/resources/
Removed:
    myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/java/org/
Modified:
    myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/   (props changed)
    myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/META-INF/maven/archetype.xml
    myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/pom.xml

Propchange: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Jul 30 03:51:19 2009
@@ -6,3 +6,5 @@
 *.iml
 *.iws
 .settings
+.externalToolBuilders
+maven-eclipse.xml

Modified: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/META-INF/maven/archetype.xml
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/META-INF/maven/archetype.xml?rev=799163&r1=799162&r2=799163&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/META-INF/maven/archetype.xml (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/META-INF/maven/archetype.xml Thu Jul 30 03:51:19 2009
@@ -9,7 +9,7 @@
      -->
   </testSources>
   <resources>
-    <resource>pom.xml</resource>
+    <resource>src/main/log4j/log4j.properties</resource>
   	<resource>src/main/webapp/WEB-INF/examples-config.xml</resource>
   	<resource>src/main/webapp/WEB-INF/web.xml</resource>
   	<resource>src/main/webapp/helloWorld.xhtml</resource>

Modified: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/pom.xml?rev=799163&r1=799162&r2=799163&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/pom.xml (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/pom.xml Thu Jul 30 03:51:19 2009
@@ -11,6 +11,13 @@
     <name>A custom project using myfaces</name>
     <url>http://www.myorganization.org</url>
 
+    <properties>
+        <jsf-myfaces.version>1.2.7</jsf-myfaces.version>
+        <jsf-ri.version>1.2_13</jsf-ri.version>        
+        <maven.jetty.plugin.version>6.1.16</maven.jetty.plugin.version>
+        <log4j.version>1.2.13</log4j.version>
+    </properties>
+
     <build>
         <finalName>${artifactId}</finalName>
         <plugins>
@@ -18,13 +25,101 @@
                 <!--This plugin allows to run the example using mvn jetty:run -->
                 <groupId>org.mortbay.jetty</groupId>
                 <artifactId>maven-jetty-plugin</artifactId>
-                <version>6.1.8</version>
+                <version>${maven.jetty.plugin.version}</version>
                 <configuration>
                     <scanIntervalSeconds>10</scanIntervalSeconds>
                 </configuration>
             </plugin>
         </plugins>
     </build>
+    
+    <profiles>
+        <profile>
+            <id>myfaces</id>
+            <activation>
+                <property>
+                    <name>!jsf</name>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.myfaces.core</groupId>
+                    <artifactId>myfaces-api</artifactId>
+                    <version>${jsf-myfaces.version}</version>
+                    <scope>compile</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.myfaces.core</groupId>
+                    <artifactId>myfaces-impl</artifactId>
+                    <version>${jsf-myfaces.version}</version>
+                    <scope>compile</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <!-- Active adding -Djsf=ri when execute maven goals. -->
+            <id>jsf-ri</id>
+            <activation>
+                <property>
+                    <name>jsf</name>
+                    <value>ri</value>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>javax.faces</groupId>
+                    <artifactId>jsf-api</artifactId>
+                    <version>${jsf-ri.version}</version>
+                </dependency>
+                <dependency>
+                    <groupId>javax.faces</groupId>
+                    <artifactId>jsf-impl</artifactId>
+                    <version>${jsf-ri.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+        
+        <profile>
+            <!-- Debug profile for myfaces and jetty.
+                It allows to see debug messages using -PjettyConfig -->
+            <id>jettyConfig</id>
+            <build>
+                <resources>
+                    <resource>
+                        <directory>src/main/resources</directory>
+                    </resource>
+                    <resource>
+                        <directory>src/main/log4j</directory>
+                    </resource>
+                </resources>
+                <plugins>
+                    <plugin>
+                        <!--This plugin allows to run the example using mvn jetty:run -->
+                        <groupId>org.mortbay.jetty</groupId>
+                        <artifactId>maven-jetty-plugin</artifactId>
+                        <version>${maven.jetty.plugin.version}</version>
+                        <configuration>
+                            <scanIntervalSeconds>10</scanIntervalSeconds>
+                            <systemProperties>
+                                <systemProperty>
+                                    <name>org.apache.commons.logging.Log</name>
+                                    <value>org.apache.commons.logging.impl.Log4JLogger</value>
+                                </systemProperty>
+                            </systemProperties>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+            <dependencies>
+                <dependency>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                    <version>${log4j.version}</version>
+                    <type>jar</type>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
 
     <repositories>
         <repository>
@@ -41,39 +136,19 @@
             <id>java.net</id>
             <url>http://download.java.net/maven/1</url>
             <layout>legacy</layout>
-        </repository>        
+        </repository>
     </repositories>
 
     <!-- Project dependencies -->
     <dependencies>
-        <dependency>
-            <groupId>org.apache.myfaces.core</groupId>
-            <artifactId>myfaces-api</artifactId>
-            <version>1.2.5</version>
-            <scope>compile</scope>
-        </dependency>
         
         <dependency>
-            <groupId>org.apache.myfaces.core</groupId>
-            <artifactId>myfaces-impl</artifactId>
-            <version>1.2.5</version>
-            <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <!-- Temporal fix to avoid transitive dependency to shared -->
-                    <groupId>org.apache.myfaces.shared</groupId>
-                    <artifactId>myfaces-shared-impl</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.myfaces.tomahawk</groupId>
-            <artifactId>tomahawk</artifactId>
-            <version>1.1.8</version>
+            <artifactId>tomahawk12</artifactId>
+            <version>1.1.9</version>
             <scope>runtime</scope>    
         </dependency>
-
+        
         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>jstl</artifactId>
@@ -93,5 +168,7 @@
             <version>4.0</version>
             <scope>test</scope>
         </dependency>
+
     </dependencies>
+
 </project>

Added: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/log4j/log4j.properties
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/log4j/log4j.properties?rev=799163&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/log4j/log4j.properties (added)
+++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/log4j/log4j.properties Thu Jul 30 03:51:19 2009
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+log4j.rootLogger=INFO, A1, A2
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+
+#log on a file on target too, to make easier check it
+log4j.appender.A2=org.apache.log4j.RollingFileAppender
+log4j.appender.A2.File=target/log4j.log
+log4j.appender.A2.MaxFileSize=1000KB
+# Keep one backup file
+log4j.appender.A2.MaxBackupIndex=1
+log4j.appender.A2.layout=org.apache.log4j.PatternLayout
+log4j.appender.A2.layout.ConversionPattern=%p %t %c - %m%n
+
+# Log level for myfaces libraries
+log4j.logger.org.apache.commons=INFO
+log4j.logger.org.apache.myfaces=TRACE
+log4j.logger.javax.faces=TRACE
+
+# Print the date in ISO 8601 format
+log4j.appender.A1.layout.ConversionPattern=%5p [%t] (%F\:%L) - %m%n
\ No newline at end of file

Propchange: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/log4j/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld-facelets/src/main/resources/archetype-resources/src/main/log4j/log4j.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL