You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bi...@apache.org on 2008/12/15 20:00:02 UTC
svn commit: r726769 - in /cxf/trunk: ./ buildtools/src/main/resources/
distribution/bundle/all/ distribution/bundle/jaxrs/
distribution/bundle/minimal/ etc/eclipse/ parent/
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/
Author: bimargulies
Date: Mon Dec 15 11:00:01 2008
New Revision: 726769
URL: http://svn.apache.org/viewvc?rev=726769&view=rev
Log:
Some ignores. Checkstyle order-of-imports to match eclipse. Eclipse order-of-imports to match checkstyle. profile for
just source checks.
Added:
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java (with props)
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/bean1.xml (with props)
Modified:
cxf/trunk/buildtools/src/main/resources/cxf-checkstyle.xml
cxf/trunk/distribution/bundle/all/ (props changed)
cxf/trunk/distribution/bundle/jaxrs/ (props changed)
cxf/trunk/distribution/bundle/minimal/ (props changed)
cxf/trunk/etc/eclipse/CXFCodeFormatter.xml
cxf/trunk/parent/pom.xml
cxf/trunk/pom.xml
Modified: cxf/trunk/buildtools/src/main/resources/cxf-checkstyle.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/buildtools/src/main/resources/cxf-checkstyle.xml?rev=726769&r1=726768&r2=726769&view=diff
==============================================================================
--- cxf/trunk/buildtools/src/main/resources/cxf-checkstyle.xml (original)
+++ cxf/trunk/buildtools/src/main/resources/cxf-checkstyle.xml Mon Dec 15 11:00:01 2008
@@ -88,7 +88,7 @@
<module name="UnusedImports" />
<module name="ImportOrder">
<property name="groups"
- value="java,javax,org.w3c,org.xml,junit" />
+ value="java,javax,org.w3c,org.xml,junit,antlr,com,net,org,org.junit" />
<property name="ordered" value="true" />
</module>
<!--
Propchange: cxf/trunk/distribution/bundle/all/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 15 11:00:01 2008
@@ -0,0 +1 @@
+target
Propchange: cxf/trunk/distribution/bundle/jaxrs/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 15 11:00:01 2008
@@ -0,0 +1,2 @@
+target
+
Propchange: cxf/trunk/distribution/bundle/minimal/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 15 11:00:01 2008
@@ -0,0 +1 @@
+target
Modified: cxf/trunk/etc/eclipse/CXFCodeFormatter.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/etc/eclipse/CXFCodeFormatter.xml?rev=726769&r1=726768&r2=726769&view=diff
==============================================================================
--- cxf/trunk/etc/eclipse/CXFCodeFormatter.xml (original)
+++ cxf/trunk/etc/eclipse/CXFCodeFormatter.xml Mon Dec 15 11:00:01 2008
@@ -17,6 +17,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
@@ -124,6 +125,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
@@ -163,6 +165,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
@@ -192,6 +195,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
@@ -228,7 +232,7 @@
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
@@ -247,7 +251,6 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
Modified: cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=726769&r1=726768&r2=726769&view=diff
==============================================================================
--- cxf/trunk/parent/pom.xml (original)
+++ cxf/trunk/parent/pom.xml Mon Dec 15 11:00:01 2008
@@ -1058,6 +1058,34 @@
</profile>
<profile>
+ <!-- pmd and checkstyle, no tests. -->
+ <id>justsourcecheck</id>
+ <properties>
+ <maven.test.skip.exec>true</maven.test.skip.exec>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <compilerArgument>${compile.flags}</compilerArgument>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>setup.eclipse</id>
<build>
<defaultGoal>process-test-sources</defaultGoal>
Modified: cxf/trunk/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/pom.xml?rev=726769&r1=726768&r2=726769&view=diff
==============================================================================
--- cxf/trunk/pom.xml (original)
+++ cxf/trunk/pom.xml Mon Dec 15 11:00:01 2008
@@ -252,7 +252,7 @@
<entry key="org.eclipse.jdt.ui.text.custom_code_templates" value="${eclipse.code.templates}" />
<!-- Add import order -->
- <entry key="org.eclipse.jdt.ui.importorder" value="java;javax;org.w3c;org.xml;junit" />
+ <entry key="org.eclipse.jdt.ui.importorder" value="java;javax;org.w3c;org.xml;junit;antlr;com;net;org;org.junit;#org.junit" />
<!-- Sort order -->
<entry key="org.eclipse.jdt.ui.visibility.order" value="B,R,D,V," />
<entry key="outlinesortoption" value="T,SF,F,SI,I,C,SM,M," />
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java?rev=726769&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java Mon Dec 15 11:00:01 2008
@@ -0,0 +1,83 @@
+/**
+ * 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.
+ */
+package org.apache.cxf.aegis.type.streams;
+
+import java.io.InputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.cxf.aegis.AbstractAegisTest;
+import org.apache.cxf.aegis.AegisContext;
+import org.apache.cxf.aegis.AegisReader;
+import org.apache.cxf.aegis.Context;
+import org.apache.cxf.aegis.type.DefaultTypeMapping;
+import org.apache.cxf.aegis.type.TypeMapping;
+import org.apache.cxf.aegis.type.xml.XMLStreamReaderType;
+import org.apache.cxf.common.util.SOAPConstants;
+import org.junit.Before;
+import org.junit.Test;
+
+public class XMLStreamReaderMappingTest extends AbstractAegisTest {
+ protected DefaultTypeMapping mapping;
+ private AegisContext context;
+
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+
+ addNamespace("b", "urn:beanz");
+ addNamespace("xsi", SOAPConstants.XSI_NS);
+
+ context = new AegisContext();
+ // create a different mapping than the context creates.
+ TypeMapping baseMapping = DefaultTypeMapping.createSoap11TypeMapping(true, false);
+ mapping = new DefaultTypeMapping(SOAPConstants.XSD, baseMapping);
+ mapping.register(XMLStreamReader.class,
+ new QName("urn:Bean", "SimpleBean"), new XMLStreamReaderType());
+ mapping.setTypeCreator(context.createTypeCreator());
+ context.setTypeMapping(mapping);
+ context.initialize();
+ }
+
+ @Test
+ public void testReadStream() throws Exception {
+ // Test reading
+ InputStream is = getResourceAsStream("bean1.xml");
+ XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+ XMLStreamReader inputReader = inputFactory.createXMLStreamReader(is);
+ AegisReader<XMLStreamReader> reader = context.createXMLStreamReader();
+ Object what = reader.read(inputReader);
+ assertTrue(what instanceof XMLStreamReader);
+ XMLStreamReader beanReader = (XMLStreamReader) what;
+ beanReader.nextTag();
+ assertEquals("bleh", beanReader.getLocalName());
+ }
+
+ protected Context getContext() {
+ AegisContext globalContext = new AegisContext();
+ globalContext.initialize();
+ globalContext.setTypeMapping(mapping);
+ return new Context(globalContext);
+ }
+
+
+
+}
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/XMLStreamReaderMappingTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/bean1.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/bean1.xml?rev=726769&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/bean1.xml (added)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/bean1.xml Mon Dec 15 11:00:01 2008
@@ -0,0 +1,22 @@
+<!--
+ 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.
+-->
+<b:bean xmlns:b="urn:Bean" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="b:SimpleBean">
+ <b:bleh>bleh</b:bleh>
+ <b:howdy>howdy</b:howdy>
+</b:bean>
\ No newline at end of file
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/bean1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/bean1.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/streams/bean1.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml