Skip to content
Permalink
Browse files
Seems to have some strange command line compiler problem (OK with ecl…
…ipse compiler)

git-svn-id: https://svn.apache.org/repos/asf/cxf/xjc-utils/trunk@1543061 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dkulp committed Nov 18, 2013
1 parent 5457b93 commit 1e6cf3eaf4b0d951993b762b6abb6e4aaca6a79e
Showing 3 changed files with 13 additions and 16 deletions.
@@ -43,7 +43,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -59,4 +58,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>
@@ -18,8 +18,6 @@
*/
package org.apache.cxf.xjc.javadoc;



import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
@@ -31,6 +29,7 @@

import com.sun.tools.xjc.BadCommandLineException;
import com.sun.tools.xjc.Driver;
import com.sun.tools.xjc.Plugin;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
@@ -45,25 +44,19 @@
import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import static org.apache.cxf.xjc.javadoc.JavadocTestHelper.containsTag;
import static org.apache.cxf.xjc.javadoc.JavadocTestHelper.javadocContains;
import static org.hamcrest.CoreMatchers.any;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;

import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;

/**
* End-to-end integration test of JavadocPlugin
*
* @author Dawid Pytel
*/
public class JavadocPluginTest {
public class JavadocPluginTest extends Assert {

private static final String PACKAGE_DIR = "org/example/xjc_javadoc_plugin";
private static final String OUTPUT_DIR = "target";
@@ -80,7 +73,12 @@ public void pluginShouldBeLoaded() throws Exception {
Driver.run(new String[] {}, System.out, System.out);
fail("Expected xjc to fail with BadCommandLineException");
} catch (BadCommandLineException e) {
assertThat(e.getOptions().getAllPlugins(), hasItem(any(JavadocPlugin.class)));
for (Plugin p : e.getOptions().getAllPlugins()) {
if (p instanceof JavadocPlugin) {
return;
}
}
fail("Did not load plugin");
}
}

@@ -95,7 +95,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<version>4.11</version>
</dependency>
<dependency>
<groupId>jaxme</groupId>
@@ -239,7 +239,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<version>3.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
@@ -468,7 +468,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<version>3.1</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>

0 comments on commit 1e6cf3e

Please sign in to comment.