This commit is contained in:
Guillaume Nodet 2023-06-02 11:57:19 +02:00
parent aedbb150f5
commit 386efc3d6c
902 changed files with 23349 additions and 31763 deletions

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@ -18,9 +17,7 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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/xsd/maven-4.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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@ -77,8 +74,8 @@ under the License.
<proxy.host>localhost</proxy.host>
<proxy.port>80</proxy.port>
<proxy.type>none</proxy.type>
<proxy.user></proxy.user>
<proxy.pass></proxy.pass>
<proxy.user />
<proxy.pass />
<proxy.nonProxyHosts>localhost</proxy.nonProxyHosts>
<slf4jVersion>1.6.1</slf4jVersion>
<jetty9Version>9.4.50.v20221201</jetty9Version>
@ -486,8 +483,8 @@ under the License.
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>src/test/resources-filtered</directory>
<filtering>true</filtering>
<directory>src/test/resources-filtered</directory>
</testResource>
</testResources>
<plugins>
@ -542,17 +539,6 @@ under the License.
</profile>
<profile>
<id>run-its</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- not really used but will force download in the local repo used -->
<dependency>
@ -574,6 +560,17 @@ under the License.
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>maven-repo-local</id>
@ -676,10 +673,10 @@ under the License.
<executions>
<execution>
<id>download-maven-distro</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<phase>process-test-resources</phase>
<configuration>
<artifactItems>
<artifactItem>
@ -702,20 +699,17 @@ under the License.
<executions>
<execution>
<id>unpack-maven-distro</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<phase>process-test-resources</phase>
<configuration>
<target>
<delete dir="${mavenHome}" />
<unzip src="${project.build.directory}/maven-bin.zip"
dest="${mavenHome}">
<globmapper from="apache-maven-${mavenVersion}/*"
to="*" handledirsep="true" />
<unzip dest="${mavenHome}" src="${project.build.directory}/maven-bin.zip">
<globmapper from="apache-maven-${mavenVersion}/*" handledirsep="true" to="*" />
</unzip>
<chmod dir="${mavenHome}/bin" perm="ugo+rx"
includes="mvn,mvnDebug" />
<chmod dir="${mavenHome}/bin" includes="mvn,mvnDebug" perm="ugo+rx" />
</target>
</configuration>
</execution>
@ -748,19 +742,17 @@ under the License.
<executions>
<execution>
<id>unpack-maven-distro</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<phase>process-test-resources</phase>
<configuration>
<target>
<delete dir="${mavenHome}" />
<unzip src="${mavenDistro}" dest="${mavenHome}">
<regexpmapper from="^([^/]+)/(.*)$"
to="\2" handledirsep="true" />
<unzip dest="${mavenHome}" src="${mavenDistro}">
<regexpmapper from="^([^/]+)/(.*)$" handledirsep="true" to="\2" />
</unzip>
<chmod dir="${mavenHome}/bin" perm="ugo+rx"
includes="mvn,mvnDebug" />
<chmod dir="${mavenHome}/bin" includes="mvn,mvnDebug" perm="ugo+rx" />
</target>
</configuration>
</execution>
@ -789,18 +781,17 @@ under the License.
<executions>
<execution>
<id>copy-maven-distro</id>
<phase>process-test-classes</phase>
<goals>
<goal>run</goal>
</goals>
<phase>process-test-classes</phase>
<configuration>
<target>
<delete dir="${preparedMavenHome}" />
<copy todir="${preparedMavenHome}" overwrite="true">
<copy overwrite="true" todir="${preparedMavenHome}">
<fileset dir="${mavenHome}" />
</copy>
<chmod dir="${preparedMavenHome}/bin" perm="ugo+rx"
includes="mvn,mvnDebug" />
<chmod dir="${preparedMavenHome}/bin" includes="mvn,mvnDebug" perm="ugo+rx" />
</target>
</configuration>
</execution>
@ -812,10 +803,10 @@ under the License.
<executions>
<execution>
<id>inject-emma-into-core-realm</id>
<phase>process-test-classes</phase>
<goals>
<goal>copy</goal>
</goals>
<phase>process-test-classes</phase>
<configuration>
<artifactItems>
<artifactItem>
@ -853,17 +844,17 @@ under the License.
<executions>
<execution>
<id>instrument</id>
<phase>process-test-classes</phase>
<goals>
<goal>instrument</goal>
</goals>
<phase>process-test-classes</phase>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
</plugin>

View File

