FlowDroid icon indicating copy to clipboard operation
FlowDroid copied to clipboard

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

Open singleboat opened this issue 8 years ago • 9 comments

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.

singleboat avatar Nov 12 '18 11:11 singleboat

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?

StevenArzt avatar Nov 12 '18 12:11 StevenArzt

@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.

mbenz89 avatar Nov 12 '18 13:11 mbenz89

@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.

StevenArzt avatar Nov 12 '18 13:11 StevenArzt

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

singleboat avatar Nov 12 '18 14:11 singleboat

@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.

mbenz89 avatar Nov 12 '18 19:11 mbenz89

@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.

StevenArzt avatar Nov 13 '18 08:11 StevenArzt

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

mbenz89 avatar Nov 13 '18 08:11 mbenz89

@mbenz89 Thanks a lot.

@singleboat Does this solve your problem?

StevenArzt avatar Nov 13 '18 08:11 StevenArzt

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.

singleboat avatar Nov 14 '18 04:11 singleboat