Github user jgallimore commented on a diff in the pull request:

    https://github.com/apache/tomee/pull/176#discussion_r228922983
  
    --- Diff: tomee/apache-tomee/src/test/java/org/apache/tomee/TomEECliIT.java 
---
    @@ -0,0 +1,66 @@
    +/**
    + * 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.tomee;
    +
    +import org.apache.openejb.loader.IO;
    +import org.junit.Test;
    +
    +import java.io.File;
    +import java.io.FileFilter;
    +import java.io.IOException;
    +
    +import static org.junit.Assert.assertTrue;
    +import static org.junit.Assert.fail;
    +
    +public class TomEECliIT {
    +
    +    @Test
    +    public void testTomEECli() throws IOException, InterruptedException {
    +        final File jar = new 
File(getClass().getClassLoader().getResource("test-1.0.jar").getFile());
    +
    +        File work = new 
File("target/webprofile-work-dir/").getAbsoluteFile();
    +        if (!work.exists()) {
    +            work = new 
File("apache-tomee/target/webprofile-work-dir/").getAbsoluteFile();
    +        }
    +
    +        final File[] files = work.listFiles(new FileFilter() {
    +            @Override
    +            public boolean accept(final File pathname) {
    +                return pathname.isDirectory() && 
pathname.getName().startsWith("apache-tomcat-");
    +            }
    +        });
    +
    +        final File tomee = (null != files ? files[0] : null);
    +        if (tomee == null) {
    +            fail("Failed to find Tomcat directory required for this test - 
Ensure you have run at least the maven phase: mvn process-resources");
    +        }
    +
    +
    +        final ProcessBuilder builder = new ProcessBuilder()
    +                .command("java", "-cp", jar.getAbsolutePath() + ":" +
    --- End diff --
    
    Using : won't work on Windows.


---

Reply via email to