[webbeans-commits] Webbeans SVN: r2512 - in examples/trunk/se/hello-world: src/main/java/org/jboss/webbeans/environment/se/example/simple and 1 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Apr 19 05:50:32 EDT 2009


Author: peteroyle
Date: 2009-04-19 05:50:29 -0400 (Sun, 19 Apr 2009)
New Revision: 2512

Removed:
   examples/trunk/se/hello-world/src/test/java/com/
Modified:
   examples/trunk/se/hello-world/pom.xml
   examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/CommandLineArgsValidator.java
Log:
Fixed bug where CommandLineArgsValidator would try to clear the non modifiable list of all parameters is any params were invalid.
Removed legacy packages and empty unit test.
Removed JUnit dependency and added 'run' goal to the POM, though not yet sure how to pass command line parameters.

Modified: examples/trunk/se/hello-world/pom.xml
===================================================================
--- examples/trunk/se/hello-world/pom.xml	2009-04-18 21:50:57 UTC (rev 2511)
+++ examples/trunk/se/hello-world/pom.xml	2009-04-19 09:50:29 UTC (rev 2512)
@@ -1,107 +1,84 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <parent>
-        <artifactId>parent</artifactId>
+        <artifactId>webbeans-parent</artifactId>
         <groupId>org.jboss.webbeans</groupId>
         <version>1.0.0-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.jboss.webbeans</groupId>
+    <groupId>org.jboss.webbeans.examples</groupId>
     <artifactId>hello-world-se</artifactId>
     <packaging>jar</packaging>
     <name>Hello World SE</name>
-    <url>http://maven.apache.org</url>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.0.2</version>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>jalopy-maven-plugin</artifactId>
-                <version>1.0-alpha-1</version>
-                <!-- This wipes out UNDO in IDEs. Run manually instead.
-                <executions>
-                    <execution>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>format</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                -->
-            </plugin>
-            <plugin>
-                <groupId>com.google.code.maven-license-plugin</groupId>
-                <artifactId>maven-license-plugin</artifactId>
-                <version>1.4.0</version>
-                <configuration>
-                    <basedir>${basedir}</basedir>
-                    <header>${basedir}/src/etc/header.txt</header>
-                    <quiet>false</quiet>
-                    <failIfMissing>true</failIfMissing>
-                    <aggregate>false</aggregate>
-                    <encoding>UTF-8</encoding>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>format</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-    <repositories>
-        <repository>
-            <id>repository.jboss.org</id>
-            <name>JBoss Repository</name>
-            <url>http://repository.jboss.org/maven2</url>
-            <releases>
-            </releases>
-            <snapshots>
-                <enabled>false</enabled>
-            </snapshots>
-        </repository>
-        <repository>
-            <id>snapshots.jboss.org</id>
-            <name>JBoss Snapshots Repository</name>
-            <url>http://snapshots.jboss.org/maven2</url>
-            <releases>
-                <enabled>false</enabled>
-            </releases>
-            <snapshots>
-                <updatePolicy>always</updatePolicy>
-            </snapshots>
-        </repository>
-        <repository>
-            <id>repository.codehaus.org</id>
-            <name>Codehaus Repository</name>
-            <url>http://repository.codehaus.org</url>
-        </repository>
-    </repositories>
     
+    <profiles>
+        <profile>
+            <id>run</id>
+            <activation>
+                <property>
+                    <name>run</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <executions>
+                            <execution>
+                                <id>run</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <configuration>
+                            <mainClass>org.jboss.webbeans.environment.se.StartMain</mainClass>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>com.google.code.maven-license-plugin</groupId>
+                        <artifactId>maven-license-plugin</artifactId>
+                        <version>1.4.0</version>
+                        <configuration>
+                            <basedir>${basedir}</basedir>
+                            <header>${basedir}/src/etc/header.txt</header>
+                            <quiet>false</quiet>
+                            <failIfMissing>true</failIfMissing>
+                            <aggregate>false</aggregate>
+                            <encoding>UTF-8</encoding>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <phase>compile</phase>
+                                <goals>
+                                    <goal>format</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                        <plugin>
+                            <groupId>org.apache.maven.plugins</groupId>
+                            <artifactId>maven-jar-plugin</artifactId>
+                            <configuration>
+                                <archive>
+                                    <manifest>
+                                        <mainClass>org.jboss.webbeans.environment.se.StartMain</mainClass>
+                                    </manifest>
+                                </archive>
+                            </configuration>
+                        </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <dependencies>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>3.8.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.jboss.webbeans</groupId>
             <artifactId>se-module</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-            <scope>compile</scope>
         </dependency>
     </dependencies>
+
 </project>

Modified: examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/CommandLineArgsValidator.java
===================================================================
--- examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/CommandLineArgsValidator.java	2009-04-18 21:50:57 UTC (rev 2511)
+++ examples/trunk/se/hello-world/src/main/java/org/jboss/webbeans/environment/se/example/simple/CommandLineArgsValidator.java	2009-04-19 09:50:29 UTC (rev 2512)
@@ -17,9 +17,9 @@
 package org.jboss.webbeans.environment.se.example.simple;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import javax.context.ApplicationScoped;
-import javax.inject.Current;
 import javax.inject.Initializer;
 import org.jboss.webbeans.environment.se.bindings.Parameters;
 
@@ -40,7 +40,7 @@
         if (validParams.size() != 1)
         {
             errors.add( "Please supply just one parameter: your first name" );
-            validParams.clear();
+            validParams = Collections.EMPTY_LIST;
         }
     }
 




More information about the weld-commits mailing list