No artifacts found matching 'xxx.jar' path

gabrycaretti's Avatar

gabrycaretti

15 Nov, 2019 11:06 PM

hi,
i'm sorry if i do mistakes but i'm a newbie in this
i'm not getting artifacts from my code but i should, the warn it's:
No artifacts found matching 'PrisonRanks.jar' path

My appveyor.yml looks like this:

```
build:
  verbosity: detailed

build_script:
  - gradlew.bat build

artifacts:
  - path: PrisonRanks.jar

environment:
  matrix:
  - JAVA_HOME: C:\Program Files\Java\jdk1.8.0

matrix:
  fast_finish: true

on_success:
  - ps: Invoke-RestMethod https://raw.githubusercontent.com/k3rn31p4nic/appveyor-discord-webhook/master/send.ps1 -o send.ps1
  - ps: ./send.ps1 success $env:WEBHOOK_URL
on_failure:
  - ps: Invoke-RestMethod https://raw.githubusercontent.com/k3rn31p4nic/appveyor-discord-webhook/master/send.ps1 -o send.ps1
  - ps: ./send.ps1 failure $env:WEBHOOK_URL
```

And i have made a build.gradle:

```
import org.apache.tools.ant.filters.ReplaceTokens
 
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
 
group = 'it.gabryca'
version = '0.1'
archivesBaseName = 'PrisonRanks'
 
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
 
def bukkitVersion = '1.14.4-R0.1-SNAPSHOT'
 
repositories {
    jcenter()
 
    maven {
        url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' // Spigot repo
    }
 
    maven {
        url 'https://oss.sonatype.org/content/repositories/snapshots/' // Sonatype snapshots
    }
}
 
dependencies {
    // compile (group: 'org.bukkit', name: 'bukkit', version: bukkitVersion)
    compile (group: 'org.spigotmc', name: 'spigot-api', version: bukkitVersion)
}
 
processResources {
    filter ReplaceTokens, tokens: [
            "VERSION": version
    ]
}
 
compileJava.options.encoding = 'UTF-8' // Encode your source code with UTF-8
 
 
// Generate Sources Jar
task sourcesJar(type: Jar) {
    classifier 'sources'
    from sourceSets.main.allSource
}
 
// Generate Javadoc Jar
task javadocJar(type: Jar) {
    classifier 'javadoc'
    from javadoc.destinationDir
}
 
artifacts {
    archives sourcesJar, javadocJar // Build Sources and Javadoc Jar
}
```

  1. Support Staff 1 Posted by Feodor Fitsner on 16 Nov, 2019 12:32 AM

    Feodor Fitsner's Avatar

    The path to artifact should be a full relative path from the build folder root, not just a file name. When you put it like path: PrisonRanks.jar AppVeyor is looking for artifact in the root of build folder - I guess you should have something like path: your\output\bin\folder\PrisonRanks.jar.

  2. 2 Posted by gabrycaretti on 16 Nov, 2019 10:06 AM

    gabrycaretti's Avatar

    The root folder can be replaced by a default placeholder like $root?
    Right now i don't know where the artifact is going, but from my build.gradle should be in the root folder where it do the script.

    So when it clone the repository, it says this:
    git clone -q --branch=master https://github.com/GABRYCA/Prison_Ranks.git C:\projects\prison-ranks
    the root folder it's C:\projects\prison-ranks ? Or C:\projects\prison-ranks\Prison_Ranks

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

05 Dec, 2019 09:12 PM
04 Dec, 2019 07:46 PM
04 Dec, 2019 12:01 AM
04 Dec, 2019 12:00 AM
03 Dec, 2019 11:00 PM