Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 885010 Details for
Bug 1086335
XMvn doesn't always generate requirements on Java version
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
testcase
0001-test-Add-test-for-Java-version-generation.patch (text/plain), 8.71 KB, created by
Michael Simacek
on 2014-04-10 15:42:11 UTC
(
hide
)
Description:
testcase
Filename:
MIME Type:
Creator:
Michael Simacek
Created:
2014-04-10 15:42:11 UTC
Size:
8.71 KB
patch
obsolete
>From 512601fe6f4d12ae14826fe711cb44dfd1d2acfc Mon Sep 17 00:00:00 2001 >From: Michael Simacek <msimacek@redhat.com> >Date: Thu, 10 Apr 2014 17:22:49 +0200 >Subject: [PATCH] [test] Add test for Java version generation > >Signed-off-by: Michael Simacek <msimacek@redhat.com> >--- > .../xmvn/install/JavaVersionTest.java | 76 ++++++++++++++++++++++ > .../src/test/resources/pom/jnpserver_args.pom | 59 +++++++++++++++++ > .../src/test/resources/pom/jnpserver_vars.pom | 59 +++++++++++++++++ > 3 files changed, 194 insertions(+) > create mode 100644 xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/install/JavaVersionTest.java > create mode 100644 xmvn-tools/xmvn-install/src/test/resources/pom/jnpserver_args.pom > create mode 100644 xmvn-tools/xmvn-install/src/test/resources/pom/jnpserver_vars.pom > >diff --git a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/install/JavaVersionTest.java b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/install/JavaVersionTest.java >new file mode 100644 >index 0000000..6be5855 >--- /dev/null >+++ b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/install/JavaVersionTest.java >@@ -0,0 +1,76 @@ >+/*- >+ * Copyright (c) 2013-2014 Red Hat, Inc. >+ * >+ * Licensed 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.fedoraproject.xmvn.install; >+ >+import static org.custommonkey.xmlunit.XMLUnit.setIgnoreWhitespace; >+ >+import org.junit.Test; >+ >+/** >+ * @author Michael Simacek >+ */ >+public class JavaVersionTest >+ extends AbstractInstallerTest >+{ >+ static final StringBuilder depmap = new StringBuilder(); >+ static { >+ depmap.append( "<dependencyMap>" ); >+ depmap.append( " <requiresJava>1.7</requiresJava>" ); >+ depmap.append( " <dependency>" ); >+ depmap.append( " <maven>" ); >+ depmap.append( " <groupId>org.jboss.naming</groupId>" ); >+ depmap.append( " <artifactId>jnpserver</artifactId>" ); >+ depmap.append( " <version>5.0.6.CR1</version>" ); >+ depmap.append( " </maven>" ); >+ depmap.append( " <jpp>" ); >+ depmap.append( " <groupId>JPP</groupId>" ); >+ depmap.append( " <artifactId>jnpserver</artifactId>" ); >+ depmap.append( " </jpp>" ); >+ depmap.append( " </dependency>" ); >+ depmap.append( "</dependencyMap>" ); >+ } >+ /** >+ * Test for variable expansion inside configuration >+ * >+ * @throws Exception >+ */ >+ @Test >+ public void testJavaVersionExpansion() >+ throws Exception >+ { >+ addJarArtifact( "jnpserver_vars" ); >+ performInstallation(); >+ setIgnoreWhitespace( true ); >+ assertXmlEqual( depmap, "depmaps/package.xml" ); >+ } >+ >+ /** >+ * Test for generating Java version requirement from compiler commandline >+ * arguments >+ * >+ * @throws Exception >+ */ >+ @Test >+ public void testJavaVersionArguments() >+ throws Exception >+ { >+ addJarArtifact( "jnpserver_args" ); >+ performInstallation(); >+ setIgnoreWhitespace( true ); >+ assertXmlEqual( depmap, "depmaps/package.xml" ); >+ } >+ >+} >diff --git a/xmvn-tools/xmvn-install/src/test/resources/pom/jnpserver_args.pom b/xmvn-tools/xmvn-install/src/test/resources/pom/jnpserver_args.pom >new file mode 100644 >index 0000000..22acd50 >--- /dev/null >+++ b/xmvn-tools/xmvn-install/src/test/resources/pom/jnpserver_args.pom >@@ -0,0 +1,59 @@ >+<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> >+ <groupId>org.jboss</groupId> >+ <artifactId>jboss-parent</artifactId> >+ <version>5</version> >+ </parent> >+ >+ <version>5.0.6.CR1</version> >+ <modelVersion>4.0.0</modelVersion> >+ <groupId>org.jboss.naming</groupId> >+ <artifactId>jnpserver</artifactId> >+ <packaging>jar</packaging> >+ <name>JBoss Naming Server</name> >+ <url>http://www.jboss.org</url> >+ <description>The JBoss JNDI Server</description> >+ >+ <properties> >+ <version.compiler.plugin>3.1</version.compiler.plugin> >+ <maven.compiler.source>1.7</maven.compiler.source> >+ <maven.compiler.target>1.7</maven.compiler.target> >+ <maven.compiler.argument.target>${maven.compiler.target}</maven.compiler.argument.target> >+ <maven.compiler.argument.source>${maven.compiler.source}</maven.compiler.argument.source> >+ </properties> >+ >+ <build> >+ <pluginManagement> >+ <plugins> >+ <plugin> >+ <groupId>org.apache.maven.plugins</groupId> >+ <artifactId>maven-compiler-plugin</artifactId> >+ <version>${version.compiler.plugin}</version> >+ <configuration> >+ <showDeprecation>true</showDeprecation> >+ <showWarnings>true</showWarnings> >+ <compilerArguments> >+ <source>1.7</source> >+ <target>1.7</target> >+ </compilerArguments> >+ </configuration> >+ </plugin> >+ </plugins> >+ </pluginManagement> >+ >+ <plugins> >+ <plugin> >+ <artifactId>maven-assembly-plugin</artifactId> >+ <configuration> >+ <descriptors> >+ <descriptor>src/main/assembly/client.xml</descriptor> >+ </descriptors> >+ </configuration> >+ </plugin> >+ </plugins> >+ >+ </build> >+</project> >\ No newline at end of file >diff --git a/xmvn-tools/xmvn-install/src/test/resources/pom/jnpserver_vars.pom b/xmvn-tools/xmvn-install/src/test/resources/pom/jnpserver_vars.pom >new file mode 100644 >index 0000000..20aafe7 >--- /dev/null >+++ b/xmvn-tools/xmvn-install/src/test/resources/pom/jnpserver_vars.pom >@@ -0,0 +1,59 @@ >+<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> >+ <groupId>org.jboss</groupId> >+ <artifactId>jboss-parent</artifactId> >+ <version>5</version> >+ </parent> >+ >+ <version>5.0.6.CR1</version> >+ <modelVersion>4.0.0</modelVersion> >+ <groupId>org.jboss.naming</groupId> >+ <artifactId>jnpserver</artifactId> >+ <packaging>jar</packaging> >+ <name>JBoss Naming Server</name> >+ <url>http://www.jboss.org</url> >+ <description>The JBoss JNDI Server</description> >+ >+ <properties> >+ <version.compiler.plugin>3.1</version.compiler.plugin> >+ <maven.compiler.source>1.7</maven.compiler.source> >+ <maven.compiler.target>1.7</maven.compiler.target> >+ <maven.compiler.argument.target>${maven.compiler.target}</maven.compiler.argument.target> >+ <maven.compiler.argument.source>${maven.compiler.source}</maven.compiler.argument.source> >+ </properties> >+ >+ <build> >+ <pluginManagement> >+ <plugins> >+ <plugin> >+ <groupId>org.apache.maven.plugins</groupId> >+ <artifactId>maven-compiler-plugin</artifactId> >+ <version>${version.compiler.plugin}</version> >+ <configuration> >+ <showDeprecation>true</showDeprecation> >+ <showWarnings>true</showWarnings> >+ <compilerArguments> >+ <source>${maven.compiler.argument.source}</source> >+ <target>${maven.compiler.argument.target}</target> >+ </compilerArguments> >+ </configuration> >+ </plugin> >+ </plugins> >+ </pluginManagement> >+ >+ <plugins> >+ <plugin> >+ <artifactId>maven-assembly-plugin</artifactId> >+ <configuration> >+ <descriptors> >+ <descriptor>src/main/assembly/client.xml</descriptor> >+ </descriptors> >+ </configuration> >+ </plugin> >+ </plugins> >+ >+ </build> >+</project> >\ No newline at end of file >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1086335
:
885010
|
885011