Skip to content

Commit

Permalink
[MCOMPILER-526] Add packages to please the formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Feb 13, 2023
1 parent f9b6bd0 commit 3dca82f
Show file tree
Hide file tree
Showing 65 changed files with 84 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyClass
{
Expand Down
4 changes: 2 additions & 2 deletions src/it/MCOMPILER-328_multiReleaseOutput/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* under the License.
*/

assert !new File( basedir, 'target/classes/MyClass.class').exists()
assert !new File( basedir, 'target/classes/foo/MyClass.class').exists()

assert new File( basedir, 'target/classes/META-INF/versions/9/MyClass.class').exists()
assert new File( basedir, 'target/classes/META-INF/versions/9/foo/MyClass.class').exists()
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class Main
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class TestService
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class Main
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class TestService
{
Expand Down
1 change: 1 addition & 0 deletions src/it/default-fork-windows/src/main/java/MyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyClass
{
Expand Down
1 change: 1 addition & 0 deletions src/it/default-fork-windows/src/test/java/MyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

import junit.framework.TestCase;

Expand Down
4 changes: 2 additions & 2 deletions src/it/default-fork-windows/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* under the License.
*/

assert new File( basedir, 'target/classes/MyClass.class').exists()
assert new File( basedir, 'target/classes/foo/MyClass.class').exists()

assert new File( basedir, 'target/test-classes/MyTest.class').exists()
assert new File( basedir, 'target/test-classes/foo/MyTest.class').exists()

assert !new File( basedir, 'target/classes/javac.sh').exists()
assert !new File( basedir, 'target/classes/javac.bat').exists()
Expand Down
1 change: 1 addition & 0 deletions src/it/default-fork/src/main/java/MyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyClass
{
Expand Down
1 change: 1 addition & 0 deletions src/it/default-fork/src/test/java/MyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

import junit.framework.TestCase;

Expand Down
4 changes: 2 additions & 2 deletions src/it/default-fork/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
* under the License.
*/

assert new File( basedir, 'target/classes/MyClass.class').exists()
assert new File( basedir, 'target/classes/foo/MyClass.class').exists()

assert new File( basedir, 'target/test-classes/MyTest.class').exists()
assert new File( basedir, 'target/test-classes/foo/MyTest.class').exists()

assert !new File( basedir, 'target/classes/javac.sh').exists()
assert !new File( basedir, 'target/classes/javac.bat').exists()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyClass
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

import junit.framework.TestCase;

Expand Down
4 changes: 2 additions & 2 deletions src/it/default-incremental-disable/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* under the License.
*/

assert new File( basedir, "target/classes/MyClass.class" ).exists();
assert new File( basedir, "target/test-classes/MyTest.class" ).exists();
assert new File( basedir, "target/classes/foo/MyClass.class" ).exists();
assert new File( basedir, "target/test-classes/foo/MyTest.class" ).exists();

content = new File( basedir, 'build.log' ).text;

Expand Down
1 change: 1 addition & 0 deletions src/it/default/src/main/java/MyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyClass
{
Expand Down
1 change: 1 addition & 0 deletions src/it/default/src/test/java/MyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

import junit.framework.TestCase;

Expand Down
4 changes: 2 additions & 2 deletions src/it/default/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ import java.util.regex.*;

try
{
File mainClass = new File( basedir, "target/classes/MyClass.class" );
File mainClass = new File( basedir, "target/classes/foo/MyClass.class" );
if ( !mainClass.isFile() )
{
System.out.println( "Main class not existent: " + mainClass );
return false;
}

File testClass = new File( basedir, "target/test-classes/MyTest.class" );
File testClass = new File( basedir, "target/test-classes/foo/MyTest.class" );
if ( !testClass.isFile() )
{
System.out.println( "Test class not existent: " + testClass );
Expand Down
1 change: 1 addition & 0 deletions src/it/mcompiler-106/src/main/java/MyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyClass
{
Expand Down
1 change: 1 addition & 0 deletions src/it/mcompiler-135/src/main/java/MyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyClass
{
Expand Down
1 change: 1 addition & 0 deletions src/it/mcompiler-182/src/main/java/BeanA.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

/**
* dumb test bean
Expand Down
1 change: 1 addition & 0 deletions src/it/mcompiler-182/src/main/java/BeanA2.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

/**
* dumb test bean
Expand Down
2 changes: 1 addition & 1 deletion src/it/mcompiler-182/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ content = logFile.text

assert content.contains( 'COMPILATION ERROR :' )

assert !new File( basedir, 'target/classes/BeanA.class' ).exists();
assert !new File( basedir, 'target/classes/foo/BeanA.class' ).exists();
1 change: 1 addition & 0 deletions src/it/mcompiler-21_class-remove/src/main/java/BeanA.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

/**
* dumb test bean
Expand Down
1 change: 1 addition & 0 deletions src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

/**
* dumb test bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

/**
* dumb test bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

/**
* dumb test bean
Expand Down
1 change: 1 addition & 0 deletions src/it/non-english-warnings/src/main/java/MyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyClass
{
Expand Down
1 change: 1 addition & 0 deletions src/it/non-english-warnings/src/test/java/MyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyTest
{
Expand Down
4 changes: 2 additions & 2 deletions src/it/non-english-warnings/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import java.io.*;
import java.util.*;
import java.util.regex.*;

File mainClass = new File( basedir, "target/classes/MyClass.class" );
File mainClass = new File( basedir, "target/classes/foo/MyClass.class" );
if ( !mainClass.isFile() )
{
throw new FileNotFoundException( "Main class not existent: " + mainClass );
}

File testClass = new File( basedir, "target/test-classes/MyTest.class" );
File testClass = new File( basedir, "target/test-classes/foo/MyTest.class" );
if ( !testClass.isFile() )
{
throw new FileNotFoundException( "Test class not existent: " + testClass );
Expand Down
1 change: 1 addition & 0 deletions src/it/test1/src/main/java/MyClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class MyClass
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void testCompilerBasic()

compileMojo.execute();

File testClass = new File( compileMojo.getOutputDirectory(), "TestCompile0.class" );
File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile0.class" );

assertTrue( testClass.exists() );

Expand All @@ -80,7 +80,7 @@ public void testCompilerBasic()
assertNotNull( "MCOMPILER-94: artifact file should only be null if there is nothing to compile",
projectArtifact.getFile() );

testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile0Test.class" );
testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile0Test.class" );

verify( log ).warn( startsWith( "No explicit value set for target or release!" ) );

Expand Down Expand Up @@ -150,13 +150,13 @@ public void testCompilerIncludesExcludes()

compileMojo.execute();

File testClass = new File( compileMojo.getOutputDirectory(), "TestCompile2.class" );
File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile2.class" );
assertFalse( testClass.exists() );

testClass = new File( compileMojo.getOutputDirectory(), "TestCompile3.class" );
testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile3.class" );
assertFalse( testClass.exists() );

testClass = new File( compileMojo.getOutputDirectory(), "TestCompile4.class" );
testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile4.class" );
assertTrue( testClass.exists() );

TestCompilerMojo testCompileMojo = getTestCompilerMojo( compileMojo,
Expand All @@ -167,13 +167,13 @@ public void testCompilerIncludesExcludes()

testCompileMojo.execute();

testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile2TestCase.class" );
testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile2TestCase.class" );
assertFalse( testClass.exists() );

testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile3TestCase.class" );
testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile3TestCase.class" );
assertFalse( testClass.exists() );

testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile4TestCase.class" );
testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile4TestCase.class" );
assertTrue( testClass.exists() );
}

Expand All @@ -192,7 +192,7 @@ public void testCompilerFork()

compileMojo.execute();

File testClass = new File( compileMojo.getOutputDirectory(), "TestCompile1.class" );
File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestCompile1.class" );
assertTrue( testClass.exists() );

TestCompilerMojo testCompileMojo =
Expand All @@ -203,7 +203,7 @@ public void testCompilerFork()

testCompileMojo.execute();

testClass = new File( testCompileMojo.getOutputDirectory(), "TestCompile1TestCase.class" );
testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestCompile1TestCase.class" );
assertTrue( testClass.exists() );
}

Expand Down Expand Up @@ -345,13 +345,13 @@ public void testCompileSkipMain()
CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-skip-main/plugin-config.xml" );
setVariableValueToObject( compileMojo, "skipMain", true );
compileMojo.execute();
File testClass = new File( compileMojo.getOutputDirectory(), "TestSkipMainCompile0.class" );
File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestSkipMainCompile0.class" );
assertFalse( testClass.exists() );

TestCompilerMojo testCompileMojo =
getTestCompilerMojo( compileMojo, "target/test-classes/unit/compiler-skip-main/plugin-config.xml" );
testCompileMojo.execute();
testClass = new File( testCompileMojo.getOutputDirectory(), "TestSkipMainCompile0Test.class" );
testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestSkipMainCompile0Test.class" );
assertTrue( testClass.exists() );
}

Expand All @@ -365,14 +365,14 @@ public void testCompileSkipTest()
{
CompilerMojo compileMojo = getCompilerMojo( "target/test-classes/unit/compiler-skip-test/plugin-config.xml" );
compileMojo.execute();
File testClass = new File( compileMojo.getOutputDirectory(), "TestSkipTestCompile0.class" );
File testClass = new File( compileMojo.getOutputDirectory(), "foo/TestSkipTestCompile0.class" );
assertTrue( testClass.exists() );

TestCompilerMojo testCompileMojo =
getTestCompilerMojo( compileMojo, "target/test-classes/unit/compiler-skip-test/plugin-config.xml" );
setVariableValueToObject( testCompileMojo, "skip", true );
testCompileMojo.execute();
testClass = new File( testCompileMojo.getOutputDirectory(), "TestSkipTestCompile0Test.class" );
testClass = new File( testCompileMojo.getOutputDirectory(), "foo/TestSkipTestCompile0Test.class" );
assertFalse( testClass.exists() );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

public class TestCompile0
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package foo;

import junit.framework.TestCase;

Expand Down

0 comments on commit 3dca82f

Please sign in to comment.