Commits

Fredrik Johansson committed fddb55c

No more final classes. All warnings suppressed. Source artifact should now be included in deploys

  • Participants
  • Parent commits f53bba7

Comments (0)

Files changed (2)

maven/protocol-generator-plugin/src/main/scripts/java_generator.rb

     end
     
     wi("@SuppressWarnings(\"unused\")")
-    wi("public#{static_tag} final class #{camelcasetype(name)}#{parent_tag}#{visitable_tag} {")
+    wi("public#{static_tag} class #{camelcasetype(name)}#{parent_tag}#{visitable_tag} {")
     @indent_level += 1
     if !class_id.to_s.empty?
       wi("public int classId() {")
   end
   
   def object_factory(structs, version)
-    wi("public final class ProtocolObjectFactory implements com.cubeia.firebase.io.ObjectFactory {")
+  	wi("@SuppressWarnings(\"unused\")")
+    wi("public class ProtocolObjectFactory implements com.cubeia.firebase.io.ObjectFactory {")
     wi("public int version() {",1)
     wi("return #{version};",2)
     wi("}",1)
   
   # Create Visitor interface
   def object_visitor(structs, version)
+  	wi("@SuppressWarnings(\"unused\")")
     wi("public interface PacketVisitor extends ProtocolObjectVisitor {")
     structs.each do |struct|
       wi("public void visit(#{camelcasetype(struct.name)} packet);",1)
   end
   
   def JavaOut.generate_enums(f, enums)
+  	f.write("@SuppressWarnings(\"unused\")")
     f.write("public final class Enums {\n")
     f.write("    private Enums() {}\n\n")
     enums.each_pair do |enum, values|
-<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">
+<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">
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>com.cubeia.styx</groupId>
 	<artifactId>styx-root</artifactId>
 	<name>Cubeia Styx</name>
 	<version>1.13-SNAPSHOT</version>
 	<url>http://www.cubeia.com</url>
-	  
+
 	<organization>
-	  <name>Cubeia Ltd</name>
-	  <url>http://www.cubeia.com/</url>
+		<name>Cubeia Ltd</name>
+		<url>http://www.cubeia.com/</url>
 	</organization>
-	
+
 	<modules>
 		<module>maven</module>
 		<module>core</module>
 			<distribution>repo</distribution>
 		</license>
 	</licenses>
-	
+
 	<build>
-	  <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                </configuration>
-            </plugin>
-         	<plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <configuration>
-                  <attach>true</attach>
-                </configuration>
-                <executions>
-                  <execution>
-                    <id>attach-sources</id>
-                    <phase>${attachPhase}</phase>
-                    <goals>
-                      <goal>jar</goal>
-                    </goals>
-                  </execution>
-                </executions>
-              </plugin>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<configuration>
+					<attach>true</attach>
+				</configuration>
+				<executions>
+					<execution>
+						<id>attach-sources</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-javadoc-plugin</artifactId>
 					<autoVersionSubmodules>true</autoVersionSubmodules>
 				</configuration>
 			</plugin>
-        </plugins>
-    </build>
-	
-  <distributionManagement>
-    <repository>
-      <id>cubeia-nexus</id>
-      <name>Internal Release Repository</name>
-      <url>http://m2.cubeia.com/nexus/content/repositories/foss-releases/</url>
-    </repository>
-    <snapshotRepository>
-      <id>cubeia-nexus</id>
-      <name>Internal Snapshot Repository</name>
-      <url>http://m2.cubeia.com/nexus/content/repositories/foss-snapshots/</url>
-    </snapshotRepository>
-  </distributionManagement>
+			
+			<plugin> 
+			<!-- explicitly define maven-deploy-plugin after other to force exec order -->
+			  <artifactId>maven-deploy-plugin</artifactId> 
+			  <executions> 
+			    <execution> 
+			      <id>deploy</id>
+			      <phase>deploy</phase>
+			      <goals><goal>deploy</goal></goals> 
+			    </execution> 
+			  </executions> 
+			</plugin>
+		</plugins>
+	</build>
 
-  <repositories>
-    <repository>
-      <id>cubeia-nexus</id>
-      <url>http://m2.cubeia.com/nexus/content/groups/public/</url>
-      <releases>
-        <enabled>true</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
+	<distributionManagement>
+		<repository>
+			<id>cubeia-nexus</id>
+			<name>Internal Release Repository</name>
+			<url>http://m2.cubeia.com/nexus/content/repositories/foss-releases/</url>
+		</repository>
+		<snapshotRepository>
+			<id>cubeia-nexus</id>
+			<name>Internal Snapshot Repository</name>
+			<url>http://m2.cubeia.com/nexus/content/repositories/foss-snapshots/</url>
+		</snapshotRepository>
+	</distributionManagement>
 
-  <pluginRepositories>
-    <pluginRepository>
-      <id>cubeia-nexus</id>
-      <url>http://m2.cubeia.com/nexus/content/groups/public/</url>
-      <releases>
-        <enabled>true</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </pluginRepository>
-  </pluginRepositories>
-  
-  <scm>
-    <connection>scm:hg:https://bitbucket.org/cubeia/cubeia-styx</connection>
-    <developerConnection>scm:hg:https://bitbucket.org/cubeia/cubeia-styx</developerConnection>
-  </scm> 
+	<repositories>
+		<repository>
+			<id>cubeia-nexus</id>
+			<url>http://m2.cubeia.com/nexus/content/groups/public/</url>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+		</repository>
+	</repositories>
+
+	<pluginRepositories>
+		<pluginRepository>
+			<id>cubeia-nexus</id>
+			<url>http://m2.cubeia.com/nexus/content/groups/public/</url>
+			<releases>
+				<enabled>true</enabled>
+			</releases>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+		</pluginRepository>
+	</pluginRepositories>
+
+	<scm>
+		<connection>scm:hg:https://bitbucket.org/cubeia/cubeia-styx</connection>
+		<developerConnection>scm:hg:https://bitbucket.org/cubeia/cubeia-styx</developerConnection>
+	</scm>
 </project>