@ -1,5 +1,35 @@
/*
* 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.maven.it;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Collections;
import com.google.common.io.ByteStreams;
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
@ -20,17 +50,6 @@ import org.eclipse.jetty.util.security.Password;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.eclipse.jetty.util.thread.ScheduledExecutorScheduler;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Collections;
/**
* An HTTP server that handles all requests on a given port from a specified source, optionally secured using BASIC auth
* by providing a username and password. The source can either be a URL or a directory. When a request is made the
@ -38,13 +57,11 @@ import java.util.Collections;
*
* @author Jason van Zyl
*/
public class HttpServer
{
public class HttpServer {
static {
Log.initialized();
Logger rootLogger = Log.getRootLogger();
if ( rootLogger instanceof StdErrLog )
{
if (rootLogger instanceof StdErrLog) {
((StdErrLog) rootLogger).setLevel(StdErrLog.LEVEL_WARN);
}
}
@ -57,45 +74,35 @@ public class HttpServer
private final String password;
public HttpServer( int port, String username, String password, StreamSource source )
{
public HttpServer(int port, String username, String password, StreamSource source) {
this.username = username;
this.password = password;
this.source = source;
this.server = server(port);
}
public void start()
throws Exception
{
public void start() throws Exception {
server.start();
// server.join();
}
public boolean isFailed()
{
public boolean isFailed() {
return server.isFailed();
}
public void stop()
throws Exception
{
public void stop() throws Exception {
server.stop();
}
public void join()
throws Exception
{
public void join() throws Exception {
server.join();
}
public int port()
{
public int port() {
return ((NetworkConnector) server.getConnectors()[0]).getLocalPort();
}
private Server server( int port )
{
private Server server(int port) {
QueuedThreadPool threadPool = new QueuedThreadPool();
threadPool.setMaxThreads(500);
Server server = new Server(threadPool);
@ -108,8 +115,7 @@ public class HttpServer
StreamSourceHandler handler = new StreamSourceHandler(source);
if ( username != null && password != null )
{
if (username != null && password != null) {
HashLoginService loginService = new HashLoginService("Test Server");
UserStore userStore = new UserStore();
userStore.addUser(username, new Password(password), new String[] {"user"});
@ -132,21 +138,17 @@ public class HttpServer
security.setAuthenticator(new BasicAuthenticator());
security.setLoginService(loginService);
security.setHandler(handler);
}
else
{
} else {
server.setHandler(handler);
}
return server;
}
public static HttpServerBuilder builder()
{
public static HttpServerBuilder builder() {
return new HttpServerBuilder();
}
public static class HttpServerBuilder
{
public static class HttpServerBuilder {
private int port;
@ -156,94 +158,72 @@ public class HttpServer
private StreamSource source;
public HttpServerBuilder port( int port )
{
public HttpServerBuilder port(int port) {
this.port = port;
return this;
}
public HttpServerBuilder username( String username )
{
public HttpServerBuilder username(String username) {
this.username = username;
return this;
}
public HttpServerBuilder password( String password )
{
public HttpServerBuilder password(String password) {
this.password = password;
return this;
}
public HttpServerBuilder source( final String source )
{
this.source = new StreamSource()
{
public HttpServerBuilder source(final String source) {
this.source = new StreamSource() {
@Override
public InputStream stream( String path )
throws IOException
{
public InputStream stream(String path) throws IOException {
return new URL(String.format("%s/%s", source, path)).openStream();
}
};
return this;
}
public HttpServerBuilder source( final File source )
{
this.source = new StreamSource()
{
public HttpServerBuilder source(final File source) {
this.source = new StreamSource() {
@Override
public InputStream stream( String path )
throws IOException
{
public InputStream stream(String path) throws IOException {
return new FileInputStream(new File(source, path));
}
};
return this;
}
public HttpServer build()
{
public HttpServer build() {
return new HttpServer(port, username, password, source);
}
}
public interface StreamSource
{
InputStream stream( String path )
throws IOException;
public interface StreamSource {
InputStream stream(String path) throws IOException;
}
public static class StreamSourceHandler
extends AbstractHandler
{
public static class StreamSourceHandler extends AbstractHandler {
private final StreamSource source;
public StreamSourceHandler( StreamSource source )
{
public StreamSourceHandler(StreamSource source) {
this.source = source;
}
@Override
public void handle( String target, Request baseRequest, HttpServletRequest request,
HttpServletResponse response )
throws IOException, ServletException
{
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("application/octet-stream");
response.setStatus(HttpServletResponse.SC_OK);
try ( InputStream in = source.stream(
target.substring( 1 ) ); OutputStream out = response.getOutputStream() )
{
try (InputStream in = source.stream(target.substring(1));
OutputStream out = response.getOutputStream()) {
ByteStreams.copy(in, out);
}
baseRequest.setHandled(true);
}
}
public static void main( String[] args )
throws Exception
{
public static void main(String[] args) throws Exception {
HttpServer server = HttpServer.builder() //
.port(0) //
.username("maven") //

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,6 +16,7 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.it;
import java.io.File;
import java.io.FileInputStream;
@ -27,21 +26,16 @@ import java.security.MessageDigest;
/**
* @author Benjamin Bentmann
*/
class ItUtils
{
class ItUtils {
public static String calcHash( File file, String algo )
throws Exception
{
public static String calcHash(File file, String algo) throws Exception {
MessageDigest digester = MessageDigest.getInstance(algo);
DigestInputStream dis;
try ( FileInputStream is = new FileInputStream( file ) )
{
try (FileInputStream is = new FileInputStream(file)) {
dis = new DigestInputStream(is, digester);
for ( byte[] buffer = new byte[1024 * 4]; dis.read( buffer ) >= 0; )
{
for (byte[] buffer = new byte[1024 * 4]; dis.read(buffer) >= 0; ) {
// just read it
}
}
@ -50,12 +44,10 @@ class ItUtils
StringBuilder hash = new StringBuilder(digest.length * 2);
for ( byte aDigest : digest )
{
for (byte aDigest : digest) {
int b = aDigest & 0xFF;
if ( b < 0x10 )
{
if (b < 0x10) {
hash.append('0');
}
@ -64,5 +56,4 @@ class ItUtils
return hash.toString();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,20 +16,17 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0008SimplePluginTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0008SimplePluginTest extends AbstractMavenIntegrationTestCase {
public MavenIT0008SimplePluginTest()
{
public MavenIT0008SimplePluginTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -44,9 +39,7 @@ public class MavenIT0008SimplePluginTest
* @throws Exception in case of failure
*/
@Test
public void testit0008()
throws Exception
{
public void testit0008() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0008");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -58,5 +51,4 @@ public class MavenIT0008SimplePluginTest
verifier.verifyFilePresent("target/test-basedir-alignment/touch.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,20 +16,17 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0009GoalConfigurationTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0009GoalConfigurationTest extends AbstractMavenIntegrationTestCase {
public MavenIT0009GoalConfigurationTest()
{
public MavenIT0009GoalConfigurationTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -42,9 +37,7 @@ public class MavenIT0009GoalConfigurationTest
* @throws Exception in case of failure
*/
@Test
public void testit0009()
throws Exception
{
public void testit0009() throws Exception {
boolean supportSpaceInXml = matchesVersionRange("[3.1.0,)");
@ -59,5 +52,4 @@ public class MavenIT0009GoalConfigurationTest
verifier.verifyFileNotPresent("target/bad-item");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,20 +16,17 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0010DependencyClosureResolutionTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0010DependencyClosureResolutionTest()
{
public class MavenIT0010DependencyClosureResolutionTest extends AbstractMavenIntegrationTestCase {
public MavenIT0010DependencyClosureResolutionTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -43,9 +38,7 @@ public class MavenIT0010DependencyClosureResolutionTest
* @throws Exception in case of failure
*/
@Test
public void testit0010()
throws Exception
{
public void testit0010() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0010");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -67,5 +60,4 @@ public class MavenIT0010DependencyClosureResolutionTest
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0010:a:jar:0.1"));
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0010:b:jar:0.2"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,20 +16,17 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0011DefaultVersionByDependencyManagementTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0011DefaultVersionByDependencyManagementTest()
{
public class MavenIT0011DefaultVersionByDependencyManagementTest extends AbstractMavenIntegrationTestCase {
public MavenIT0011DefaultVersionByDependencyManagementTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -41,9 +36,7 @@ public class MavenIT0011DefaultVersionByDependencyManagementTest
* @throws Exception in case of failure
*/
@Test
public void testit0011()
throws Exception
{
public void testit0011() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0011");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -60,5 +53,4 @@ public class MavenIT0011DefaultVersionByDependencyManagementTest
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0011:a:jar:0.1"));
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0011:b:jar:0.2"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0012PomInterpolationTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0012PomInterpolationTest()
{
public class MavenIT0012PomInterpolationTest extends AbstractMavenIntegrationTestCase {
public MavenIT0012PomInterpolationTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -40,9 +35,7 @@ public class MavenIT0012PomInterpolationTest
* @throws Exception in case of failure
*/
@Test
public void testit0012()
throws Exception
{
public void testit0012() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0012");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -54,5 +47,4 @@ public class MavenIT0012PomInterpolationTest
verifier.verifyFilePresent("child-project/target/child-touch-3.0.3.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0018DependencyManagementTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0018DependencyManagementTest()
{
public class MavenIT0018DependencyManagementTest extends AbstractMavenIntegrationTestCase {
public MavenIT0018DependencyManagementTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -42,9 +37,7 @@ public class MavenIT0018DependencyManagementTest
* @throws Exception in case of failure
*/
@Test
public void testit0018()
throws Exception
{
public void testit0018() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0018");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -52,10 +45,10 @@ public class MavenIT0018DependencyManagementTest
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
verifier.addCliArgument( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
verifier.addCliArgument(
"org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile");
verifier.execute();
verifier.verifyArtifactPresent("org.apache.maven.its.it0018", "managed-dep", "1.0.3", "jar");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0019PluginVersionMgmtBySuperPomTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0019PluginVersionMgmtBySuperPomTest()
{
public class MavenIT0019PluginVersionMgmtBySuperPomTest extends AbstractMavenIntegrationTestCase {
public MavenIT0019PluginVersionMgmtBySuperPomTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -40,9 +35,7 @@ public class MavenIT0019PluginVersionMgmtBySuperPomTest
* @throws Exception in case of failure
*/
@Test
public void testit0019()
throws Exception
{
public void testit0019() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0019");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -52,5 +45,4 @@ public class MavenIT0019PluginVersionMgmtBySuperPomTest
verifier.verifyFilePresent("target/classes/test.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0021PomProfileTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0021PomProfileTest()
{
public class MavenIT0021PomProfileTest extends AbstractMavenIntegrationTestCase {
public MavenIT0021PomProfileTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -41,9 +36,7 @@ public class MavenIT0021PomProfileTest
* @throws Exception in case of failure
*/
@Test
public void testit0021()
throws Exception
{
public void testit0021() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0021");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -61,5 +54,4 @@ public class MavenIT0021PomProfileTest
verifier.verifyArtifactPresent("org.apache.maven.its.it0021", "a", "0.1", "jar");
verifier.verifyArtifactPresent("org.apache.maven.its.it0021", "b", "0.1", "jar");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0023SettingsProfileTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0023SettingsProfileTest()
{
public class MavenIT0023SettingsProfileTest extends AbstractMavenIntegrationTestCase {
public MavenIT0023SettingsProfileTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -41,9 +36,7 @@ public class MavenIT0023SettingsProfileTest
* @throws Exception in case of failure
*/
@Test
public void testit0023()
throws Exception
{
public void testit0023() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0023");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -57,5 +50,4 @@ public class MavenIT0023SettingsProfileTest
verifier.verifyFilePresent("target/test.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenIT0024MultipleGoalExecutionsTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0024MultipleGoalExecutionsTest()
{
public class MavenIT0024MultipleGoalExecutionsTest extends AbstractMavenIntegrationTestCase {
public MavenIT0024MultipleGoalExecutionsTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenIT0024MultipleGoalExecutionsTest
* @throws Exception in case of failure
*/
@Test
public void testit0024()
throws Exception
{
public void testit0024() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0024");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -61,5 +54,4 @@ public class MavenIT0024MultipleGoalExecutionsTest
verifier.verifyFilePresent("target/plugin-exec-configuration.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenIT0025MultipleExecutionLevelConfigsTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0025MultipleExecutionLevelConfigsTest()
{
public class MavenIT0025MultipleExecutionLevelConfigsTest extends AbstractMavenIntegrationTestCase {
public MavenIT0025MultipleExecutionLevelConfigsTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenIT0025MultipleExecutionLevelConfigsTest
* @throws Exception in case of failure
*/
@Test
public void testit0025()
throws Exception
{
public void testit0025() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0025");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -61,5 +54,4 @@ public class MavenIT0025MultipleExecutionLevelConfigsTest
verifier.verifyFilePresent("target/test.txt");
verifier.verifyFilePresent("target/test2.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0030DepPomDepMgmtInheritanceTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0030DepPomDepMgmtInheritanceTest()
{
public class MavenIT0030DepPomDepMgmtInheritanceTest extends AbstractMavenIntegrationTestCase {
public MavenIT0030DepPomDepMgmtInheritanceTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -41,9 +36,7 @@ public class MavenIT0030DepPomDepMgmtInheritanceTest
* @throws Exception in case of failure
*/
@Test
public void testit0030()
throws Exception
{
public void testit0030() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0030");
Verifier verifier = newVerifier(testDir.getAbsolutePath(), "remote");
verifier.deleteArtifact("org.apache.maven.it", "maven-it-it0030", "1.0-SNAPSHOT", "jar");
@ -54,7 +47,5 @@ public class MavenIT0030DepPomDepMgmtInheritanceTest
verifier.execute();
verifier.verifyFilePresent("child-hierarchy/project2/target/classes/org/apache/maven/it0001/Person.class");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0032MavenPrerequisiteTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0032MavenPrerequisiteTest()
{
public class MavenIT0032MavenPrerequisiteTest extends AbstractMavenIntegrationTestCase {
public MavenIT0032MavenPrerequisiteTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -40,9 +35,7 @@ public class MavenIT0032MavenPrerequisiteTest
* @throws Exception in case of failure
*/
@Test
public void testit0032()
throws Exception
{
public void testit0032() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0032");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -51,5 +44,4 @@ public class MavenIT0032MavenPrerequisiteTest
verifier.execute();
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenIT0037AlternatePomFileSameDirTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0037AlternatePomFileSameDirTest()
{
public class MavenIT0037AlternatePomFileSameDirTest extends AbstractMavenIntegrationTestCase {
public MavenIT0037AlternatePomFileSameDirTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenIT0037AlternatePomFileSameDirTest
* @throws Exception in case of failure
*/
@Test
public void testit0037()
throws Exception
{
public void testit0037() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0037");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -63,5 +56,4 @@ public class MavenIT0037AlternatePomFileSameDirTest
verifier.verifyFilePresent("target/passed.log");
verifier.verifyFileNotPresent("target/failed.log");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenIT0038AlternatePomFileDifferentDirTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0038AlternatePomFileDifferentDirTest()
{
public class MavenIT0038AlternatePomFileDifferentDirTest extends AbstractMavenIntegrationTestCase {
public MavenIT0038AlternatePomFileDifferentDirTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenIT0038AlternatePomFileDifferentDirTest
* @throws Exception in case of failure
*/
@Test
public void testit0038()
throws Exception
{
public void testit0038() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0038");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -63,5 +56,4 @@ public class MavenIT0038AlternatePomFileDifferentDirTest
verifier.verifyFilePresent("project/target/passed.log");
verifier.verifyFileNotPresent("target/failed.log");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenIT0040PackagingFromPluginExtensionTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0040PackagingFromPluginExtensionTest extends AbstractMavenIntegrationTestCase {
public MavenIT0040PackagingFromPluginExtensionTest()
{
public MavenIT0040PackagingFromPluginExtensionTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenIT0040PackagingFromPluginExtensionTest
* @throws Exception in case of failure
*/
@Test
public void testit0040()
throws Exception
{
public void testit0040() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0040");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -61,5 +54,4 @@ public class MavenIT0040PackagingFromPluginExtensionTest
verifier.verifyFilePresent("target/maven-it-it0040-1.0-it.jar");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenIT0041ArtifactTypeFromPluginExtensionTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0041ArtifactTypeFromPluginExtensionTest()
{
public class MavenIT0041ArtifactTypeFromPluginExtensionTest extends AbstractMavenIntegrationTestCase {
public MavenIT0041ArtifactTypeFromPluginExtensionTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenIT0041ArtifactTypeFromPluginExtensionTest
* @throws Exception in case of failure
*/
@Test
public void testit0041()
throws Exception
{
public void testit0041() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0041");
Verifier verifier = newVerifier(testDir.getAbsolutePath(), "remote");
@ -63,5 +56,4 @@ public class MavenIT0041ArtifactTypeFromPluginExtensionTest
verifier.verifyArtifactPresent("org.apache.maven", "maven-core-it-support", "1.2", "coreit-artifact");
verifier.verifyArtifactPresent("org.apache.maven", "maven-core-it-support", "1.2", "pom");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,20 +16,17 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0051ReleaseProfileTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0051ReleaseProfileTest extends AbstractMavenIntegrationTestCase {
public MavenIT0051ReleaseProfileTest()
{
public MavenIT0051ReleaseProfileTest() {
super("(2.0.2,4.0.0-alpha-1)");
}
@ -41,9 +36,7 @@ public class MavenIT0051ReleaseProfileTest
* @throws Exception in case of failure
*/
@Test
public void testit0051()
throws Exception
{
public void testit0051() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0051");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -57,5 +50,4 @@ public class MavenIT0051ReleaseProfileTest
verifier.verifyFilePresent("target/source-jar.txt");
verifier.verifyFilePresent("target/javadoc-jar.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0052ReleaseProfileTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0052ReleaseProfileTest()
{
public class MavenIT0052ReleaseProfileTest extends AbstractMavenIntegrationTestCase {
public MavenIT0052ReleaseProfileTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -41,9 +36,7 @@ public class MavenIT0052ReleaseProfileTest
* @throws Exception in case of failure
*/
@Test
public void testit0052()
throws Exception
{
public void testit0052() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0052");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -57,5 +50,4 @@ public class MavenIT0052ReleaseProfileTest
verifier.verifyFileNotPresent("target/source-jar.txt");
verifier.verifyFileNotPresent("target/javadoc-jar.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0056MultipleGoalExecutionsTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0056MultipleGoalExecutionsTest()
{
public class MavenIT0056MultipleGoalExecutionsTest extends AbstractMavenIntegrationTestCase {
public MavenIT0056MultipleGoalExecutionsTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -41,9 +36,7 @@ public class MavenIT0056MultipleGoalExecutionsTest
* @throws Exception in case of failure
*/
@Test
public void testit0056()
throws Exception
{
public void testit0056() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0056");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -56,5 +49,4 @@ public class MavenIT0056MultipleGoalExecutionsTest
verifier.verifyFilePresent("target/first-exec.txt");
verifier.verifyFilePresent("target/second-exec.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,20 +16,17 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0063SystemScopeDependencyTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0063SystemScopeDependencyTest()
{
public class MavenIT0063SystemScopeDependencyTest extends AbstractMavenIntegrationTestCase {
public MavenIT0063SystemScopeDependencyTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -41,23 +36,22 @@ public class MavenIT0063SystemScopeDependencyTest
* @throws Exception in case of failure
*/
@Test
public void testit0063()
throws Exception
{
public void testit0063() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0063");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
verifier.getSystemProperties().setProperty("jre.home", new File(testDir, "jdk/jre").getPath());
verifier.addCliArgument( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
verifier.addCliArgument(
"org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile");
verifier.execute();
verifier.verifyErrorFreeLog();
List<String> lines = verifier.loadLines("target/compile.txt", "UTF-8");
assertEquals(2, lines.size());
assertEquals( new File( testDir, "jdk/lib/tools.jar").getCanonicalFile(),
assertEquals(
new File(testDir, "jdk/lib/tools.jar").getCanonicalFile(),
new File((String) lines.get(1)).getCanonicalFile());
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,19 +16,16 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0064MojoConfigViaSettersTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0064MojoConfigViaSettersTest()
{
public class MavenIT0064MojoConfigViaSettersTest extends AbstractMavenIntegrationTestCase {
public MavenIT0064MojoConfigViaSettersTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -41,9 +36,7 @@ public class MavenIT0064MojoConfigViaSettersTest
* @throws Exception in case of failure
*/
@Test
public void testit0064()
throws Exception
{
public void testit0064() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0064");
Verifier verifier = newVerifier(testDir.getAbsolutePath());

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenIT0071PluginConfigWithDottedPropertyTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0071PluginConfigWithDottedPropertyTest()
{
public class MavenIT0071PluginConfigWithDottedPropertyTest extends AbstractMavenIntegrationTestCase {
public MavenIT0071PluginConfigWithDottedPropertyTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenIT0071PluginConfigWithDottedPropertyTest
* @throws Exception in case of failure
*/
@Test
public void testit0071()
throws Exception
{
public void testit0071() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0071");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -61,5 +54,4 @@ public class MavenIT0071PluginConfigWithDottedPropertyTest
verifier.verifyFilePresent("target/foo2");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenIT0072InterpolationWithDottedPropertyTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0072InterpolationWithDottedPropertyTest()
{
public class MavenIT0072InterpolationWithDottedPropertyTest extends AbstractMavenIntegrationTestCase {
public MavenIT0072InterpolationWithDottedPropertyTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenIT0072InterpolationWithDottedPropertyTest
* @throws Exception in case of failure
*/
@Test
public void testit0072()
throws Exception
{
public void testit0072() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0072");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -63,5 +56,4 @@ public class MavenIT0072InterpolationWithDottedPropertyTest
Properties props = verifier.loadProperties("target/pom.properties");
assertEquals("1.0-SNAPSHOT", props.getProperty("project.version"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,20 +16,17 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Collection;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0085TransitiveSystemScopeTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0085TransitiveSystemScopeTest()
{
public class MavenIT0085TransitiveSystemScopeTest extends AbstractMavenIntegrationTestCase {
public MavenIT0085TransitiveSystemScopeTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -44,9 +39,7 @@ public class MavenIT0085TransitiveSystemScopeTest
* @throws Exception in case of failure
*/
@Test
public void testit0085()
throws Exception
{
public void testit0085() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0085");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -64,5 +57,4 @@ public class MavenIT0085TransitiveSystemScopeTest
Collection<String> lines = verifier.loadLines("target/test.txt", "UTF-8");
assertTrue(lines.toString(), lines.contains("system.jar"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,12 +31,9 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenIT0086PluginRealmTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0086PluginRealmTest extends AbstractMavenIntegrationTestCase {
public MavenIT0086PluginRealmTest()
{
public MavenIT0086PluginRealmTest() {
super("(2.0.2,)");
}
@ -49,9 +44,7 @@ public class MavenIT0086PluginRealmTest
* @throws Exception in case of failure
*/
@Test
public void testit0086()
throws Exception
{
public void testit0086() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0086");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -74,5 +67,4 @@ public class MavenIT0086PluginRealmTest
Properties tcclProps = verifier.loadProperties("target/tccl.properties");
assertEquals(pclProps, tcclProps);
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,12 +31,9 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenIT0087PluginRealmWithProjectLevelDepsTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0087PluginRealmWithProjectLevelDepsTest extends AbstractMavenIntegrationTestCase {
public MavenIT0087PluginRealmWithProjectLevelDepsTest()
{
public MavenIT0087PluginRealmWithProjectLevelDepsTest() {
super("(2.0.2,)");
}
@ -49,9 +44,7 @@ public class MavenIT0087PluginRealmWithProjectLevelDepsTest
* @throws Exception in case of failure
*/
@Test
public void testit0087()
throws Exception
{
public void testit0087() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0087");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -74,5 +67,4 @@ public class MavenIT0087PluginRealmWithProjectLevelDepsTest
Properties tcclProps = verifier.loadProperties("target/tccl.properties");
assertEquals(pclProps, tcclProps);
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,20 +16,17 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0090EnvVarInterpolationTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0090EnvVarInterpolationTest()
{
public class MavenIT0090EnvVarInterpolationTest extends AbstractMavenIntegrationTestCase {
public MavenIT0090EnvVarInterpolationTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -42,9 +37,7 @@ public class MavenIT0090EnvVarInterpolationTest
* @throws Exception in case of failure
*/
@Test
public void testit0090()
throws Exception
{
public void testit0090() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0090");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -58,5 +51,4 @@ public class MavenIT0090EnvVarInterpolationTest
Properties props = verifier.loadProperties("target/env.properties");
assertEquals("MAVEN_TEST_ENVAR_VALUE", props.getProperty("stringParam"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,10 +16,7 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.VerificationException;
package org.apache.maven.it;
import java.io.File;
import java.io.IOException;
@ -31,6 +26,9 @@ import java.util.Date;
import java.util.Locale;
import org.apache.maven.shared.utils.io.FileUtils;
import org.apache.maven.shared.verifier.VerificationException;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@ -40,11 +38,8 @@ import org.junit.jupiter.api.Test;
* updated. See <a href="https://issues.apache.org/jira/browse/MNG-1908">MNG-1908</a>.
*/
@Disabled("flaky test, see MNG-3137")
public class MavenIT0108SnapshotUpdateTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0108SnapshotUpdateTest()
{
public class MavenIT0108SnapshotUpdateTest extends AbstractMavenIntegrationTestCase {
public MavenIT0108SnapshotUpdateTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -59,9 +54,7 @@ public class MavenIT0108SnapshotUpdateTest
private static final int TIME_OFFSET = 50000;
@BeforeEach
protected void setUp()
throws Exception
{
protected void setUp() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0108");
verifier = newVerifier(testDir.getAbsolutePath());
localRepoFile = getLocalRepoFile(verifier);
@ -71,7 +64,8 @@ public class MavenIT0108SnapshotUpdateTest
recreateRemoteRepository(repository);
// create artifact in repository (TODO: into verifier)
artifact = new File( repository,
artifact = new File(
repository,
"org/apache/maven/maven-core-it-support/1.0-SNAPSHOT/maven-core-it-support-1.0-SNAPSHOT.jar");
artifact.getParentFile().mkdirs();
FileUtils.fileWrite(artifact.getAbsolutePath(), "originalArtifact");
@ -80,9 +74,7 @@ public class MavenIT0108SnapshotUpdateTest
}
@Test
public void testSnapshotUpdated()
throws Exception
{
public void testSnapshotUpdated() throws Exception {
verifier.addCliArgument("package");
verifier.execute();
@ -104,13 +96,10 @@ public class MavenIT0108SnapshotUpdateTest
}
@Test
public void testSnapshotUpdatedWithMetadata()
throws Exception
{
File metadata =
new File( repository, "org/apache/maven/maven-core-it-support/1.0-SNAPSHOT/maven-metadata.xml" );
FileUtils.fileWrite( metadata.getAbsolutePath(),
constructMetadata( "1", System.currentTimeMillis() - TIME_OFFSET, true ) );
public void testSnapshotUpdatedWithMetadata() throws Exception {
File metadata = new File(repository, "org/apache/maven/maven-core-it-support/1.0-SNAPSHOT/maven-metadata.xml");
FileUtils.fileWrite(
metadata.getAbsolutePath(), constructMetadata("1", System.currentTimeMillis() - TIME_OFFSET, true));
verifier.addCliArgument("package");
verifier.execute();
@ -132,19 +121,16 @@ public class MavenIT0108SnapshotUpdateTest
}
@Test
public void testSnapshotUpdatedWithLocalMetadata()
throws Exception
{
public void testSnapshotUpdatedWithLocalMetadata() throws Exception {
File localMetadata = getMetadataFile("org/apache/maven", "maven-core-it-support", "1.0-SNAPSHOT");
FileUtils.deleteDirectory(localMetadata.getParentFile());
assertFalse(localMetadata.getParentFile().exists());
localMetadata.getParentFile().mkdirs();
File metadata =
new File( repository, "org/apache/maven/maven-core-it-support/1.0-SNAPSHOT/maven-metadata.xml" );
FileUtils.fileWrite( metadata.getAbsolutePath(),
constructMetadata( "1", System.currentTimeMillis() - TIME_OFFSET, true ) );
File metadata = new File(repository, "org/apache/maven/maven-core-it-support/1.0-SNAPSHOT/maven-metadata.xml");
FileUtils.fileWrite(
metadata.getAbsolutePath(), constructMetadata("1", System.currentTimeMillis() - TIME_OFFSET, true));
verifier.addCliArgument("package");
verifier.execute();
@ -155,10 +141,9 @@ public class MavenIT0108SnapshotUpdateTest
assertFalse(localMetadata.exists());
FileUtils.fileWrite(localRepoFile.getAbsolutePath(), "localArtifact");
FileUtils.fileWrite( localMetadata.getAbsolutePath(), constructLocalMetadata( "org.apache.maven",
"maven-core-it-support",
System.currentTimeMillis(),
true ) );
FileUtils.fileWrite(
localMetadata.getAbsolutePath(),
constructLocalMetadata("org.apache.maven", "maven-core-it-support", System.currentTimeMillis(), true));
// update the remote file, but we shouldn't be looking
artifact.setLastModified(System.currentTimeMillis());
@ -171,11 +156,11 @@ public class MavenIT0108SnapshotUpdateTest
Calendar cal = Calendar.getInstance();
cal.add(Calendar.YEAR, -1);
FileUtils.fileWrite( localMetadata.getAbsolutePath(), constructLocalMetadata( "org.apache.maven",
"maven-core-it-support",
cal.getTimeInMillis(), true ) );
FileUtils.fileWrite( metadata.getAbsolutePath(),
constructMetadata( "2", System.currentTimeMillis() - 2000, true ) );
FileUtils.fileWrite(
localMetadata.getAbsolutePath(),
constructLocalMetadata("org.apache.maven", "maven-core-it-support", cal.getTimeInMillis(), true));
FileUtils.fileWrite(
metadata.getAbsolutePath(), constructMetadata("2", System.currentTimeMillis() - 2000, true));
artifact.setLastModified(System.currentTimeMillis());
verifier.addCliArgument("package");
@ -187,13 +172,10 @@ public class MavenIT0108SnapshotUpdateTest
}
@Test
public void testSnapshotUpdatedWithMetadataUsingFileTimestamp()
throws Exception
{
File metadata =
new File( repository, "org/apache/maven/maven-core-it-support/1.0-SNAPSHOT/maven-metadata.xml" );
FileUtils.fileWrite( metadata.getAbsolutePath(),
constructMetadata( "1", System.currentTimeMillis() - TIME_OFFSET, false ) );
public void testSnapshotUpdatedWithMetadataUsingFileTimestamp() throws Exception {
File metadata = new File(repository, "org/apache/maven/maven-core-it-support/1.0-SNAPSHOT/maven-metadata.xml");
FileUtils.fileWrite(
metadata.getAbsolutePath(), constructMetadata("1", System.currentTimeMillis() - TIME_OFFSET, false));
metadata.setLastModified(System.currentTimeMillis() - TIME_OFFSET);
verifier.addCliArgument("package");
@ -215,60 +197,52 @@ public class MavenIT0108SnapshotUpdateTest
verifier.verifyErrorFreeLog();
}
private File getMetadataFile( String groupId, String artifactId, String version )
{
private File getMetadataFile(String groupId, String artifactId, String version) {
return new File(verifier.getArtifactMetadataPath(groupId, artifactId, version, "maven-metadata-local.xml"));
}
private void verifyArtifactContent( String s )
throws IOException, VerificationException
{
private void verifyArtifactContent(String s) throws IOException, VerificationException {
verifier.verifyArtifactPresent("org.apache.maven", "maven-core-it-support", "1.0-SNAPSHOT", "jar");
verifier.verifyArtifactContent("org.apache.maven", "maven-core-it-support", "1.0-SNAPSHOT", "jar", s);
}
private static File deleteLocalArtifact( Verifier verifier, File localRepoFile )
throws IOException
{
private static File deleteLocalArtifact(Verifier verifier, File localRepoFile) throws IOException {
verifier.deleteArtifact("org.apache.maven", "maven-core-it-support", "1.0-SNAPSHOT", "jar");
// this is to delete metadata - TODO: incorporate into deleteArtifact in verifier
FileUtils.deleteDirectory(localRepoFile.getParentFile());
return localRepoFile;
}
private static File getLocalRepoFile( Verifier verifier )
{
return new File(
verifier.getArtifactPath( "org.apache.maven", "maven-core-it-support", "1.0-SNAPSHOT", "jar" ) );
private static File getLocalRepoFile(Verifier verifier) {
return new File(verifier.getArtifactPath("org.apache.maven", "maven-core-it-support", "1.0-SNAPSHOT", "jar"));
}
private static void recreateRemoteRepository( File repository )
throws IOException
{
private static void recreateRemoteRepository(File repository) throws IOException {
// create a repository (TODO: into verifier)
FileUtils.deleteDirectory(repository);
assertFalse(repository.exists());
repository.mkdirs();
}
private String constructMetadata( String buildNumber, long timestamp, boolean writeLastUpdated )
{
private String constructMetadata(String buildNumber, long timestamp, boolean writeLastUpdated) {
String ts = new SimpleDateFormat("yyyyMMddHHmmss", Locale.US).format(new Date(timestamp));
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?><metadata>\n" + "<groupId>org.apache.maven</groupId>\n" +
"<artifactId>maven-core-it-support</artifactId>\n" + "<version>1.0-SNAPSHOT</version>\n" +
"<versioning>\n" + "<snapshot>\n" + "<buildNumber>" + buildNumber + "</buildNumber>\n" + "</snapshot>\n" +
( writeLastUpdated ? "<lastUpdated>" + ts + "</lastUpdated>\n" : "" ) + "</versioning>\n" + "</metadata>";
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?><metadata>\n" + "<groupId>org.apache.maven</groupId>\n"
+ "<artifactId>maven-core-it-support</artifactId>\n"
+ "<version>1.0-SNAPSHOT</version>\n" + "<versioning>\n"
+ "<snapshot>\n" + "<buildNumber>" + buildNumber + "</buildNumber>\n" + "</snapshot>\n"
+ (writeLastUpdated ? "<lastUpdated>" + ts + "</lastUpdated>\n" : "")
+ "</versioning>\n" + "</metadata>";
}
private String constructLocalMetadata( String groupId, String artifactId, long timestamp, boolean writeLastUpdated )
{
private String constructLocalMetadata(String groupId, String artifactId, long timestamp, boolean writeLastUpdated) {
String ts = new SimpleDateFormat("yyyyMMddHHmmss", Locale.US).format(new Date(timestamp));
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?><metadata>\n" + " <groupId>" + groupId + "</groupId>\n" +
" <artifactId>" + artifactId + "</artifactId>\n" + " <version>1.0-SNAPSHOT</version>\n" +
" <versioning>\n" + " <snapshot>\n" + " <localCopy>true</localCopy>\n" + " </snapshot>\n" +
( writeLastUpdated ? " <lastUpdated>" + ts + "</lastUpdated>\n" : "" ) + " </versioning>\n" +
"</metadata>";
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?><metadata>\n" + " <groupId>" + groupId + "</groupId>\n"
+ " <artifactId>"
+ artifactId + "</artifactId>\n" + " <version>1.0-SNAPSHOT</version>\n" + " <versioning>\n"
+ " <snapshot>\n" + " <localCopy>true</localCopy>\n" + " </snapshot>\n"
+ (writeLastUpdated ? " <lastUpdated>" + ts + "</lastUpdated>\n" : "")
+ " </versioning>\n" + "</metadata>";
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,20 +16,17 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest()
{
public class MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest extends AbstractMavenIntegrationTestCase {
public MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest() {
super("[2.0,3.0-alpha-1),[3.0-alpha-7,)");
}
@ -42,9 +37,7 @@ public class MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest
* @throws Exception in case of failure
*/
@Test
public void testit0113()
throws Exception
{
public void testit0113() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0113");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -60,5 +53,4 @@ public class MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest
assertEquals("testuser", props.getProperty("test.username"));
assertEquals("testtest", props.getProperty("test.password"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0130CleanLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0130CleanLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenIT0130CleanLifecycleTest()
{
public MavenIT0130CleanLifecycleTest() {
super("[2.0.0,)");
}
@ -46,9 +41,7 @@ public class MavenIT0130CleanLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testit0130()
throws Exception
{
public void testit0130() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0130");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -59,5 +52,4 @@ public class MavenIT0130CleanLifecycleTest
verifier.verifyFilePresent("target/clean-clean.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0131SiteLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0131SiteLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenIT0131SiteLifecycleTest()
{
public MavenIT0131SiteLifecycleTest() {
super("[2.0.0,)");
}
@ -46,9 +41,7 @@ public class MavenIT0131SiteLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testit0131()
throws Exception
{
public void testit0131() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0131");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -60,5 +53,4 @@ public class MavenIT0131SiteLifecycleTest
verifier.verifyFilePresent("target/site-deploy.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0132PomLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0132PomLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenIT0132PomLifecycleTest()
{
public MavenIT0132PomLifecycleTest() {
super("[2.0.0,)");
}
@ -46,9 +41,7 @@ public class MavenIT0132PomLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testit0132()
throws Exception
{
public void testit0132() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0132");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -56,13 +49,11 @@ public class MavenIT0132PomLifecycleTest
verifier.setAutoclean(false);
verifier.addCliArgument("deploy");
verifier.execute();
if ( matchesVersionRange( "(2.0.1,3.0-alpha-1)" ) )
{
if (matchesVersionRange("(2.0.1,3.0-alpha-1)")) {
verifier.verifyFilePresent("target/site-attach-descriptor.txt");
}
verifier.verifyFilePresent("target/install-install.txt");
verifier.verifyFilePresent("target/deploy-deploy.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0133JarLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0133JarLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenIT0133JarLifecycleTest()
{
public MavenIT0133JarLifecycleTest() {
super("[2.0.0,)");
}
@ -46,9 +41,7 @@ public class MavenIT0133JarLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testit0133()
throws Exception
{
public void testit0133() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0133");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -66,5 +59,4 @@ public class MavenIT0133JarLifecycleTest
verifier.verifyFilePresent("target/deploy-deploy.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0134WarLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0134WarLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenIT0134WarLifecycleTest()
{
public MavenIT0134WarLifecycleTest() {
super("[2.0.0,)");
}
@ -46,9 +41,7 @@ public class MavenIT0134WarLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testit0134()
throws Exception
{
public void testit0134() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0134");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -66,5 +59,4 @@ public class MavenIT0134WarLifecycleTest
verifier.verifyFilePresent("target/deploy-deploy.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0135EjbLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0135EjbLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenIT0135EjbLifecycleTest()
{
public MavenIT0135EjbLifecycleTest() {
super("[2.0.0,)");
}
@ -46,9 +41,7 @@ public class MavenIT0135EjbLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testit0135()
throws Exception
{
public void testit0135() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0135");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -66,5 +59,4 @@ public class MavenIT0135EjbLifecycleTest
verifier.verifyFilePresent("target/deploy-deploy.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0136RarLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0136RarLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenIT0136RarLifecycleTest()
{
public MavenIT0136RarLifecycleTest() {
super("[2.0.0,)");
}
@ -46,9 +41,7 @@ public class MavenIT0136RarLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testit0136()
throws Exception
{
public void testit0136() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0136");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -66,5 +59,4 @@ public class MavenIT0136RarLifecycleTest
verifier.verifyFilePresent("target/deploy-deploy.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0137EarLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0137EarLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenIT0137EarLifecycleTest()
{
public MavenIT0137EarLifecycleTest() {
super("[2.0.0,)");
}
@ -46,9 +41,7 @@ public class MavenIT0137EarLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testit0137()
throws Exception
{
public void testit0137() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0137");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -63,5 +56,4 @@ public class MavenIT0137EarLifecycleTest
verifier.verifyFilePresent("target/deploy-deploy.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0138PluginLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0138PluginLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenIT0138PluginLifecycleTest()
{
public MavenIT0138PluginLifecycleTest() {
super("[2.0.0,)");
}
@ -46,9 +41,7 @@ public class MavenIT0138PluginLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testit0138()
throws Exception
{
public void testit0138() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0138");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -65,12 +58,10 @@ public class MavenIT0138PluginLifecycleTest
verifier.verifyFilePresent("target/jar-jar.txt");
verifier.verifyFilePresent("target/plugin-add-plugin-artifact-metadata.txt");
verifier.verifyFilePresent("target/install-install.txt");
if ( matchesVersionRange( "(,2.2.0)" ) )
{
if (matchesVersionRange("(,2.2.0)")) {
verifier.verifyFilePresent("target/plugin-update-registry.txt");
}
verifier.verifyFilePresent("target/deploy-deploy.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0139InterpolationWithProjectPrefixTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0139InterpolationWithProjectPrefixTest()
{
public class MavenIT0139InterpolationWithProjectPrefixTest extends AbstractMavenIntegrationTestCase {
public MavenIT0139InterpolationWithProjectPrefixTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenIT0139InterpolationWithProjectPrefixTest
* @throws Exception in case of failure
*/
@Test
public void testit0139()
throws Exception
{
public void testit0139() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0139");
File child = new File(testDir, "child");
@ -89,11 +82,9 @@ public class MavenIT0139InterpolationWithProjectPrefixTest
* NOTE: We intentionally do not check whether the build paths have been basedir aligned, that's another
* story...
*/
if ( matchesVersionRange( "(2.0.8,)" ) )
{
if (matchesVersionRange("(2.0.8,)")) {
assertTrue(props.getProperty(prefix + "projectBuildOut").endsWith("bin"));
}
assertTrue(props.getProperty(prefix + "projectSiteOut").endsWith("doc"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -34,11 +32,8 @@ import org.junit.jupiter.api.Test;
*
* @author Benjamin Bentmann
*/
public class MavenIT0140InterpolationWithPomPrefixTest
extends AbstractMavenIntegrationTestCase
{
public MavenIT0140InterpolationWithPomPrefixTest()
{
public class MavenIT0140InterpolationWithPomPrefixTest extends AbstractMavenIntegrationTestCase {
public MavenIT0140InterpolationWithPomPrefixTest() {
super("[2.0,4.0.0-alpha-1)");
}
@ -48,9 +43,7 @@ public class MavenIT0140InterpolationWithPomPrefixTest
* @throws Exception in case of failure
*/
@Test
public void testit0140()
throws Exception
{
public void testit0140() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0140");
File child = new File(testDir, "child");
@ -91,11 +84,9 @@ public class MavenIT0140InterpolationWithPomPrefixTest
* NOTE: We intentionally do not check whether the build paths have been basedir aligned, that's another
* story...
*/
if ( matchesVersionRange( "(2.0.8,)" ) )
{
if (matchesVersionRange("(2.0.8,)")) {
assertTrue(props.getProperty(prefix + "projectBuildOut").endsWith("bin"));
}
assertTrue(props.getProperty(prefix + "projectSiteOut").endsWith("doc"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,16 +30,13 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0142DirectDependencyScopesTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0142DirectDependencyScopesTest extends AbstractMavenIntegrationTestCase {
/*
* NOTE: Class path ordering is another issue (MNG-1412), so we merely check set containment here.
*/
public MavenIT0142DirectDependencyScopesTest()
{
public MavenIT0142DirectDependencyScopesTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -51,9 +46,7 @@ public class MavenIT0142DirectDependencyScopesTest
* @throws Exception in case of failure
*/
@Test
public void testit0142()
throws Exception
{
public void testit0142() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0142");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -69,9 +62,12 @@ public class MavenIT0142DirectDependencyScopesTest
verifier.verifyErrorFreeLog();
List<String> compileArtifacts = verifier.loadLines("target/compile-artifacts.txt", "UTF-8");
assertTrue( compileArtifacts.toString(), compileArtifacts.contains( "org.apache.maven.its.it0142:system:jar:0.1" ) );
assertTrue( compileArtifacts.toString(), compileArtifacts.contains( "org.apache.maven.its.it0142:provided:jar:0.1" ) );
assertTrue( compileArtifacts.toString(), compileArtifacts.contains( "org.apache.maven.its.it0142:compile:jar:0.1" ) );
assertTrue(
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0142:system:jar:0.1"));
assertTrue(
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0142:provided:jar:0.1"));
assertTrue(
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0142:compile:jar:0.1"));
assertEquals(3, compileArtifacts.size());
List<String> compileClassPath = verifier.loadLines("target/compile-cp.txt", "UTF-8");
@ -82,9 +78,13 @@ public class MavenIT0142DirectDependencyScopesTest
assertEquals(4, compileClassPath.size());
List<String> runtimeArtifacts = verifier.loadLines("target/runtime-artifacts.txt", "UTF-8");
assertTrue( runtimeArtifacts.toString(), runtimeArtifacts.contains( "org.apache.maven.its.it0142:compile:jar:0.1" ) );
assertTrue( runtimeArtifacts.toString(), runtimeArtifacts.contains( "org.apache.maven.its.it0142:runtime:jar:0.1" ) );
assertTrue( runtimeArtifacts.toString(), runtimeArtifacts.contains( "org.apache.maven.its.it0142:runtime:jar:retro:0.1" ) );
assertTrue(
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0142:compile:jar:0.1"));
assertTrue(
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:0.1"));
assertTrue(
runtimeArtifacts.toString(),
runtimeArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:retro:0.1"));
assertEquals(3, runtimeArtifacts.size());
List<String> runtimeClassPath = verifier.loadLines("target/runtime-cp.txt", "UTF-8");
@ -99,7 +99,8 @@ public class MavenIT0142DirectDependencyScopesTest
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:provided:jar:0.1"));
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:compile:jar:0.1"));
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:0.1"));
assertTrue( testArtifacts.toString(), testArtifacts.contains( "org.apache.maven.its.it0142:runtime:jar:retro:0.1" ) );
assertTrue(
testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:runtime:jar:retro:0.1"));
assertTrue(testArtifacts.toString(), testArtifacts.contains("org.apache.maven.its.it0142:test:jar:0.1"));
assertEquals(6, testArtifacts.size());
@ -114,5 +115,4 @@ public class MavenIT0142DirectDependencyScopesTest
assertTrue(testClassPath.toString(), testClassPath.contains("test-0.1.jar"));
assertEquals(8, testClassPath.size());
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,14 +16,14 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import java.util.Map;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,16 +31,13 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenIT0143TransitiveDependencyScopesTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0143TransitiveDependencyScopesTest extends AbstractMavenIntegrationTestCase {
/*
* NOTE: Class path ordering is another issue (MNG-1412), so we merely check set containment here.
*/
public MavenIT0143TransitiveDependencyScopesTest()
{
public MavenIT0143TransitiveDependencyScopesTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -53,9 +48,7 @@ public class MavenIT0143TransitiveDependencyScopesTest
* @throws Exception in case of failure
*/
@Test
public void testitCompileScope()
throws Exception
{
public void testitCompileScope() throws Exception {
Verifier verifier = run("compile");
String targetDir = "target-compile";
@ -65,8 +58,10 @@ public class MavenIT0143TransitiveDependencyScopesTest
* project imports A from direct dependency and A extends B from transitive dependency.
*/
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt", "UTF-8");
assertTrue( compileArtifacts.toString(), compileArtifacts.contains( "org.apache.maven.its.it0143:direct:jar:0.1" ) );
assertTrue( compileArtifacts.toString(), compileArtifacts.contains( "org.apache.maven.its.it0143:compile:jar:0.1" ) );
assertTrue(
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
assertTrue(
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
assertEquals(2, compileArtifacts.size());
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt", "UTF-8");
@ -76,9 +71,12 @@ public class MavenIT0143TransitiveDependencyScopesTest
assertEquals(3, compileClassPath.size());
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt", "UTF-8");
assertTrue( runtimeArtifacts.toString(), runtimeArtifacts.contains( "org.apache.maven.its.it0143:direct:jar:0.1" ) );
assertTrue( runtimeArtifacts.toString(), runtimeArtifacts.contains( "org.apache.maven.its.it0143:compile:jar:0.1" ) );
assertTrue( runtimeArtifacts.toString(), runtimeArtifacts.contains( "org.apache.maven.its.it0143:runtime:jar:0.1" ) );
assertTrue(
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
assertTrue(
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
assertTrue(
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
assertEquals(3, runtimeArtifacts.size());
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt", "UTF-8");
@ -110,16 +108,17 @@ public class MavenIT0143TransitiveDependencyScopesTest
* @throws Exception in case of failure
*/
@Test
public void testitProvidedScope()
throws Exception
{
public void testitProvidedScope() throws Exception {
Verifier verifier = run("provided");
String targetDir = "target-provided";
List<String> compileArtifacts = verifier.loadLines(targetDir + "/compile-artifacts.txt", "UTF-8");
assertTrue( compileArtifacts.toString(), compileArtifacts.contains( "org.apache.maven.its.it0143:direct:jar:0.1" ) );
assertTrue( compileArtifacts.toString(), compileArtifacts.contains( "org.apache.maven.its.it0143:compile:jar:0.1" ) );
assertTrue( compileArtifacts.toString(), compileArtifacts.contains( "org.apache.maven.its.it0143:runtime:jar:0.1" ) );
assertTrue(
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
assertTrue(
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
assertTrue(
compileArtifacts.toString(), compileArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
assertEquals(3, compileArtifacts.size());
List<String> compileClassPath = verifier.loadLines(targetDir + "/compile-cp.txt", "UTF-8");
@ -158,9 +157,7 @@ public class MavenIT0143TransitiveDependencyScopesTest
* @throws Exception in case of failure
*/
@Test
public void testitRuntimeScope()
throws Exception
{
public void testitRuntimeScope() throws Exception {
Verifier verifier = run("runtime");
String targetDir = "target-runtime";
@ -172,9 +169,12 @@ public class MavenIT0143TransitiveDependencyScopesTest
assertEquals(1, compileClassPath.size());
List<String> runtimeArtifacts = verifier.loadLines(targetDir + "/runtime-artifacts.txt", "UTF-8");
assertTrue( runtimeArtifacts.toString(), runtimeArtifacts.contains( "org.apache.maven.its.it0143:direct:jar:0.1" ) );
assertTrue( runtimeArtifacts.toString(), runtimeArtifacts.contains( "org.apache.maven.its.it0143:compile:jar:0.1" ) );
assertTrue( runtimeArtifacts.toString(), runtimeArtifacts.contains( "org.apache.maven.its.it0143:runtime:jar:0.1" ) );
assertTrue(
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:direct:jar:0.1"));
assertTrue(
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:compile:jar:0.1"));
assertTrue(
runtimeArtifacts.toString(), runtimeArtifacts.contains("org.apache.maven.its.it0143:runtime:jar:0.1"));
assertEquals(3, runtimeArtifacts.size());
List<String> runtimeClassPath = verifier.loadLines(targetDir + "/runtime-cp.txt", "UTF-8");
@ -206,9 +206,7 @@ public class MavenIT0143TransitiveDependencyScopesTest
* @throws Exception in case of failure
*/
@Test
public void testitTestScope()
throws Exception
{
public void testitTestScope() throws Exception {
Verifier verifier = run("test");
String targetDir = "target-test";
@ -241,9 +239,7 @@ public class MavenIT0143TransitiveDependencyScopesTest
assertEquals(5, testClassPath.size());
}
private Verifier run( String scope )
throws Exception
{
private Verifier run(String scope) throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0143");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -263,5 +259,4 @@ public class MavenIT0143TransitiveDependencyScopesTest
return verifier;
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,27 +16,23 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
* @author Benjamin Bentmann
*
*/
public class MavenIT0144LifecycleExecutionOrderTest
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0144LifecycleExecutionOrderTest extends AbstractMavenIntegrationTestCase {
public MavenIT0144LifecycleExecutionOrderTest()
{
public MavenIT0144LifecycleExecutionOrderTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +42,7 @@ public class MavenIT0144LifecycleExecutionOrderTest
* @throws Exception in case of failure
*/
@Test
public void testit0144()
throws Exception
{
public void testit0144() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0144");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -79,25 +71,21 @@ public class MavenIT0144LifecycleExecutionOrderTest
expected.add("generate-test-resources");
expected.add("process-test-resources");
expected.add("test-compile");
if ( matchesVersionRange( "(2.0.4,)" ) )
{
if (matchesVersionRange("(2.0.4,)")) {
// MNG-1508
expected.add("process-test-classes");
}
expected.add("test");
if ( matchesVersionRange( "(2.1.0-M1,)" ) )
{
if (matchesVersionRange("(2.1.0-M1,)")) {
// MNG-2097
expected.add("prepare-package");
}
expected.add("package");
if ( matchesVersionRange( "(2.0.1,)" ) )
{
if (matchesVersionRange("(2.0.1,)")) {
expected.add("pre-integration-test");
}
expected.add("integration-test");
if ( matchesVersionRange( "(2.0.1,)" ) )
{
if (matchesVersionRange("(2.0.1,)")) {
expected.add("post-integration-test");
}
expected.add("verify");
@ -112,5 +100,4 @@ public class MavenIT0144LifecycleExecutionOrderTest
List<String> phases = verifier.loadLines("target/phases.log", "UTF-8");
assertEquals(expected, phases);
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,15 +16,15 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
import java.util.Map;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.NetworkConnector;
import org.eclipse.jetty.server.Server;
@ -37,26 +35,20 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class MavenIT0146InstallerSnapshotNaming
extends AbstractMavenIntegrationTestCase
{
public class MavenIT0146InstallerSnapshotNaming extends AbstractMavenIntegrationTestCase {
private Server server;
private int port;
private final File testDir;
public MavenIT0146InstallerSnapshotNaming()
throws IOException
{
public MavenIT0146InstallerSnapshotNaming() throws IOException {
super("(2.0.2,)");
testDir = ResourceExtractor.simpleExtractResources(getClass(), "/it0146");
}
@BeforeEach
protected void setUp()
throws Exception
{
protected void setUp() throws Exception {
ResourceHandler resourceHandler = new ResourceHandler();
resourceHandler.setResourceBase(new File(testDir, "repo").getAbsolutePath());
HandlerList handlers = new HandlerList();
@ -65,30 +57,23 @@ public class MavenIT0146InstallerSnapshotNaming
server = new Server(0);
server.setHandler(handlers);
server.start();
if ( server.isFailed() )
{
if (server.isFailed()) {
fail("Couldn't bind the server socket to a free port!");
}
port = ((NetworkConnector) server.getConnectors()[0]).getLocalPort();
System.out.println("Bound server socket to the port " + port);
}
@AfterEach
protected void tearDown()
throws Exception
{
if ( server != null )
{
protected void tearDown() throws Exception {
if (server != null) {
server.stop();
server.join();
}
}
@Test
public void testitRemoteDownloadTimestampedName()
throws Exception
{
public void testitRemoteDownloadTimestampedName() throws Exception {
Verifier verifier = newVerifier(testDir.getAbsolutePath());
Map<String, String> properties = verifier.newDefaultFilterMap();
@ -113,11 +98,8 @@ public class MavenIT0146InstallerSnapshotNaming
verifier.verifyFilePresent("target/appassembler/repo/dep-0.1-20110726.105319-1.jar");
}
@Test
public void testitNonTimestampedNameWithInstalledSNAPSHOT()
throws Exception
{
public void testitNonTimestampedNameWithInstalledSNAPSHOT() throws Exception {
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.deleteArtifacts("org.apache.maven.its.it0146");
verifier.addCliArgument("-f");
@ -141,7 +123,6 @@ public class MavenIT0146InstallerSnapshotNaming
verifier.addCliArgument("settings.xml");
verifier.setLogFileName("log3.txt");
verifier.addCliArgument("-X");
verifier.deleteDirectory("target");

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
public class MavenIT0199CyclicImportScopeTest extends AbstractMavenIntegrationTestCase {
@ -36,7 +34,8 @@ public class MavenIT0199CyclicImportScopeTest extends AbstractMavenIntegrationTe
public void testit0199() throws Exception {
// v1: parent not using BOM; explicit dep from componentB componentA
// v2: BOM introduced; componentB componentA picks up implicit version 1 from main@v1
// v3: components now inheriting indirectly from an older version of the BOM that includes them; componentB componentA version overridden
// v3: components now inheriting indirectly from an older version of the BOM that includes them; componentB
// componentA version overridden
for (int i = 1; i <= 3; i++) {
build("v" + i + "/parent", null);
build("v" + i + "/componentA", "target/componentA-" + i + ".jar");
@ -57,5 +56,4 @@ public class MavenIT0199CyclicImportScopeTest extends AbstractMavenIntegrationTe
}
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITBootstrapTest
extends AbstractMavenIntegrationTestCase
{
public MavenITBootstrapTest()
{
public class MavenITBootstrapTest extends AbstractMavenIntegrationTestCase {
public MavenITBootstrapTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,16 +42,15 @@ public class MavenITBootstrapTest
* @throws Exception in case of failure
*/
@Test
public void testBootstrap()
throws Exception
{
public void testBootstrap() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/bootstrap");
Verifier verifier = newVerifier(testDir.getAbsolutePath(), "remote");
verifier.setAutoclean(false);
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
verifier.addCliArgument( "-Dbootstrap=" + getClass().getResource( "/bootstrap.txt" ).toURI().getPath() );
verifier.addCliArgument("-Dbootstrap="
+ getClass().getResource("/bootstrap.txt").toURI().getPath());
// bootstrap plugin is bound to this phase, do not go further
// important: maven-plugin packaging will fail at package phase, as there is no Mojo present!
@ -64,5 +58,4 @@ public class MavenITBootstrapTest
verifier.execute();
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.VerificationException;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.VerificationException;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0095ReactorFailureBehaviorTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0095ReactorFailureBehaviorTest()
{
public class MavenITmng0095ReactorFailureBehaviorTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0095ReactorFailureBehaviorTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng0095ReactorFailureBehaviorTest
* @throws Exception in case of failure
*/
@Test
public void testitFailFast()
throws Exception
{
public void testitFailFast() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0095");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -61,14 +54,11 @@ public class MavenITmng0095ReactorFailureBehaviorTest
verifier.deleteDirectory("subproject3/target");
verifier.addCliArgument("--fail-fast");
verifier.setLogFileName("log-ff.txt");
try
{
try {
verifier.addCliArgument("org.apache.maven.its.plugins:maven-it-plugin-touch:touch");
verifier.execute();
verifier.verifyErrorFreeLog();
}
catch ( VerificationException e )
{
} catch (VerificationException e) {
// expected
}
@ -85,9 +75,7 @@ public class MavenITmng0095ReactorFailureBehaviorTest
* @throws Exception in case of failure
*/
@Test
public void testitFailNever()
throws Exception
{
public void testitFailNever() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0095");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -115,9 +103,7 @@ public class MavenITmng0095ReactorFailureBehaviorTest
* @throws Exception in case of failure
*/
@Test
public void testitFailAtEnd()
throws Exception
{
public void testitFailAtEnd() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0095");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -128,14 +114,11 @@ public class MavenITmng0095ReactorFailureBehaviorTest
verifier.deleteDirectory("subproject3/target");
verifier.addCliArgument("--fail-at-end");
verifier.setLogFileName("log-fae.txt");
try
{
try {
verifier.addCliArgument("org.apache.maven.its.plugins:maven-it-plugin-touch:touch");
verifier.execute();
verifier.verifyErrorFreeLog();
}
catch ( VerificationException e )
{
} catch (VerificationException e) {
// expected
}
@ -144,5 +127,4 @@ public class MavenITmng0095ReactorFailureBehaviorTest
verifier.verifyFilePresent("subproject2/target/touch.txt");
verifier.verifyFileNotPresent("subproject3/target/touch.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,9 +16,7 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.ArrayList;
@ -29,6 +25,8 @@ import java.util.Collections;
import java.util.List;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -36,12 +34,9 @@ import org.junit.jupiter.api.Test;
*
* @author Benjamin Bentmann
*/
public class MavenITmng0187CollectedProjectsTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0187CollectedProjectsTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0187CollectedProjectsTest()
{
public MavenITmng0187CollectedProjectsTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -52,9 +47,7 @@ public class MavenITmng0187CollectedProjectsTest
* @throws Exception in case of failure
*/
@Test
public void testit()
throws Exception
{
public void testit() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0187");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -81,15 +74,12 @@ public class MavenITmng0187CollectedProjectsTest
assertEquals(Arrays.asList(new String[] {}), getProjects(props));
}
private List<String> getProjects( Properties props )
{
private List<String> getProjects(Properties props) {
List<String> projects = new ArrayList<>();
for ( Object o : props.keySet() )
{
for (Object o : props.keySet()) {
String key = o.toString();
if ( key.startsWith( "project.collectedProjects." ) && !key.endsWith( ".size" ) )
{
if (key.startsWith("project.collectedProjects.") && !key.endsWith(".size")) {
projects.add(props.getProperty(key));
}
}
@ -98,5 +88,4 @@ public class MavenITmng0187CollectedProjectsTest
return projects;
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng0249ResolveDepsFromReactorTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0249ResolveDepsFromReactorTest()
{
public class MavenITmng0249ResolveDepsFromReactorTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0249ResolveDepsFromReactorTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0249ResolveDepsFromReactorTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0249()
throws Exception
{
public void testitMNG0249() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0249");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -73,5 +66,4 @@ public class MavenITmng0249ResolveDepsFromReactorTest
assertTrue(tcp.toString(), tcp.contains("test-component-b/classes"));
assertTrue(tcp.toString(), tcp.contains("test-component-a/classes"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0282NonReactorExecWhenProjectIndependentTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0282NonReactorExecWhenProjectIndependentTest()
{
public class MavenITmng0282NonReactorExecWhenProjectIndependentTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0282NonReactorExecWhenProjectIndependentTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenITmng0282NonReactorExecWhenProjectIndependentTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG282()
throws Exception
{
public void testitMNG282() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0282");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -61,5 +54,4 @@ public class MavenITmng0282NonReactorExecWhenProjectIndependentTest
verifier.verifyFileNotPresent("subproject/target/touch.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0294MergeGlobalAndUserSettingsTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0294MergeGlobalAndUserSettingsTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0294MergeGlobalAndUserSettingsTest()
{
public MavenITmng0294MergeGlobalAndUserSettingsTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0294MergeGlobalAndUserSettingsTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG294()
throws Exception
{
public void testitMNG294() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0294");
Verifier verifier = new Verifier(testDir.getAbsolutePath());
@ -66,5 +59,4 @@ public class MavenITmng0294MergeGlobalAndUserSettingsTest
verifier.verifyFilePresent("target/test.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0377PluginLookupFromPrefixTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0377PluginLookupFromPrefixTest()
{
public class MavenITmng0377PluginLookupFromPrefixTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0377PluginLookupFromPrefixTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0377PluginLookupFromPrefixTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG377()
throws Exception
{
public void testitMNG377() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0377");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -66,5 +59,4 @@ public class MavenITmng0377PluginLookupFromPrefixTest
verifier.verifyFilePresent("target/file.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITmng0449PluginVersionResolutionTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0449PluginVersionResolutionTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0449PluginVersionResolutionTest()
{
public MavenITmng0449PluginVersionResolutionTest() {
super("[2.0,)");
}
@ -48,21 +43,16 @@ public class MavenITmng0449PluginVersionResolutionTest
* @throws Exception in case of failure
*/
@Test
public void testitLifecycleInvocation()
throws Exception
{
public void testitLifecycleInvocation() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0449");
testDir = new File(testDir, "lifecycle");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
try
{
try {
verifier.deleteArtifacts("org.apache.maven.its.mng0449");
}
catch ( Exception e )
{
} catch (Exception e) {
// when we run Maven embedded, the plugin class realm locks the artifacts so we can't delete them
}
verifier.addCliArgument("--settings");
@ -73,13 +63,10 @@ public class MavenITmng0449PluginVersionResolutionTest
verifier.verifyErrorFreeLog();
// Maven 3.x prefers RELEASE over LATEST (see MNG-4206)
if ( matchesVersionRange( "(,3.0-alpha-3)" ) )
{
if (matchesVersionRange("(,3.0-alpha-3)")) {
verifier.verifyFileNotPresent("target/touch-release.txt");
verifier.verifyFilePresent("target/touch-snapshot.txt");
}
else
{
} else {
verifier.verifyFilePresent("target/touch-release.txt");
verifier.verifyFileNotPresent("target/touch-snapshot.txt");
}
@ -93,21 +80,16 @@ public class MavenITmng0449PluginVersionResolutionTest
* @throws Exception in case of failure
*/
@Test
public void testitCliInvocation()
throws Exception
{
public void testitCliInvocation() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0449");
testDir = new File(testDir, "direct");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
try
{
try {
verifier.deleteArtifacts("org.apache.maven.its.mng0449");
}
catch ( Exception e )
{
} catch (Exception e) {
// when we run Maven embedded, the plugin class realm locks the artifacts so we can't delete them
}
verifier.addCliArgument("--settings");
@ -118,16 +100,12 @@ public class MavenITmng0449PluginVersionResolutionTest
verifier.verifyErrorFreeLog();
// Maven 3.x prefers RELEASE over LATEST (see MNG-4206)
if ( matchesVersionRange( "(,3.0-alpha-3)" ) )
{
if (matchesVersionRange("(,3.0-alpha-3)")) {
verifier.verifyFileNotPresent("target/touch-release.txt");
verifier.verifyFilePresent("target/touch-snapshot.txt");
}
else
{
} else {
verifier.verifyFilePresent("target/touch-release.txt");
verifier.verifyFileNotPresent("target/touch-snapshot.txt");
}
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
*
* @author Benjamin Bentmann
*/
public class MavenITmng0461TolerateMissingDependencyPomTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0461TolerateMissingDependencyPomTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0461TolerateMissingDependencyPomTest()
{
public MavenITmng0461TolerateMissingDependencyPomTest() {
super("[2.0.3,3.0-alpha-1),[3.0-alpha-2,)");
}
@ -47,9 +42,7 @@ public class MavenITmng0461TolerateMissingDependencyPomTest
* @throws Exception in case of failure
*/
@Test
public void testit()
throws Exception
{
public void testit() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0461");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -66,5 +59,4 @@ public class MavenITmng0461TolerateMissingDependencyPomTest
List<String> classpath = verifier.loadLines("target/classpath.txt", "UTF-8");
assertTrue(classpath.toString(), classpath.contains("dep-0.1.jar"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,12 +31,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITmng0469ReportConfigTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0469ReportConfigTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0469ReportConfigTest()
{
public MavenITmng0469ReportConfigTest() {
super("[2.0.0,)");
}
@ -48,9 +43,7 @@ public class MavenITmng0469ReportConfigTest
* @throws Exception in case of failure
*/
@Test
public void testitBuildConfigDominantDuringBuild()
throws Exception
{
public void testitBuildConfigDominantDuringBuild() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0469/test1");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -69,29 +62,25 @@ public class MavenITmng0469ReportConfigTest
* @throws Exception in case of failure
*/
@Test
public void testitBuildConfigIrrelevantForReports()
throws Exception
{
public void testitBuildConfigIrrelevantForReports() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0469/test2");
Verifier verifier = newVerifier(testDir.getAbsolutePath(), "remote");
verifier.deleteDirectory("target");
verifier.setAutoclean(false);
if ( matchesVersionRange( "(,3.0-alpha-1)" ) )
{
if (matchesVersionRange("(,3.0-alpha-1)")) {
verifier.addCliArgument("org.apache.maven.its.plugins:maven-it-plugin-site:2.1-SNAPSHOT:generate");
verifier.execute();
verifier.verifyFilePresent("target/site/info.properties");
}
else
{
} else {
verifier.addCliArgument("validate");
verifier.execute();
Properties props = verifier.loadProperties("target/config.properties");
assertEquals("maven-it-plugin-site", props.getProperty("project.reporting.plugins.0.artifactId"));
assertNotEquals( "fail.properties", props.getProperty( "project.reporting.plugins.0.configuration.children.infoFile.0.value" ) );
assertNotEquals(
"fail.properties",
props.getProperty("project.reporting.plugins.0.configuration.children.infoFile.0.value"));
}
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,14 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Arrays;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -34,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng0471CustomLifecycleTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0471CustomLifecycleTest()
{
public class MavenITmng0471CustomLifecycleTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0471CustomLifecycleTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,15 +41,14 @@ public class MavenITmng0471CustomLifecycleTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG471()
throws Exception
{
public void testitMNG471() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0471");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
verifier.addCliArguments( "org.apache.maven.its.plugins:maven-it-plugin-fork:fork",
verifier.addCliArguments(
"org.apache.maven.its.plugins:maven-it-plugin-fork:fork",
"org.apache.maven.its.plugins:maven-it-plugin-fork:fork-goal");
verifier.execute();
verifier.verifyErrorFreeLog();
@ -64,5 +56,4 @@ public class MavenITmng0471CustomLifecycleTest
verifier.verifyFilePresent("target/forked/touch.txt");
verifier.verifyFilePresent("target/forked2/touch.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,14 +16,14 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.VerificationException;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.VerificationException;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -34,11 +32,8 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITmng0479OverrideCentralRepoTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0479OverrideCentralRepoTest()
{
public class MavenITmng0479OverrideCentralRepoTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0479OverrideCentralRepoTest() {
super("[2.0.3,3.0-alpha-1),[3.0-beta-3,)");
}
@ -48,9 +43,7 @@ public class MavenITmng0479OverrideCentralRepoTest
* @throws Exception in case of failure
*/
@Test
public void testitModel()
throws Exception
{
public void testitModel() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0479");
// Phase 1: Ensure the test plugin is downloaded before the test cuts off access to central
@ -81,11 +74,9 @@ public class MavenITmng0479OverrideCentralRepoTest
int count = Integer.parseInt(props.getProperty("project.repositories", "0"));
assertTrue(count > 0);
for ( int i = 0; i < count; i++ )
{
for (int i = 0; i < count; i++) {
String key = "project.repositories." + i;
if ( "central".equals( props.getProperty( key + ".id" ) ) )
{
if ("central".equals(props.getProperty(key + ".id"))) {
assertEquals("mng-0479", props.getProperty(key + ".name"));
assertTrue(props.getProperty(key + ".url").endsWith("/target/mng-0479"));
@ -100,11 +91,9 @@ public class MavenITmng0479OverrideCentralRepoTest
}
count = Integer.parseInt(props.getProperty("project.pluginRepositories", "0"));
for ( int i = 0; i < count; i++ )
{
for (int i = 0; i < count; i++) {
String key = "project.pluginRepositories." + i;
if ( "central".equals( props.getProperty( key + ".id" ) ) )
{
if ("central".equals(props.getProperty(key + ".id"))) {
assertEquals("mng-0479", props.getProperty(key + ".name"));
assertTrue(props.getProperty(key + ".url").endsWith("/target/mng-0479"));
@ -125,9 +114,7 @@ public class MavenITmng0479OverrideCentralRepoTest
* @throws Exception in case of failure
*/
@Test
public void testitResolution()
throws Exception
{
public void testitResolution() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0479");
Verifier verifier = newVerifier(new File(testDir, "test-1").getAbsolutePath());
@ -155,15 +142,12 @@ public class MavenITmng0479OverrideCentralRepoTest
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
try
{
try {
verifier.addCliArgument("validate");
verifier.execute();
verifier.verifyErrorFreeLog();
fail("Build should have failed to resolve parent POM");
}
catch ( VerificationException e )
{
} catch (VerificationException e) {
// expected
}
@ -175,15 +159,12 @@ public class MavenITmng0479OverrideCentralRepoTest
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
try
{
try {
verifier.addCliArgument("org.apache.maven.its.mng0479:maven-mng0479-plugin:0.1-SNAPSHOT:touch");
verifier.execute();
verifier.verifyErrorFreeLog();
fail("Build should have failed to resolve direct dependency");
}
catch ( VerificationException e )
{
} catch (VerificationException e) {
// expected
}
@ -196,20 +177,16 @@ public class MavenITmng0479OverrideCentralRepoTest
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8");
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
try
{
try {
verifier.addCliArgument("org.apache.maven.its.mng0479:maven-mng0479-plugin:0.1-SNAPSHOT:touch");
verifier.execute();
verifier.verifyErrorFreeLog();
fail("Build should have failed to resolve transitive dependency");
}
catch ( VerificationException e )
{
} catch (VerificationException e) {
// expected
}
verifier.verifyArtifactNotPresent("org.apache.maven.its.mng0479", "b", "0.1", "jar");
verifier.verifyArtifactNotPresent("org.apache.maven.its.mng0479", "b", "0.1", "pom");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0496IgnoreUnknownPluginParametersTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0496IgnoreUnknownPluginParametersTest()
{
public class MavenITmng0496IgnoreUnknownPluginParametersTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0496IgnoreUnknownPluginParametersTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0496IgnoreUnknownPluginParametersTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG496()
throws Exception
{
public void testitMNG496() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0496");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -60,5 +53,4 @@ public class MavenITmng0496IgnoreUnknownPluginParametersTest
verifier.verifyFilePresent("target/file.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Collection;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,15 +31,12 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng0505VersionRangeTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0505VersionRangeTest extends AbstractMavenIntegrationTestCase {
/**
* Oleg 2009.04.30: the same functionality but simpler - no multiple ranges - syntax
* is tested in MNG-4150
*/
public MavenITmng0505VersionRangeTest()
{
public MavenITmng0505VersionRangeTest() {
super("(,3.0-alpha-1),[3.0-alpha-3,)");
}
@ -51,9 +46,7 @@ public class MavenITmng0505VersionRangeTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG505()
throws Exception
{
public void testitMNG505() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0505");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -74,5 +67,4 @@ public class MavenITmng0505VersionRangeTest
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0505:c:jar:3.8"));
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0505:d:jar:2.1.1"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng0507ArtifactRelocationTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0507ArtifactRelocationTest()
{
public class MavenITmng0507ArtifactRelocationTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0507ArtifactRelocationTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0507ArtifactRelocationTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG507()
throws Exception
{
public void testitMNG507() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0507");
Verifier verifier = newVerifier(testDir.getAbsolutePath(), "remote");
@ -71,5 +64,4 @@ public class MavenITmng0507ArtifactRelocationTest
List<String> artifacts = verifier.loadLines("target/artifacts.txt", "UTF-8");
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven:maven-core-it-support:jar:1.1"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0522InheritedPluginMgmtConfigTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0522InheritedPluginMgmtConfigTest()
{
public class MavenITmng0522InheritedPluginMgmtConfigTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0522InheritedPluginMgmtConfigTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenITmng0522InheritedPluginMgmtConfigTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG522()
throws Exception
{
public void testitMNG522() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0522");
Verifier verifier = newVerifier(new File(testDir, "child-project").getAbsolutePath());
@ -61,5 +54,4 @@ public class MavenITmng0522InheritedPluginMgmtConfigTest
verifier.verifyFilePresent("target/plugin-mngt-config-1.txt");
verifier.verifyFilePresent("target/plugin-mngt-config-2.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,15 +16,15 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.security.HashLoginService;
@ -49,9 +47,7 @@ import static org.eclipse.jetty.util.security.Constraint.__BASIC_AUTH;
*
* @author Benjamin Bentmann
*/
public class MavenITmng0553SettingsAuthzEncryptionTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0553SettingsAuthzEncryptionTest extends AbstractMavenIntegrationTestCase {
private File testDir;
@ -59,15 +55,12 @@ public class MavenITmng0553SettingsAuthzEncryptionTest
private int port;
public MavenITmng0553SettingsAuthzEncryptionTest()
{
public MavenITmng0553SettingsAuthzEncryptionTest() {
super("[2.1.0,3.0-alpha-1),[3.0-alpha-3,)");
}
@BeforeEach
protected void setUp()
throws Exception
{
protected void setUp() throws Exception {
testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0553");
Constraint constraint = new Constraint(__BASIC_AUTH, "user");
@ -98,8 +91,7 @@ public class MavenITmng0553SettingsAuthzEncryptionTest
server.setHandler(handlerList);
server.start();
if ( server.isFailed() )
{
if (server.isFailed()) {
fail("Couldn't bind the server socket to a free port!");
}
port = ((NetworkConnector) server.getConnectors()[0]).getLocalPort();
@ -107,11 +99,8 @@ public class MavenITmng0553SettingsAuthzEncryptionTest
}
@AfterEach
protected void tearDown()
throws Exception
{
if ( server != null )
{
protected void tearDown() throws Exception {
if (server != null) {
server.stop();
server.join();
}
@ -123,9 +112,7 @@ public class MavenITmng0553SettingsAuthzEncryptionTest
* @throws Exception in case of failure
*/
@Test
public void testitBasic()
throws Exception
{
public void testitBasic() throws Exception {
testDir = new File(testDir, "test-1");
Map<String, String> filterProps = new HashMap<>();
@ -153,15 +140,14 @@ public class MavenITmng0553SettingsAuthzEncryptionTest
* @throws Exception in case of failure
*/
@Test
public void testitRelocation()
throws Exception
{
public void testitRelocation() throws Exception {
testDir = new File(testDir, "test-2");
Map<String, String> filterProps = new HashMap<>();
filterProps.put("@port@", Integer.toString(port));
// NOTE: The upper-case scheme name is essential part of the test
String secUrl = "FILE://" + new File( testDir, "relocated-settings-security.xml" ).toURI().getRawPath();
String secUrl = "FILE://"
+ new File(testDir, "relocated-settings-security.xml").toURI().getRawPath();
filterProps.put("@relocation@", secUrl);
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -176,7 +162,10 @@ public class MavenITmng0553SettingsAuthzEncryptionTest
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
// NOTE: The selection of the Turkish language for the JVM locale is essential part of the test
verifier.setEnvironmentVariable( "MAVEN_OPTS", "-Dsettings.security=" + new File( testDir, "settings~security.xml" ).getAbsolutePath() + " -Duser.language=tr" );
verifier.setEnvironmentVariable(
"MAVEN_OPTS",
"-Dsettings.security=" + new File(testDir, "settings~security.xml").getAbsolutePath()
+ " -Duser.language=tr");
verifier.addCliArgument("validate");
verifier.execute();
verifier.verifyErrorFreeLog();
@ -190,9 +179,7 @@ public class MavenITmng0553SettingsAuthzEncryptionTest
* @throws Exception in case of failure
*/
@Test
public void testitEncryption()
throws Exception
{
public void testitEncryption() throws Exception {
requiresMavenVersion("[2.1.0,3.0-alpha-1),[3.0-alpha-7,)");
testDir = new File(testDir, "test-3");
@ -224,12 +211,9 @@ public class MavenITmng0553SettingsAuthzEncryptionTest
assertNotNull(findPassword(log));
}
private String findPassword( List<String> log )
{
for ( String line : log )
{
if ( line.matches( ".*\\{[A-Za-z0-9+/=]+\\}.*" ) )
{
private String findPassword(List<String> log) {
for (String line : log) {
if (line.matches(".*\\{[A-Za-z0-9+/=]+\\}.*")) {
return line;
}
}
@ -237,16 +221,12 @@ public class MavenITmng0553SettingsAuthzEncryptionTest
return null;
}
private void setUserHome( Verifier verifier, File home )
{
private void setUserHome(Verifier verifier, File home) {
// NOTE: We set the user.home directory instead of say settings.security to reflect Maven's normal behavior
String path = home.getAbsolutePath();
if ( path.indexOf( ' ' ) < 0 )
{
if (path.indexOf(' ') < 0) {
verifier.setEnvironmentVariable("MAVEN_OPTS", "-Duser.home=" + path);
}
else
{
} else {
verifier.setEnvironmentVariable("MAVEN_OPTS", "\"-Duser.home=" + path + "\"");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0557UserSettingsCliOptionTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0557UserSettingsCliOptionTest()
{
public class MavenITmng0557UserSettingsCliOptionTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0557UserSettingsCliOptionTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenITmng0557UserSettingsCliOptionTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG557()
throws Exception
{
public void testitMNG557() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0557");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -62,5 +55,4 @@ public class MavenITmng0557UserSettingsCliOptionTest
verifier.verifyFilePresent("target/test.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@ -34,11 +32,8 @@ import org.junit.jupiter.api.Test;
*
*/
@Disabled
public class MavenITmng0612NewestConflictResolverTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0612NewestConflictResolverTest()
{
public class MavenITmng0612NewestConflictResolverTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0612NewestConflictResolverTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng0612NewestConflictResolverTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG612()
throws Exception
{
public void testitMNG612() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0612/dependency");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.addCliArgument("install");

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0666IgnoreLegacyPomTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0666IgnoreLegacyPomTest()
{
public class MavenITmng0666IgnoreLegacyPomTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0666IgnoreLegacyPomTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng0666IgnoreLegacyPomTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG666()
throws Exception
{
public void testitMNG666() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0666");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -69,5 +62,4 @@ public class MavenITmng0666IgnoreLegacyPomTest
List<String> artifacts = verifier.loadLines("target/artifacts.txt", "UTF-8");
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.it0059:test:jar:3.8.1"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -34,12 +32,9 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0674PluginParameterAliasTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0674PluginParameterAliasTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0674PluginParameterAliasTest()
{
public MavenITmng0674PluginParameterAliasTest() {
super("[3.0,)");
}
@ -49,9 +44,7 @@ public class MavenITmng0674PluginParameterAliasTest
* @throws Exception in case of failure
*/
@Test
public void testitLifecycle()
throws Exception
{
public void testitLifecycle() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0674");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -74,9 +67,7 @@ public class MavenITmng0674PluginParameterAliasTest
* @throws Exception in case of failure
*/
@Test
public void testitCli()
throws Exception
{
public void testitCli() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0674");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -92,5 +83,4 @@ public class MavenITmng0674PluginParameterAliasTest
assertEquals("MNG-674-2", props.getProperty("aliasDefaultExpressionParam"));
assertEquals("MNG-4997", props.getProperty("aliasStringParams.0"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng0680ParentBasedirTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0680ParentBasedirTest()
{
public class MavenITmng0680ParentBasedirTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0680ParentBasedirTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0680ParentBasedirTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG680()
throws Exception
{
public void testitMNG680() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0680");
testDir = testDir.getCanonicalFile();
@ -67,5 +60,4 @@ public class MavenITmng0680ParentBasedirTest
assertEquals(subDir, new File(props.getProperty("project.basedir")));
assertEquals(testDir, new File(props.getProperty("project.parent.basedir")));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng0761MissingSnapshotDistRepoTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0761MissingSnapshotDistRepoTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0761MissingSnapshotDistRepoTest()
{
public MavenITmng0761MissingSnapshotDistRepoTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng0761MissingSnapshotDistRepoTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG761()
throws Exception
{
public void testitMNG761() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0761");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -63,5 +56,4 @@ public class MavenITmng0761MissingSnapshotDistRepoTest
verifier.verifyFilePresent("target/repo/org/apache/maven/its/mng0761/test/1.0-SNAPSHOT/test-1.0-*.jar");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,10 +16,7 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.VerificationException;
package org.apache.maven.it;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -34,6 +29,9 @@ import java.util.Collections;
import java.util.List;
import java.util.Properties;
import org.apache.maven.shared.verifier.VerificationException;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.NetworkConnector;
import org.eclipse.jetty.server.Request;
@ -47,12 +45,9 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0768OfflineModeTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0768OfflineModeTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0768OfflineModeTest()
{
public MavenITmng0768OfflineModeTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -62,19 +57,15 @@ public class MavenITmng0768OfflineModeTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG768()
throws Exception
{
public void testitMNG768() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0768");
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<String>());
Handler repoHandler = new AbstractHandler()
{
public void handle( String target, Request baseRequest, HttpServletRequest request,
HttpServletResponse response )
throws IOException
{
Handler repoHandler = new AbstractHandler() {
public void handle(
String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
throws IOException {
System.out.println("Handling " + request.getMethod() + " " + request.getRequestURL());
requestedUris.add(request.getRequestURI());
@ -83,21 +74,17 @@ public class MavenITmng0768OfflineModeTest
response.setStatus(HttpServletResponse.SC_OK);
if ( request.getRequestURI().endsWith( ".pom" ) )
{
if (request.getRequestURI().endsWith(".pom")) {
writer.println("<project>");
writer.println(" <modelVersion>4.0.0</modelVersion>");
writer.println(" <groupId>org.apache.maven.its.mng0768</groupId>");
writer.println(" <artifactId>dep</artifactId>");
writer.println(" <version>0.1</version>");
writer.println("</project>");
}
else if ( request.getRequestURI().endsWith( ".jar" ) )
{
} else if (request.getRequestURI().endsWith(".jar")) {
writer.println("empty");
}
else if ( request.getRequestURI().endsWith( ".md5" ) || request.getRequestURI().endsWith( ".sha1" ) )
{
} else if (request.getRequestURI().endsWith(".md5")
|| request.getRequestURI().endsWith(".sha1")) {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
}
@ -108,11 +95,9 @@ public class MavenITmng0768OfflineModeTest
Server server = new Server(0);
server.setHandler(repoHandler);
try
{
try {
server.start();
if ( server.isFailed() )
{
if (server.isFailed()) {
fail("Couldn't bind the server socket to a free port!");
}
@ -130,7 +115,8 @@ public class MavenITmng0768OfflineModeTest
verifier.filterFile("settings-template.xml", "settings.xml", "UTF-8", props);
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
verifier.addCliArgument( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
verifier.addCliArgument(
"org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile");
verifier.execute();
verifier.verifyFilePresent("target/compile.txt");
verifier.verifyErrorFreeLog();
@ -147,7 +133,8 @@ public class MavenITmng0768OfflineModeTest
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
verifier.setLogFileName("log2.txt");
verifier.addCliArgument( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
verifier.addCliArgument(
"org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile");
verifier.execute();
verifier.verifyFilePresent("target/compile.txt");
verifier.verifyErrorFreeLog();
@ -166,15 +153,13 @@ public class MavenITmng0768OfflineModeTest
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
verifier.setLogFileName("log3.txt");
try
{
verifier.addCliArgument( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
try {
verifier.addCliArgument(
"org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile");
verifier.execute();
verifier.verifyErrorFreeLog();
fail("Build did not fail to resolve missing dependency although Maven ought to work offline!");
}
catch( VerificationException e )
{
} catch (VerificationException e) {
// expected, should fail
}
}
@ -182,9 +167,7 @@ public class MavenITmng0768OfflineModeTest
System.out.println("Bound server socket to the port " + port);
assertTrue(requestedUris.toString(), requestedUris.isEmpty());
}
finally
{
} finally {
server.stop();
server.join();
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0773SettingsProfileReactorPollutionTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0773SettingsProfileReactorPollutionTest()
{
public class MavenITmng0773SettingsProfileReactorPollutionTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0773SettingsProfileReactorPollutionTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenITmng0773SettingsProfileReactorPollutionTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG773()
throws Exception
{
public void testitMNG773() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0773");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -59,5 +52,4 @@ public class MavenITmng0773SettingsProfileReactorPollutionTest
verifier.execute();
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0781PluginConfigVsExecConfigTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0781PluginConfigVsExecConfigTest()
{
public class MavenITmng0781PluginConfigVsExecConfigTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0781PluginConfigVsExecConfigTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0781PluginConfigVsExecConfigTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0781()
throws Exception
{
public void testitMNG0781() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0781");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -62,5 +55,4 @@ public class MavenITmng0781PluginConfigVsExecConfigTest
verifier.verifyFilePresent("target/exec-level.txt");
verifier.verifyFilePresent("target/resources-resources.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0786ProfileAwareReactorTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0786ProfileAwareReactorTest()
{
public class MavenITmng0786ProfileAwareReactorTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0786ProfileAwareReactorTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0786ProfileAwareReactorTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0786()
throws Exception
{
public void testitMNG0786() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0786");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -64,5 +57,4 @@ public class MavenITmng0786ProfileAwareReactorTest
verifier.verifyFilePresent("sub2/target/expression.properties");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0814ExplicitProfileActivationTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0814ExplicitProfileActivationTest()
{
public class MavenITmng0814ExplicitProfileActivationTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0814ExplicitProfileActivationTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0814ExplicitProfileActivationTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG814()
throws Exception
{
public void testitMNG814() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0814");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -64,5 +57,4 @@ public class MavenITmng0814ExplicitProfileActivationTest
Properties props = verifier.loadProperties("target/profile.properties");
assertEquals("PASSED", props.getProperty("project.properties.testProp"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,14 +16,14 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Collection;
import java.util.Collections;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -34,11 +32,8 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng0818WarDepsNotTransitiveTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0818WarDepsNotTransitiveTest()
{
public class MavenITmng0818WarDepsNotTransitiveTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0818WarDepsNotTransitiveTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng0818WarDepsNotTransitiveTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0818()
throws Exception
{
public void testitMNG0818() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0818");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -67,5 +60,4 @@ public class MavenITmng0818WarDepsNotTransitiveTest
Collection<String> artifacts = verifier.loadLines("target/artifacts.txt", "UTF-8");
assertEquals(Collections.singletonList("org.apache.maven.its.it0080:war:war:0.1"), artifacts);
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Collection;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng0820ConflictResolutionTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0820ConflictResolutionTest()
{
public class MavenITmng0820ConflictResolutionTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0820ConflictResolutionTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0820ConflictResolutionTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0820()
throws Exception
{
public void testitMNG0820() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0820");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -70,5 +63,4 @@ public class MavenITmng0820ConflictResolutionTest
assertTrue(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0820:a:jar:1.0"));
assertFalse(artifacts.toString(), artifacts.contains("org.apache.maven.its.mng0505:b:jar:1.0"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,14 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Arrays;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -34,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0823MojoContextPassingTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0823MojoContextPassingTest()
{
public class MavenITmng0823MojoContextPassingTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0823MojoContextPassingTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,19 +41,17 @@ public class MavenITmng0823MojoContextPassingTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0823()
throws Exception
{
public void testitMNG0823() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0823");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
verifier.deleteDirectory("target");
verifier.addCliArguments( "org.apache.maven.its.plugins:maven-it-plugin-context-passing:throw",
verifier.addCliArguments(
"org.apache.maven.its.plugins:maven-it-plugin-context-passing:throw",
"org.apache.maven.its.plugins:maven-it-plugin-context-passing:catch");
verifier.execute();
verifier.verifyFilePresent("target/thrown-value");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,9 +16,7 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.text.SimpleDateFormat;
@ -28,6 +24,8 @@ import java.util.Date;
import java.util.Locale;
import org.apache.maven.shared.utils.io.FileUtils;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -35,14 +33,11 @@ import org.junit.jupiter.api.Test;
*
* @author Slawomir Jaranowski
*/
public class MavenITmng0828PluginConfigValuesInDebugTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0828PluginConfigValuesInDebugTest extends AbstractMavenIntegrationTestCase {
private static final String NL = System.lineSeparator();
public MavenITmng0828PluginConfigValuesInDebugTest()
{
public MavenITmng0828PluginConfigValuesInDebugTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -52,9 +47,7 @@ public class MavenITmng0828PluginConfigValuesInDebugTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0828()
throws Exception
{
public void testitMNG0828() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0828");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -69,7 +62,8 @@ public class MavenITmng0828PluginConfigValuesInDebugTest
checkLog(log, "[DEBUG] (f) aliasDefaultExpressionParam = test");
checkLog(log, "[DEBUG] (f) basedir = " + testDir.getCanonicalPath());
checkLog( log,
checkLog(
log,
"[DEBUG] (f) beanParam = org.apache.maven.plugin.coreit.Bean[fieldParam=field, setterParam=setter, setterCalled=true]");
checkLog(log, "[DEBUG] (f) booleanParam = true");
checkLog(log, "[DEBUG] (f) byteParam = 42");
@ -99,7 +93,9 @@ public class MavenITmng0828PluginConfigValuesInDebugTest
// Map items order is not guaranteed, so only check begin of params ...
checkLog(log, "[DEBUG] (f) mapParam = {key");
checkLog( log, "[DEBUG] (f) propertiesFile = "
checkLog(
log,
"[DEBUG] (f) propertiesFile = "
+ new File(testDir, "target/plugin-config.properties").getCanonicalPath());
// Properties item order is not guaranteed, so only check begin of params ...
@ -112,10 +108,9 @@ public class MavenITmng0828PluginConfigValuesInDebugTest
checkLog(log, "[DEBUG] (s) setterParam = setter");
}
private void checkLog( String log, String expected )
{
assertTrue( NL + ">>>" + NL + log + "<<<" + NL + NL + "does not contains: " + NL + expected + NL,
private void checkLog(String log, String expected) {
assertTrue(
NL + ">>>" + NL + log + "<<<" + NL + NL + "does not contains: " + NL + expected + NL,
log.contains(expected));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.VerificationException;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.VerificationException;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITmng0836PluginParentResolutionTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0836PluginParentResolutionTest()
{
public class MavenITmng0836PluginParentResolutionTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0836PluginParentResolutionTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -49,9 +44,7 @@ public class MavenITmng0836PluginParentResolutionTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG836()
throws Exception
{
public void testitMNG836() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0836");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -62,26 +55,19 @@ public class MavenITmng0836PluginParentResolutionTest
verifier.addCliArgument("--settings");
verifier.addCliArgument("settings.xml");
// Maven 3.x aims to separate plugins and project dependencies (MNG-4191)
if ( matchesVersionRange( "(,3.0-alpha-1),(3.0-alpha-1,3.0-alpha-7)" ) )
{
if (matchesVersionRange("(,3.0-alpha-1),(3.0-alpha-1,3.0-alpha-7)")) {
verifier.addCliArgument("validate");
verifier.execute();
verifier.verifyErrorFreeLog();
}
else
{
try
{
} else {
try {
verifier.addCliArgument("validate");
verifier.execute();
verifier.verifyErrorFreeLog();
fail("Plugin parent POM was erroneously resolved from non-plugin repository.");
}
catch ( VerificationException e )
{
} catch (VerificationException e) {
// expected
}
}
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,12 +31,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITmng0848UserPropertyOverridesDefaultValueTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0848UserPropertyOverridesDefaultValueTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0848UserPropertyOverridesDefaultValueTest()
{
public MavenITmng0848UserPropertyOverridesDefaultValueTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng0848UserPropertyOverridesDefaultValueTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG848()
throws Exception
{
public void testitMNG848() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0848");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -65,5 +58,4 @@ public class MavenITmng0848UserPropertyOverridesDefaultValueTest
assertEquals("maven-core-it", configProps.getProperty("defaultParam"));
assertEquals("PASSED", configProps.getProperty("aliasDefaultExpressionParam"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -34,12 +32,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITmng0866EvaluateDefaultValueTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0866EvaluateDefaultValueTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0866EvaluateDefaultValueTest()
{
public MavenITmng0866EvaluateDefaultValueTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -49,9 +44,7 @@ public class MavenITmng0866EvaluateDefaultValueTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG866()
throws Exception
{
public void testitMNG866() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0866");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -63,7 +56,8 @@ public class MavenITmng0866EvaluateDefaultValueTest
Properties configProps = verifier.loadProperties("target/config.properties");
assertEquals("maven-core-it", configProps.getProperty("defaultParam"));
assertEquals( "org.apache.maven.its.mng0866:test:1.0-SNAPSHOT", configProps.getProperty( "defaultParamWithExpression" ) );
assertEquals(
"org.apache.maven.its.mng0866:test:1.0-SNAPSHOT",
configProps.getProperty("defaultParamWithExpression"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITmng0870ReactorAwarePluginDiscoveryTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0870ReactorAwarePluginDiscoveryTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0870ReactorAwarePluginDiscoveryTest()
{
public MavenITmng0870ReactorAwarePluginDiscoveryTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng0870ReactorAwarePluginDiscoveryTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0870()
throws Exception
{
public void testitMNG0870() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0870");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -66,5 +59,4 @@ public class MavenITmng0870ReactorAwarePluginDiscoveryTest
verifier.verifyFilePresent("project/target/touch.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
*
* @author Benjamin Bentmann
*/
public class MavenITmng0947OptionalDependencyTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng0947OptionalDependencyTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0947OptionalDependencyTest()
{
public MavenITmng0947OptionalDependencyTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng0947OptionalDependencyTest
* @throws Exception in case of failure
*/
@Test
public void testit()
throws Exception
{
public void testit() throws Exception {
failingMavenVersions("(,3.1.0-alpha-1)");
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0947");
@ -83,5 +76,4 @@ public class MavenITmng0947OptionalDependencyTest
assertTrue(test.toString(), test.contains("org.apache.maven.its.mng0947:e:jar:0.1 (optional)"));
assertEquals(3, test.size());
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest()
{
public class MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0956()
throws Exception
{
public void testitMNG0956() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0956");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -65,5 +58,4 @@ public class MavenITmng0956ComponentInjectionViaProjectLevelPluginDepTest
Properties apiProps = verifier.loadProperties("target/component.properties");
assertEquals("true", apiProps.getProperty("org.apache.maven.plugin.coreit.DefaultTestComponent"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng0985NonExecutedPluginMgmtGoalsTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng0985NonExecutedPluginMgmtGoalsTest()
{
public class MavenITmng0985NonExecutedPluginMgmtGoalsTest extends AbstractMavenIntegrationTestCase {
public MavenITmng0985NonExecutedPluginMgmtGoalsTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng0985NonExecutedPluginMgmtGoalsTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG0985()
throws Exception
{
public void testitMNG0985() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0985");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -60,5 +53,4 @@ public class MavenITmng0985NonExecutedPluginMgmtGoalsTest
verifier.verifyFileNotPresent("target/unexpected.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng1021EqualAttachmentBuildNumberTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng1021EqualAttachmentBuildNumberTest()
{
public class MavenITmng1021EqualAttachmentBuildNumberTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1021EqualAttachmentBuildNumberTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng1021EqualAttachmentBuildNumberTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG1021()
throws Exception
{
public void testitMNG1021() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1021");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -83,18 +76,14 @@ public class MavenITmng1021EqualAttachmentBuildNumberTest
verifier.verifyFilePresent(dir + "1-SNAPSHOT/test-" + snapshot + "-it.jar.sha1");
}
private String getSnapshotVersion( File artifactDir )
{
private String getSnapshotVersion(File artifactDir) {
File[] files = artifactDir.listFiles();
for ( File file : files )
{
for (File file : files) {
String name = file.getName();
if ( name.endsWith( ".pom" ) )
{
if (name.endsWith(".pom")) {
return name.substring("test-".length(), name.length() - ".pom".length());
}
}
throw new IllegalStateException("POM not found in " + artifactDir);
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
* @author John Casey
*
*/
public class MavenITmng1052PluginMgmtConfigTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng1052PluginMgmtConfigTest()
{
public class MavenITmng1052PluginMgmtConfigTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1052PluginMgmtConfigTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -48,9 +43,7 @@ public class MavenITmng1052PluginMgmtConfigTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG1052()
throws Exception
{
public void testitMNG1052() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1052");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
@ -61,5 +54,4 @@ public class MavenITmng1052PluginMgmtConfigTest
verifier.verifyFileNotPresent("target/resources-resources.txt");
verifier.verifyErrorFreeLog();
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -31,12 +29,9 @@ import org.junit.jupiter.api.Test;
*
* @author Benjamin Bentmann
*/
public class MavenITmng1073AggregatorForksReactorTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng1073AggregatorForksReactorTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1073AggregatorForksReactorTest()
{
public MavenITmng1073AggregatorForksReactorTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenITmng1073AggregatorForksReactorTest
* @throws Exception in case of failure
*/
@Test
public void testitForkLifecycle()
throws Exception
{
public void testitForkLifecycle() throws Exception {
// excluded 2.1.x and 2.2.x due to MNG-4325
requiresMavenVersion("[2.0,2.1.0),[3.0-alpha-3,)");
@ -60,7 +53,8 @@ public class MavenITmng1073AggregatorForksReactorTest
verifier.deleteDirectory("sub-1/target");
verifier.deleteDirectory("sub-2/target");
verifier.setLogFileName("log-lifecycle.txt");
verifier.addCliArgument( "org.apache.maven.its.plugins:maven-it-plugin-fork:2.1-SNAPSHOT:fork-lifecycle-aggregator" );
verifier.addCliArgument(
"org.apache.maven.its.plugins:maven-it-plugin-fork:2.1-SNAPSHOT:fork-lifecycle-aggregator");
verifier.execute();
verifier.verifyErrorFreeLog();
@ -75,9 +69,7 @@ public class MavenITmng1073AggregatorForksReactorTest
* @throws Exception in case of failure
*/
@Test
public void testitForkGoal()
throws Exception
{
public void testitForkGoal() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1073");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -94,5 +86,4 @@ public class MavenITmng1073AggregatorForksReactorTest
verifier.verifyFilePresent("sub-1/target/touch.txt");
verifier.verifyFilePresent("sub-2/target/touch.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng1088ReactorPluginResolutionTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng1088ReactorPluginResolutionTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1088ReactorPluginResolutionTest()
{
public MavenITmng1088ReactorPluginResolutionTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -49,9 +44,7 @@ public class MavenITmng1088ReactorPluginResolutionTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG1088()
throws Exception
{
public void testitMNG1088() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1088");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -68,5 +61,4 @@ public class MavenITmng1088ReactorPluginResolutionTest
verifier.verifyFilePresent("client/target/touch.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
*
* @author Benjamin Bentmann
*/
public class MavenITmng1142VersionRangeIntersectionTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng1142VersionRangeIntersectionTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1142VersionRangeIntersectionTest()
{
public MavenITmng1142VersionRangeIntersectionTest() {
super("[2.0.7,3.0-alpha-1),[3.0,)");
}
@ -48,9 +43,7 @@ public class MavenITmng1142VersionRangeIntersectionTest
* @throws Exception in case of failure
*/
@Test
public void testitAB()
throws Exception
{
public void testitAB() throws Exception {
testit("test-ab");
}
@ -61,15 +54,11 @@ public class MavenITmng1142VersionRangeIntersectionTest
* @throws Exception in case of failure
*/
@Test
public void testitBA()
throws Exception
{
public void testitBA() throws Exception {
testit("test-ba");
}
private void testit( String project )
throws Exception
{
private void testit(String project) throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1142");
Verifier verifier = newVerifier(new File(testDir, project).getAbsolutePath());
@ -89,5 +78,4 @@ public class MavenITmng1142VersionRangeIntersectionTest
assertTrue(classpath.toString(), classpath.contains("a-1.1.1.jar"));
assertTrue(classpath.toString(), classpath.contains("b-0.1.jar"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Collections;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +29,9 @@ import org.junit.jupiter.api.Test;
*
* @author Benjamin Bentmann
*/
public class MavenITmng1144MultipleDefaultGoalsTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng1144MultipleDefaultGoalsTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1144MultipleDefaultGoalsTest()
{
public MavenITmng1144MultipleDefaultGoalsTest() {
super("[3.0-alpha-7,)");
}
@ -47,9 +41,7 @@ public class MavenITmng1144MultipleDefaultGoalsTest
* @throws Exception in case of failure
*/
@Test
public void testit()
throws Exception
{
public void testit() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1144");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -61,5 +53,4 @@ public class MavenITmng1144MultipleDefaultGoalsTest
verifier.verifyFilePresent("target/clean-clean.txt");
verifier.verifyFilePresent("target/resources-resources.txt");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Collection;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,11 +31,8 @@ import org.junit.jupiter.api.Test;
* @author Brett Porter
*
*/
public class MavenITmng1233WarDepWithProvidedScopeTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng1233WarDepWithProvidedScopeTest()
{
public class MavenITmng1233WarDepWithProvidedScopeTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1233WarDepWithProvidedScopeTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -47,9 +42,7 @@ public class MavenITmng1233WarDepWithProvidedScopeTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG1233()
throws Exception
{
public void testitMNG1233() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1233");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -64,16 +57,19 @@ public class MavenITmng1233WarDepWithProvidedScopeTest
verifier.verifyErrorFreeLog();
Collection<String> compileArtifacts = verifier.loadLines("target/compile.txt", "UTF-8");
assertTrue( compileArtifacts.toString(),
assertTrue(
compileArtifacts.toString(),
compileArtifacts.contains("org.apache.maven.its.it0083:direct-dep:jar:0.1"));
assertTrue( compileArtifacts.toString(),
assertTrue(
compileArtifacts.toString(),
compileArtifacts.contains("org.apache.maven.its.it0083:trans-dep:jar:0.1"));
Collection<String> runtimeArtifacts = verifier.loadLines("target/runtime.txt", "UTF-8");
assertTrue( runtimeArtifacts.toString(),
assertTrue(
runtimeArtifacts.toString(),
runtimeArtifacts.contains("org.apache.maven.its.it0083:direct-dep:jar:0.1"));
assertFalse( runtimeArtifacts.toString(),
assertFalse(
runtimeArtifacts.toString(),
runtimeArtifacts.contains("org.apache.maven.its.it0083:trans-dep:jar:0.1"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -33,12 +31,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITmng1323AntrunDependenciesTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng1323AntrunDependenciesTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1323AntrunDependenciesTest()
{
public MavenITmng1323AntrunDependenciesTest() {
super("[3.0-alpha-1,)");
}
@ -49,9 +44,7 @@ public class MavenITmng1323AntrunDependenciesTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG1323()
throws Exception
{
public void testitMNG1323() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1323");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -86,5 +79,4 @@ public class MavenITmng1323AntrunDependenciesTest
assertNull(pclProps.getProperty("org.apache.maven.its.mng1323.ClassA"));
assertNull(pclProps.getProperty("org.apache.maven.its.mng1323.ClassB"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,12 +16,12 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,12 +30,9 @@ import org.junit.jupiter.api.Test;
* @author Benjamin Bentmann
*
*/
public class MavenITmng1349ChecksumFormatsTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng1349ChecksumFormatsTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1349ChecksumFormatsTest()
{
public MavenITmng1349ChecksumFormatsTest() {
super("(2.0.10,2.1.0-M1),(2.1.0-M1,)");
}
@ -47,9 +42,7 @@ public class MavenITmng1349ChecksumFormatsTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG1349()
throws Exception
{
public void testitMNG1349() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1349");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -80,5 +73,4 @@ public class MavenITmng1349ChecksumFormatsTest
verifier.verifyArtifactPresent("org.apache.maven.its.mng1349", "sha1-c", "0.1", "jar");
verifier.verifyArtifactPresent("org.apache.maven.its.mng1349", "sha1-c", "0.1", "pom");
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.List;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -34,19 +32,14 @@ import org.junit.jupiter.api.Test;
* @author <a href="mailto:hboutemy@apache.org">Hervé Boutemy</a>
*
*/
public class MavenITmng1412DependenciesOrderTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng1412DependenciesOrderTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1412DependenciesOrderTest()
{
public MavenITmng1412DependenciesOrderTest() {
super("(2.0.8,)"); // 2.0.9+
}
@Test
public void testitMNG1412()
throws Exception
{
public void testitMNG1412() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1412");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -79,8 +72,7 @@ public class MavenITmng1412DependenciesOrderTest
assertClassPathOrder(testClassPath.subList(2, testClassPath.size()));
}
private void assertArtifactOrder( List<String> artifacts )
{
private void assertArtifactOrder(List<String> artifacts) {
assertEquals(4, artifacts.size());
assertEquals("org.apache.maven.its.mng1412:a:jar:0.1", artifacts.get(0));
assertEquals("org.apache.maven.its.mng1412:c:jar:0.1", artifacts.get(1));
@ -88,13 +80,11 @@ public class MavenITmng1412DependenciesOrderTest
assertEquals("org.apache.maven.its.mng1412:d:jar:0.1", artifacts.get(3));
}
private void assertClassPathOrder( List<String> classpath )
{
private void assertClassPathOrder(List<String> classpath) {
assertEquals(4, classpath.size());
assertEquals("a-0.1.jar", classpath.get(0));
assertEquals("c-0.1.jar", classpath.get(1));
assertEquals("b-0.1.jar", classpath.get(2));
assertEquals("d-0.1.jar", classpath.get(3));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
package org.apache.maven.it;
import java.io.File;
import java.util.Properties;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,11 +30,8 @@ import org.junit.jupiter.api.Test;
*
*
*/
public class MavenITmng1415QuotedSystemPropertiesTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng1415QuotedSystemPropertiesTest()
{
public class MavenITmng1415QuotedSystemPropertiesTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1415QuotedSystemPropertiesTest() {
super(ALL_MAVEN_VERSIONS);
}
@ -46,9 +41,7 @@ public class MavenITmng1415QuotedSystemPropertiesTest
* @throws Exception in case of failure
*/
@Test
public void testitMNG1415()
throws Exception
{
public void testitMNG1415() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1415");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
@ -62,5 +55,4 @@ public class MavenITmng1415QuotedSystemPropertiesTest
Properties props = verifier.loadProperties("target/cli.properties");
assertEquals("Test Property", props.getProperty("stringParam"));
}
}

View File

@ -1,5 +1,3 @@
package org.apache.maven.it;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@ -18,13 +16,13 @@ package org.apache.maven.it;
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.VerificationException;
package org.apache.maven.it;
import java.io.File;
import org.apache.maven.shared.verifier.VerificationException;
import org.apache.maven.shared.verifier.Verifier;
import org.apache.maven.shared.verifier.util.ResourceExtractor;
import org.junit.jupiter.api.Test;
/**
@ -32,37 +30,28 @@ import org.junit.jupiter.api.Test;
*
*
*/
public class MavenITmng1491ReactorArtifactIdCollisionTest
extends AbstractMavenIntegrationTestCase
{
public class MavenITmng1491ReactorArtifactIdCollisionTest extends AbstractMavenIntegrationTestCase {
public MavenITmng1491ReactorArtifactIdCollisionTest()
{
public MavenITmng1491ReactorArtifactIdCollisionTest() {
super(ALL_MAVEN_VERSIONS);
}
@Test
public void testitMNG1491()
throws Exception
{
public void testitMNG1491() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-1491");
Verifier verifier = newVerifier(testDir.getAbsolutePath());
verifier.setAutoclean(false);
try
{
try {
verifier.addCliArgument("initialize");
verifier.execute();
verifier.verifyErrorFreeLog();
fail("Build should fail due to duplicate artifactId's in the reactor.");
}
catch( VerificationException e )
{
} catch (VerificationException e) {
// expected.
}
}
}

Some files were not shown because too many files have changed in this diff Show More