简体   繁体   中英

Groovy: Antbuilder fileset is not created (launched from Jenkins)

I have following code in my script:

def ant_fs = (new AntBuilder())
def fs = ant_fs.fileset( dir: <path> )
fs.each{
    println( "Fileset item: $it" )
}

When I launch it from Maven (mvn ... in command line) or from Intellij IDEA I see that fileset object is initialized successfully (I see correct files' pathes).

When I launch this code via Jenkins I see that fs object is not created but I do not see any exception in output.

Could you please help me resolve the issue?

Thanks In Advcance!

Note: I have surefire plugin for Maven2.

Looks like this issue was caused by incorrect user Jenkins Agent settings.

I setup user into Jenkins Service (Win host) as Administrator and my script started to work. It was caused because I work with shared folder on another host which required authentification. I setup authentification on that host for Administrator account, but Jenkins by default launches test as System account.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM