Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no POM in this directory (/src) & [FATAL] Non-readable POM problem #1

Open
estefafdez opened this issue Oct 27, 2017 · 6 comments

Comments

@estefafdez
Copy link

Hello,

We follow all the instructions described into this project. We create an AppiumCore project with all the information necessary to run test using Appium. The test contained on the project run in our local environment (run the test on the IDE and by executing mvn test on the command line).

The pom.xml file is included on the /src directory as requested.

If we run this docker-appium along with our project, we get the following errors:

First error: there is no POM in this directory (/src):

[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/src). Please verify you invoked Maven from the correct directory.

And then, if we create a new pom.xml file with the same content, we get the following error:

CREATING AND LAUNCHING EMULATOR...

DONE.


STARTING APPIUM COMMAND...


Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_141, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "4.10.0-37-generic", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /root/.m2/settings.xml
[DEBUG] Using local repository at /root/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /root/.m2/repository
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-readable POM /opt/AppiumCore/src/pom.xml: /opt/AppiumCore/src/pom.xml (No such file or directory) @

       at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
       at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
       at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

Any idea what could we do to resolve the problem?

Thank you.

@estefafdez
Copy link
Author

Docker Version: 17.09.0-ce
Local OS: ubuntu 16.04

@agomezmoron
Copy link
Owner

Hi! It seems an error when you run the docker image. Are you linking properly the /src folder to the source one you have in your env?

Cheers!

@estefafdez
Copy link
Author

Hello again,

First, we do:

docker build --build-arg JAVA_VERSION=8 --build-arg ANDROID_SDK_VERSION=23 --build-arg VNC_PASSWD=1234 -t agomezmoron/docker-appium . && docker rmi -f $(docker images -f "dangling=true" -q) &> **/dev/null**

And we get:

 Successfully built bd3fe676a099
Successfully tagged agomezmoron/docker-appium:latest

Appium Project File Structure:
androidcorefolder

And then, to execute the test, we do:

docker run --privileged -v /opt/AppiumCore:/src -v /opt/AppiumCore:/src/target -e HOST_UID=$(id -u) -e HOST_GID=$(id -g) -e DOCKER_TESTS_COMMAND="mvn test" --rm -t -i -p 5900:5900 agomezmoron/docker-appium

We get the following console output:
salidamaven

Any idea of what the problem could be? Thanks!

@agomezmoron
Copy link
Owner

It seems a maven issue. Could you please put the result of ls -l /opt/AppiumCore?

Also instead of running -e DOCKER_TESTS_COMMAND="mvn test" try to run -e DOCKER_TESTS_COMMAND="mvn test -X" to see a full stacktrace.

Thanks!

@estefafdez
Copy link
Author

Hello again:

ls -la /opt/AppiumCore
1

Docker run with mvn test -X:
2

@agomezmoron
Copy link
Owner

Hi @estefafdez,

After reviewing this it seems the Dockerfile has a typo. If you add there an execution like:

mkdir /src

rebuilds the image and run it back, does it work? If yes, please create a PR with that change.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants