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

How to integrate soot-infoflow-android as library using maven? #93

Closed
singleboat opened this issue Nov 12, 2018 · 9 comments
Closed

How to integrate soot-infoflow-android as library using maven? #93

singleboat opened this issue Nov 12, 2018 · 9 comments

Comments

@singleboat
Copy link

It's my first time to use this tool, and I want to integrate it as part of my project. I tried to add dependency statement into 'pom.xml' file and failed for that the resource doesn't exist in the central repository of maven. After I looked at the Readme of soot project and issue submitted by @xcdu, I added the following code
<repositories> <repository> <id>soot-snapshot</id> <name>soot snapshots</name> <url>https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-snapshot/</url> </repository> </repositories>
It still goes wrong, with maven's information that ' Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-snapshot/de/tud/sse/soot-infoflow-android/2.6.1/soot-infoflow-android-2.6.1.pom with status code 400'. I guess there is still something wrong in my pom file.
I have succeed in running flowdoird by downloading soot-infoflow-android, soot-infoflow, soot, heros and jasmin, but it's inconvenience compared with maven style. So I want to know how to simply build it with maven. Thanks.

@StevenArzt
Copy link
Member

I'm not sure what the status of the nexus repository is.

@mbenz89 Do you know whether the Nexus repository is functional at the moment?

@mbenz89
Copy link
Member

mbenz89 commented Nov 12, 2018

@StevenArzt We currently do not deploy FlowDroid to our Nexus repository. The most recent version of soot-infoflow-android is 2.0.0 and relates to the old repository.
I could add a test and deploy cycle to our ci if you are interested.

@StevenArzt
Copy link
Member

@mbenz89 I think it would be helpful to users, because we currently cannot make our own repository available to the public. We do have a CI pipeline, but that's only for internal use at the moment.

@singleboat
Copy link
Author

Thanks for responding. I'll just use local jar file to continue my work.

@mbenz89
Copy link
Member

mbenz89 commented Nov 12, 2018

@StevenArzt I added a job for the master and develop branches to our ci instance:
https://soot-build.cs.uni-paderborn.de/jenkins/job/flowdroid/

I also added badges for both jobs to the corresponding Readme files.
I suggest you also add the Maven coordinates (can be found here) to the Readme files.

@StevenArzt
Copy link
Member

@mbenz89 The repository doesn't seem to accept the artifact:

org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact de.fraunhofer.sit.flowdroid:parent:pom:2.6.1 from/to soot-snapshot (http://soot-build.cs.uni-paderborn.de/nexus/repository/soot-snapshot/): Failed to transfer file: https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-snapshot/de/fraunhofer/sit/flowdroid/parent/2.6.1/parent-2.6.1.pom. Return code is: 400, ReasonPhrase: Repository version policy: SNAPSHOT does not allow version: 2.6.1.

I think we need a different repository for debug (snapshot) and release builds.

@mbenz89
Copy link
Member

mbenz89 commented Nov 13, 2018

Builds of the master branch are now deployed to the soot-release repository: https://soot-build.cs.uni-paderborn.de/nexus/#browse/browse/components:soot-release

@StevenArzt
Copy link
Member

@mbenz89 Thanks a lot.

@singleboat Does this solve your problem?

@singleboat
Copy link
Author

I succeed to download soot-infoflow-android, but something went wrong when maven tried to download the dependencies of it with the following output:

[INFO] Downloading from soot-release: https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/heros/heros/1.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata heros:heros:1.0.1-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/heros/heros/1.0.1-SNAPSHOT/maven-metadata.xml with status code 400
[WARNING] Failure to transfer heros:heros:1.0.1-SNAPSHOT/maven-metadata.xml from https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release was cached in the local repository, resolution will not be reattempted until the update interval of soot-release has elapsed or updates are forced. Original error: Could not transfer metadata heros:heros:1.0.1-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/heros/heros/1.0.1-SNAPSHOT/maven-metadata.xml with status code 400
[INFO] Downloading from soot-release: https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/ca/mcgill/sable/jasmin/2.5.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata ca.mcgill.sable:jasmin:2.5.0-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/ca/mcgill/sable/jasmin/2.5.0-SNAPSHOT/maven-metadata.xml with status code 400
[WARNING] Failure to transfer ca.mcgill.sable:jasmin:2.5.0-SNAPSHOT/maven-metadata.xml from https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release was cached in the local repository, resolution will not be reattempted until the update interval of soot-release has elapsed or updates are forced. Original error: Could not transfer metadata ca.mcgill.sable:jasmin:2.5.0-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/ca/mcgill/sable/jasmin/2.5.0-SNAPSHOT/maven-metadata.xml with status code 400
[INFO] Downloading from soot-release: https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/ca/mcgill/sable/soot/3.1.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata ca.mcgill.sable:soot:3.1.0-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/ca/mcgill/sable/soot/3.1.0-SNAPSHOT/maven-metadata.xml with status code 400
[WARNING] Failure to transfer ca.mcgill.sable:soot:3.1.0-SNAPSHOT/maven-metadata.xml from https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release was cached in the local repository, resolution will not be reattempted until the update interval of soot-release has elapsed or updates are forced. Original error: Could not transfer metadata ca.mcgill.sable:soot:3.1.0-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/ca/mcgill/sable/soot/3.1.0-SNAPSHOT/maven-metadata.xml with status code 400
[INFO] Downloading from soot-release: https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/pxb/android/axml/2.0.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata pxb.android:axml:2.0.0-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/pxb/android/axml/2.0.0-SNAPSHOT/maven-metadata.xml with status code 400
[WARNING] Failure to transfer pxb.android:axml:2.0.0-SNAPSHOT/maven-metadata.xml from https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release was cached in the local repository, resolution will not be reattempted until the update interval of soot-release has elapsed or updates are forced. Original error: Could not transfer metadata pxb.android:axml:2.0.0-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/pxb/android/axml/2.0.0-SNAPSHOT/maven-metadata.xml with status code 400
[INFO] Downloading from soot-release: https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/ca/mcgill/sable/jasmin/3.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata ca.mcgill.sable:jasmin:3.0.1-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/ca/mcgill/sable/jasmin/3.0.1-SNAPSHOT/maven-metadata.xml with status code 400
[WARNING] Failure to transfer ca.mcgill.sable:jasmin:3.0.1-SNAPSHOT/maven-metadata.xml from https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release was cached in the local repository, resolution will not be reattempted until the update interval of soot-release has elapsed or updates are forced. Original error: Could not transfer metadata ca.mcgill.sable:jasmin:3.0.1-SNAPSHOT/maven-metadata.xml from/to soot-release (https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release): Failed to transfer file https://soot-build.cs.uni-paderborn.de/nexus/repository/soot-release/ca/mcgill/sable/jasmin/3.0.1-SNAPSHOT/maven-metadata.xml with status code 400 

I guess the reason is that version description in soot-release repository is written without '-SNAPSHOT', which style is used in soot-snapshot repository. After I add the repository statement for soot-snapshot in pom file and update the project, everything goes well.
Thanks for help.

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

3 participants