Hey Benoit,
thanks for your reply.
Here're my current build specs:
host: win7 ulti sp1 x64
vm: virtualbox 5.1.26r117224
vm-os: opensuse tumbleweed x64 - snapshot 20171203
jdk: openjdk 1.8.0_151 x64
maven: 3.5.2 - additional repo at
http://download.opensuse.org/repositories/devel:/tools:/building/openSUSE_Factory/
git clone from git://git.apache.org/james-project.git
command flow:
mvn clean
-> success
mvn package -Pwith-assembly -DskipTests -Dmaven.test.skip=true
-> failure on first run
[INFO] --- maven-compiler-plugin:3.6.2:compile (default-compile) @
apache-james-mpt-smtp-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to
/home/vm/james-project/mpt/impl/smtp/core/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR]
/home/vm/james-project/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java:[72,65]
cannot find symbol
symbol: method getContainerIp()
location: variable fakeSmtp of type
org.apache.james.util.streams.SwarmGenericContainer
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 04:50 min
[INFO] Finished at: 2017-12-04T20:08:51+01:00
[INFO] Final Memory: 228M/596M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile
(default-compile) on project apache-james-mpt-smtp-core: Compilation failure
[ERROR]
/home/vm/james-project/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java:[72,65]
cannot find symbol
[ERROR] symbol: method getContainerIp()
[ERROR] location: variable fakeSmtp of type
org.apache.james.util.streams.SwarmGenericContainer
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR] mvn <goals> -rf :apache-james-mpt-smtp-core
rm ForwardSmtpTest.java
2nd run
-> success
So it seems the error is only in ForwardSmtpTest.java.
If I re-clone and run simple build with
mvn clean package -Pwith-assembly -fn
and look into
~/james-project/mpt/impl/smtp/core/target/classes/org/apache/james/mpt/smtp
I can see ForwardSmtpTest.class gets created.
So when I look at ForwardSmtpTest:72 the class
org.apache.james.util.streams.SwarmGenericContainer and method
getContainerIp() is accessed. Something somehow changes the resulting
class file when compiled with tests and when tests are skipped. I
searched for SwarmGenericContainer and found it in
~/james-project/server/container/util-java8/src/test/java/org/apache/james/util/streams/.
Strange - cause when test skipped - SwarmGenericContainer shouldn't get
created at all so it should already fail at import cause classe not
found - instead it somehow only doesn't find the method.
So I re-cloned again - w/o killing .m2 cache - and it failed again.
SwarmGenericContainer can be found in
~/.m2/repository/org/apache/james/james-server-util-java8/3.1.0-SNAPSHOT/james-server-util-java8-3.1.0-20170630.042025-2-tests.jar
So - killed all and re-cloned ... again - killed ForwardSmtpTest before
compiling and looking again in repo: the artifcat from June 30th was
downloaded again - and my guess there is a version mismatch here. So I
quickly wrote a small code snippet to get the methods from this snapshot
- here's what I got:
withExposedPorts
waitingFor
withEnv
logAndCheckSkipTest
withAffinityToContainer
withStartupTimeout
getIp
getContainerInfo
start
apply
stop
I didn't yet tried to find from wich pom this snapshot is refrenced
(sadly no more time to search) - but I guess by cleaning up the faulty
pom to load a recent snapshot this error should be fixed.
So far ...
Matt
Am 04.12.2017 um 09:29 schrieb Benoit Tellier:
Hi Matt.
- DskipTests skips tests execution, not test compilation. If you used
that option then your failure is not normal.
By the way, such "non compilable/non runnable" tests seems really weird
to me. Could you:
- Give me your environment settings: OS/OS version/ Java JDK +
version/maven version?
- Share some errors you get on the mvn clean install ?
Thanks,
Cheers
Le 03/12/2017 à 07:09, cryptearth a écrit :
Hey there all,
as one of you told me long ago to skip tests to get a working package
fast the current build somewhat fails to "skip" the tests.
~/james-project/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp
contains two test-classes: ForwardSmtpTest.java and
SmtpStarttlsCommandTest.java. So as the names suggest these seem to be
test-classes - but just in the wrong place. They error cause they depend
on some other test-fake-classes - wich are not available because they
already got skipped at this point.
So after "deactivating" them by renaming the extension from .java to
.disabled run gets through smooth and cause I use -Pwith-assembly option
the final .jar wich contains the non-docker-version gets created and
(after setting up needed configs) can be run straight away.
So I guess these two classes simple need a move from main to test folder
and a clean run with -DskipTests and/or -Dmaven.test.skip=true should
get final package pretty fast.
That's all for now ...
Matt
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org