Giter VIP home page Giter VIP logo

project-examples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

project-examples's Issues

Need simple as possible gradle publish example

There needs to be a simple as possible example that works out of the box with artifactory.

Not multi-project. One project to publish. Small as possible.

The example script seems like it adds a lot of extra gak and sort of detracts from focusing on how to use the artifactory plugin in more of a getting started sort of way.

I have a jar. I want to publish it to artifactory. Period.

Also the example does not use the maven plugin so the pom's cannot be validated so they do not work with the libs-snapshot repo.

This example should only use the repos that come with artifcatory.

upload spec, regex to exclude folder?

Hey guys,
we've some properties files that need to be store in artifactory generic repo. these files are checkout from svn as part of the build process. trying to setup a regex to exclude these files, but running into error. what's the correct syntax to exclude .svn folder as part of upload spec?

This regex should do a negative lookahead to exclude .svn folder: /((?!./.svn/).)/

uploadSpec = """{
"files": [
{
"pattern": "((?!.\/\.svn\/).)",
"target": "./",
"recursive": "true",
"regexp": "true",
"flat": "false"
}
]
}"""

But i'm getting the following error:
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:569)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344)
at java.util.HashMap.internalWriteEntries(HashMap.java:1785)
at java.util.HashMap.writeObject(HashMap.java:1362)
at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:976)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:132)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:433)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:412)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:357)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:78)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:224)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:63)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: an exception which occurred:
in field _from
in field _path
in field abnormal
in field outcome
in field body
in field step
in field thread
in field this$0
in field returnAddress
in field parent
in field caller
in field parent
in field parent
in field parent
in field parent
in field capture
in field def
in field closures
in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@1cc9aa82

gradle-examples/4/gradle-example-publish does not work

I ran next commands:

  1. git clone [email protected]:JFrogDev/project-examples.git
  2. gradle generateDescriptorFileForIvyJavaPublication
  3. gradle generatePomFileForMavenJavaPublication
  4. gradle artifactoryPublish

And...:

Parallel execution with configuration on demand is an incubating feature.
:api:artifactoryPublish
:services:artifactoryPublish
:shared:artifactoryPublish
:artifactoryPublish
:services:webservice:artifactoryPublish FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':services:webservice:artifactoryPublish'.
> File '/Users/tolkv/git/tmp/project-examples/gradle-examples/4/gradle-example-publish/services/webservice/build/libs/webservice-1.0-SNAPSHOT.jar' does not exist, and need to be published from publication mavenJava

Did example break? Or Have i use unsuitable commands?
PS: gradle version - 2.12

NullPointerException server.upload

upload throws a null pointer exception.
Both target & pattern location are accurate.

node('docker-maven-slave') {
def server = Artifactory.server('143@143')
def uploadSpec = """{
"files": [
{
"pattern": "/home/jenkins/.m2/repository/com/org/mytestapp/webmodule/1.0.1-SNAPSHOT/*war",
"target": "ORG-Snapshots/com/org/mytestapp/webmodule/1.0.1-SNAPSHOT/"
}
]
}"""
def buildInfo = server.upload(uploadSpec)
server.publishBuildInfo(buildInfo)
}
Thank you for your time !

Error for task artifactoryPublish in Android Studio

Expected Behavior

Use gradle to upload library aar successfully to maven.

Current Behavior

Error hanppend when uploading.

  • What went wrong:
    Execution failed for task ':PublicPlatLib:artifactoryPublish'.

org.apache.http.impl.client.DefaultHttpRequestRetryHandler.(IZLjava/util/Collection;)V

Steps to Reproduce (for bugs)

:PublicPlatLib:artifactoryPublish FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':PublicPlatLib:artifactoryPublish'.
> org.apache.http.impl.client.DefaultHttpRequestRetryHandler.<init>(IZLjava/util/Collection;)V

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':PublicPlatLib:artifactoryPublish'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.ja
va:84)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecut
er.java:88)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTa
skExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.jav
a:51)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.jav
a:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecute
r.java:236)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecute
r.java:228)
        at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.
java:228)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.
java:215)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor
.java:77)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58
)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
        at org.gradle.initialization.DefaultGradleLauncher$3.execute(DefaultGradleLauncher.java:196)
        at org.gradle.initialization.DefaultGradleLauncher$3.execute(DefaultGradleLauncher.java:193)
        at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:193)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
        at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:7
5)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:4
9)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.
java:44)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.
java:29)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java
:34)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
        at org.gradle.util.Swapper.swap(Swapper.java:38)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
        at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: java.lang.NoSuchMethodError: org.apache.http.impl.client.DefaultHttpRequestRetryHandler.<init>(IZLjava/util/Col
lection;)V
        at org.jfrog.build.client.PreemptiveHttpClient$PreemptiveRetryHandler.<init>(PreemptiveHttpClient.java:244)
        at org.jfrog.build.client.PreemptiveHttpClient.createHttpClientBuilder(PreemptiveHttpClient.java:154)
        at org.jfrog.build.client.PreemptiveHttpClient.<init>(PreemptiveHttpClient.java:91)
        at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:142)
        at org.jfrog.build.client.ArtifactoryHttpClient.getHttpClient(ArtifactoryHttpClient.java:137)
        at org.jfrog.build.client.ArtifactoryHttpClient.getVersion(ArtifactoryHttpClient.java:151)
        at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.getArtifactoryVersion(Artifacto
ryBuildInfoClient.java:789)
        at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.tryChecksumDeploy(ArtifactoryBu
ildInfoClient.java:679)
        at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfo
Client.java:638)
        at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuild
InfoClient.java:344)
        at org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask.deployArtifacts(BuildInfoBaseTask.java:502)
        at org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask.prepareAndDeploy(BuildInfoBaseTask.java:421)
        at org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask.collectProjectBuildInfo(BuildInfoBaseTask.java:124)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskC
lassInfoStore.java:141)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskCla
ssInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskCla
ssInfoStore.java:123)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:632)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:615)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.jav
a:95)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.ja
va:76)
        ... 70 more


BUILD FAILED

Your Environment

gradle version:2.3.0
gradle plugin version:3.3

Build-info publishing fails for `gradle-example-publish`

Using Gradle examples of this repo to test Artifactory integration (gradle-example-publish, gradle-example, gradle-android-aar).

Modified build.gradle to point to in-house Artifactory instance, with valid credentials.
Artifactory version: "Artifactory OSS 5.0.0 rev 50007".
Artifactory Gradle plugin version: 4.5.4.

When running ./gradlew artifactoryPublish, task always fails with this error:

* What went wrong:
Execution failed for task ':artifactoryPublish'.
> java.io.IOException: Could not publish build-info: There is either an incompatible or no instance of Artifactory at the provided URL.

Prior to this error, artifacts are uploaded just fine.

How can this be fixed?

Add Pipeline examples that use files pattern for upload & download & with & without regexp

Currently however, the wildcard pattern with "regexp": "false" seems to have problems picking up files.
(this might be a bug or it might be a lack of my understanding)

C:/Jenkins/workspace/build/lib/my-plugin-1.0.0.-SNAPSHOT-11.jar

If its a lack of my understanding, then this would be partly due to the fact that its not well documented enough. I'd like to see fuller working examples on JFrog's File Specs page of using a pattern with and without regexp that also uses a subdirectory folder path, as shown in my example:

stage 'Artifactory Upload'
 node{
 def uploadSpec = """{
  "files": [
    {
      "pattern": "/build/lib/my-plugin*.jar",
      "target": "my-libs/",
      "regexp": "false",
      "recursive": "false"
    }
 ]
}"""
server.upload(uploadSpec)
}

UPDATE: I have resolved my problem, but a good example would benefit others. My issue was that I did not use wildcard * for the repository name portion of the pattern syntax,

[Mandatory if 'aql' is not specified]
Specifies the source path in Artifactory, from which the artifacts should be downloaded, in the following format: [repository name]/[repository path]. You can use wildcards to specify multiple artifacts.

So my pattern was missing the wildcard * at the beginning since I am using Jenkins pipeline and a workspace:

"pattern":"*/build/lib/my-plugin*.jar"

Jenkins pipeline example for NPM projects?

Could someone please publish an example Jenkinsfile for npm projects? Specifically the part where you publish your tgz artifact (the result of npm pack or yarn pack) to Artifactory. Thanks

gradle ci-server example does not build outside of CI server and does not support the Artifactory Release Managment feature

I added a pull request which addresses this issue in the gradle ci-server example.
As is, has several problems

  • Does not build (causes gradle runtime errors) standalone -- therefore it cannot be tested except from within a CI server.
    • does not provide a default resolution repository (jcenter)
    • directly references 'artifactoryPublish.skip' which causes a fatal build error if artifactory plugin is not applied -- and as per README you should NOT apply the artifactory plugin (should be done by CI server)
  • Does not support the Artifactory Release Management feature because it hard-codes the version instead of using the currentVersion property. All the other examples use 'version = currentVersion'

Tested with Artifactory Gradle Team City plugin.

How to avoid overwriting a previous artifact on Artifactory with Gradle?

Hi,

I would like to know how avoid the case of you overwrite a artifact published previously by error.

Researching on Internet, I found this thread for Ivy:
http://stackoverflow.com/questions/34192176/how-to-check-if-an-artifact-exist-in-artifactory-based-on-a-local-ivy-file/34273793

<ivy:publish overwrite="false"/>

but I would like to know how to do with Gradle. I read the technical documentation but I didn't see the option:
https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin

Many thanks in advance.

Juan Antonio

Error in msbuild sample

Hi -

When I try to re-build the "ms-build" example project , I encounter the following issues. Can you please help in moving forward?

Could not extract targetBuilderCallback from Microsoft.Build.BackEnd.TaskHost
at JFrog.Artifactory.BuildEngineExtensions.GetProjectInstance(IBuildEngine buildEngine)
at JFrog.Artifactory.BuildEngineExtensions.GetEnvironmentVariable(IBuildEngine buildEngine, String key, Boolean throwIfNotFound)
at JFrog.Artifactory.Utils.SolutionHandler.MsbuildInterpreter(FileInfo artifactoryConfigurationFile, ArtifactoryBuild task)
at JFrog.Artifactory.Utils.SolutionHandler.GetMainConfiguration()
at JFrog.Artifactory.Utils.SolutionHandler..ctor(ArtifactoryBuild task, BuildInfoLog log)
at JFrog.Artifactory.ArtifactoryBuild.Execute() Artifactory

The "ArtifactoryBuild" task failed unexpectedly.
System.Exception: Exception from Artifactory Task: Could not extract targetBuilderCallback from Microsoft.Build.BackEnd.TaskHost
at JFrog.Artifactory.ArtifactoryBuild.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() Artifactory

Error in build

[Artifactory] Exception from Artifactory Task: Could not extract targetBuilderCallback from Microsoft.Build.BackEnd.TaskHost
Could not extract targetBuilderCallback from Microsoft.Build.BackEnd.TaskHost
4>D:\Projects\project-examples\msbuild-example.artifactory\Deploy.targets(26,5): error : at JFrog.Artifactory.BuildEngineExtensions.GetProjectInstance(IBuildEngine buildEngine)
4>D:\Projects\project-examples\msbuild-example.artifactory\Deploy.targets(26,5): error : at JFrog.Artifactory.BuildEngineExtensions.GetEnvironmentVariable(IBuildEngine buildEngine, String key, Boolean throwIfNotFound)
4>D:\Projects\project-examples\msbuild-example.artifactory\Deploy.targets(26,5): error : at JFrog.Artifactory.Utils.SolutionHandler.MsbuildInterpreter(FileInfo artifactoryConfigurationFile, ArtifactoryBuild task)
4>D:\Projects\project-examples\msbuild-example.artifactory\Deploy.targets(26,5): error : at JFrog.Artifactory.Utils.SolutionHandler.GetMainConfiguration()
4>D:\Projects\project-examples\msbuild-example.artifactory\Deploy.targets(26,5): error : at JFrog.Artifactory.Utils.SolutionHandler..ctor(ArtifactoryBuild task, BuildInfoLog log)
4>D:\Projects\project-examples\msbuild-example.artifactory\Deploy.targets(26,5): error : at JFrog.Artifactory.ArtifactoryBuild.Execute()

Delete Items

It wasn't clear if the integration with pipeline supports the following.

  1. Can I get a list of all the items in a path?
  2. Delete the items in the above path

Cannot publish gradle subprojects to different repositories

I currently have one gradle project with multiple gradle sub-projects. There are a few of those sub projects that require an artifact to be published to artifactory.

However it seems as though when adding the artifactory task to multiple build.gradle files, only one is picked up and all of the artifacts are published to the same repo, rather then the one specified by their repoKey in the build.gradle file.

The below code is used in all of the build files with a different repoKey specified

// Artifactory publish
artifactory {
contextUrl = 'http://xxx:0000/artifactory'
publish {
repository {
repoKey = 'xxx-local'
username = artifactoryUsername
password = artifactoryEncryptedPassword
}
}
}

publishing {
publications {
mavenJava(MavenPublication) {
groupId 'xxx'

        // Use the "fat" jar
        from components.shadow

        // Add the configuration tar
        artifact configurationTar
    }
}

}

artifactoryPublish {
publications('mavenJava')
}

gradle2 examples for publish does not work with artifactory out of the box

https://github.com/JFrogDev/project-examples/tree/master/gradle-examples/gradle2-example-publish

Suggestion: Test your tutorials on a naked box with clean install of gradle and artifactory. There are many missing steps.

Example should be simpler and should work with artifactory out of the box. More comments. Should not have to configure repos in artifactory server to get "Getting Started" example to work. Perhaps a README that tells you how to setup the missing repos and missing properties that the plugin needs.

The default does not have a gradle-libs-snapshot repo which the example requires. There is no readme to tell you to create it.

2nd you have create missing repos and disable the POM validation or it does not work. Where is that documented in the example? No where.

3rd the properties are not read for the plugin from the gradle.properites. You have to hard code them or add them to ~/.gradle/gradle.properties.

4th be clear about gradle 1 pub example not for gradle 2.

Also I wasted quite a bit of time trying to get the gradle 1 example to work. There should be a README since there are two explaining, that if you are using gradle 2, don't bother with this go to the other.

How to keep different pom files for JAR and AAR?

I am using this plugin to upload to our artifactory. We have two publications, aar and jar.

defaults {
    publications('aar', 'jar')
    publishArtifacts = true

    properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
    publishPom = true
}

When running the task, it seems to overwrite the generated pom:

:Project:generatePomFileForJarPublication
:Project:artifactoryPublish
Deploying artifact: http://server/2.0.0+1488503527/Project-2.0.0+1488503527.aar
Deploying artifact: http://server/2.0.0+1488503527/Project-2.0.0+1488503527.jar
Deploying artifact: http://server/2.0.0+1488503527/Project-2.0.0+1488503527.pom
Deploying artifact: http://server/2.0.0+1488503527/Project-2.0.0+1488503527.pom

How can I tell the plugin to create different poms for aar and jar? or create one single pom supporting both?

NO published modules

I tried to publish some artifacts from the Gradle build, using your examples from 4. The task artifactoryPublish succeeds, but it only uploads a build info, no built artifacts. This is curious, because my build script says publishBuildInfo = false, whereas it explicitely states publishConfigs('archives') publishArtifacts = true.

I'm using Gradle 3.1, and script code is;

`apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'

publishing {
publications {
mavenJava(MavenPublication) {
pom.withXml {
asNode().appendNode('description', 'A demonstration of Maven POM customization')
}
from components.java
artifact sourceJar {
classifier 'sources'
}
}
}
}
artifactory {
contextUrl = artifactoryUrl
publish {
repository {
repoKey = 'libs-uvdms'
username = 'xxxx'
password = 'yyyy'
}
defaults {
publications('mavenJava')
publishConfigs('archives')
publishArtifacts = true
publishPom = true
publishBuildInfo = false // true by default
}
}
}
`

upload spec match multiple file extensions

def uploadSpec = '''{
    "files": [
      {
      "pattern": "gitrepo/<project>-(.*)/target/(.*)-'''+version+'''(.*)(.jar|.pom)",
      "target": "snapshots/<organization>/{2}/'''+version+'''/",
      "props": "GitCommitId='''+gitRev+'''",
      "regexp": "true"
      }
   ]
}'''

Above is the uploadSpec I try to use to upload all .jar files and .pom files, but Jenkins reports that the pattern matched only .jar files.
Is there a way to define such OR in pattern? Nowhere in samples I find anything like this.

[Question][Usage] Sample on using pointers to Artifactory

Hi Team,

Could someone please provide a sample on how to have symlinks in artifactory?

Use case:

As soon as an artifact is uploaded to artifactory, I wish to have a symlink pointed to that artifactory ?

something similar to current / develop.

Please let me know in case more info is required from my side.

gradle-examples/4/gradle-example should build by resolving via jcenter

It would be good if this example built out-of-the-box, but it cannot as it is pointing to a local Artifactory instance, which is probably absent for test-builds.

I propose changing this to jcenter with some comments about changing it back for a local Artifactory.

Currently you get this if you build naively to verify the project:

* What went wrong:
Could not resolve all files for configuration ':api:compileClasspath'.
> Could not resolve commons-lang:commons-lang:2.4.
  Required by:
      project :api
   > Could not resolve commons-lang:commons-lang:2.4.
      > Could not get resource 'http://localhost:8081/artifactory/jcenter/commons-lang/commons-lang/2.4/commons-lang-2.4.pom'.
         > Could not HEAD 'http://localhost:8081/artifactory/jcenter/commons-lang/commons-lang/2.4/commons-lang-2.4.pom'.
            > Connect to localhost:8081 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)
   > Could not resolve commons-lang:commons-lang:2.4.
      > Could not get resource 'http://localhost:8081/artifactory/jcenter/commons-lang/commons-lang/ivy-2.4.xml'.
         > Could not GET 'http://localhost:8081/artifactory/jcenter/commons-lang/commons-lang/ivy-2.4.xml'.
            > Connect to localhost:8081 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)
> Could not resolve org.apache.wicket:wicket:1.3.7.
  Required by:
      project :api
   > Could not resolve org.apache.wicket:wicket:1.3.7.
      > Could not get resource 'http://localhost:8081/artifactory/jcenter/org/apache/wicket/wicket/1.3.7/wicket-1.3.7.pom'.
         > Could not HEAD 'http://localhost:8081/artifactory/jcenter/org/apache/wicket/wicket/1.3.7/wicket-1.3.7.pom'.
            > Connect to localhost:8081 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)
   > Could not resolve org.apache.wicket:wicket:1.3.7.
      > Could not get resource 'http://localhost:8081/artifactory/jcenter/org.apache.wicket/wicket/ivy-1.3.7.xml'.
         > Could not GET 'http://localhost:8081/artifactory/jcenter/org.apache.wicket/wicket/ivy-1.3.7.xml'.
            > Connect to localhost:8081 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)

Failed Travis build: https://travis-ci.org/javabrett/project-examples/builds/306532953
Passing Travis build: https://travis-ci.org/javabrett/project-examples/builds/306539984

Maven deploy only after tests were successful

I want to use the Artifactory plugin in my Jenkins pipeline. However, I don't want to publish the artifacts if the tests were not successful.
Here is how I do it at the moment (set the deployArtifacts option to false, Build, Test, set it to true, build again).
Is there any way to avoid having to build it again?

def server = Artifactory.server('Artifactory')
def rtMaven = Artifactory.newMavenBuild()
rtMaven.resolver server: server, releaseRepo: 'maven-resolver', snapshotRepo: 'maven-snapshot'
rtMaven.deployer server: server, releaseRepo: 'maven', snapshotRepo: 'maven-snapshot'
rtMaven.deployer.deployArtifacts = false
rtMaven.tool = 'maven-default'
def buildInfo = null;

stage('Checkout') {
    step([$class: 'WsCleanup'])
    checkout scm
}

stage('Build with Artifactory') {
    buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile test-compile install --update-snapshots -DskipTests=true', buildInfo: buildInfo;
}

stage('Test') {
    buildInfo = rtMaven.run pom: 'pom.xml', goals: 'initialize surefire:test', buildInfo: buildInfo;
    junit '**/target/surefire-reports/*.xml'
}

stage('Deploy Artifactory') {
    rtMaven.deployer.deployArtifacts = true
    buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile install -DskipTests=true', buildInfo: buildInfo;
    server.publishBuildInfo buildInfo
}

Using plugin faild for buildSrc project

something like this project:
https://github.com/JFrogDev/project-examples/blob/master/gradle-examples/4/gradle-example-bintray-info/build.gradle

My environment:

gradlew version 2.14.1
gradle version 3.1
mac sierra
jdk:

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

I am building a multi-project project, with a buildSrc project.

I want to use artifactory plugin in this buildSrc project.

buildSrc/build.gradle

buildscript {
    repositories {
       jcenter()
    }
    dependencies {
        classpath("org.jfrog.buildinfo:build-info-extractor-gradle:4.4.0") 
    }
}

repositories {
    jcenter()
}

apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'

artifactory {

}

i get the following error:

Error:Could not find method artifactory() for arguments [artifactory_57tzk4yymlj2f7o2x2274ugd5$_run_closure2@33af4f71] on root project 'buildSrc' of type org.gradle.api.Project.

what is weird, when i using this plugin in a non-buildSrc project, it is ok.

Jenkins pipeline and promotion of SNAPSHOTS

Hello,

I've managed to setup a Jenkinsfile that has a Artifactory.addInteractivePromotion in order to promote builds.

However, it seems the promotion is not smart enough to rename the version from SNAPSHOT to a release, because I am getting this error:

ERROR: Promotion failed during dry run (no change in Artifactory was done): HTTP/1.1 400 Bad Request
{
  "messages" : [ {
    "level" : "ERROR",
    "message" : "The repository 'm2-releases-local' rejected the path 'xxx/ccccc/modules/security/65.0.B65-SNAPSHOT/security-65.0.B65-20170808.095542-1-tests.jar' due to a conflict with its snapshot/release handling policy."
  }, {
    "level" : "INFO",
    "message" : "Skipping promotion status update: item promotion was completed with errors and warnings."
  } ]
}
Completed

I am using the cloud-hosted Artifactory.

Building on Jenkins fails due to updatePolicy

I'm trying to build the maven example with the Artifactory plugin on Jenkins.
My Jenkinsfile looks like this:

`node("builder") {
def server = Artifactory.server 'Artifactory'
def rtMaven = Artifactory.newMavenBuild()

stage 'Build'
    git url: 'https://github.com/jfrogdev/project-examples.git'

stage 'Artifactory configuration'
    rtMaven.tool = 'maven-default' // Tool name from Jenkins configuration
    rtMaven.deployer releaseRepo:'libs-release-local', snapshotRepo:'libs-snapshot-local', server: server
    rtMaven.resolver releaseRepo:'libs-release', snapshotRepo:'libs-snapshot', server: server
    def buildInfo = Artifactory.newBuildInfo()
    

stage 'Exec Maven'
    rtMaven.run pom: 'maven-example/pom.xml', goals: 'clean install', buildInfo: buildInfo

stage 'Publish build info'
    server.publishBuildInfo buildInfo

}`

The error message I get is the following:

[main] ERROR org.apache.maven.cli.MavenCli - Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Failure to find org.apache.maven.plugins:maven-plugins:pom:22 in /artifactory/libs-release was cached in the local repository, resolution will not be reattempted until the update interval of artifactory-release has elapsed or updates are forced

If I wait some time (like 2 minutes), the jobs succeeds.

What I actually expected was that it would always update the dependencies.
I think the updatePolicy is not set like I want it to.

Where can I set it?

Does the Maven tool adapter actually use my Jenkins managed global settings.xml for maven by default?

bash usage document relationship between posting builds and artifacts

As a new user of Artifactory, I am trying to implement it on a new project by integrating into bash build scripts.

It seems that the sample bash scripts do miss few things: is not clear in which order you are supposed to call them. Once you have the build ready, are you first supposed to upload the artifacts and to after this to publish the build or the other way.

So far I was able to upload the artifacts but I see no link between them and builds. In fact I do see the files there, as part of the test repository but without any reference to which build they are port of.

Inclusion of any additional information should be highly appreciated.

DSL for "Deploy artifacts to Artifactory" post-build action

Neither an example nor a documentation exists on how "Deploy artifacts to Artifactory" post-build action features can be used via Artifactory DSL in Jenkins pipeline script. It is not clear, for example, how

  • artifacts can be deployed using Maven repository layout as in "Deploy maven artifacts" feature
  • "Discard old builds from Artifactory" feature can be used
  • "Capture and publish build info" feature can be used

how to specify release & snapshot repository for gradle ci pipeline build?

In maven build, we've the ability to set a snapshot and release repo:

mvnBuild.resolver server: artifactoryServer, 
				releaseRepo: artifactoryReleaseRepo, 
				snapshotRepo: artifactorySnapshotRepo
mvnBuild.deployer server: artifactoryServer, 
				releaseRepo: artifactoryPublishReleases, 
				snapshotRepo: artifactoryPublsihSnapshots

Is there such an option for gradle build? i'm only seeing a repo tag...

rtGradle.resolver repo: artifactoryReleaseRepo, server: artifactoryServer
rtGradle.deployer repo: artifactoryPublishReleases, server: artifactoryServer

Project not find error

Project 'api' not found in root project 'AndroidUtils'. Some candidates are: 'ap

how to slove?

New sha256 header is not used in bash deploy-file.sh

In recent versions of artifactory/artifactory pro sha256 values are able to be specified using the "X-Checksum-Sha256" header.

I'm not sure if this is a pro-only feature or not but I do know that specifying the header in older versions of artifactory and in the free version doesn't cause any issues (ie. the header is ignored).

Given that this is the case, and given that ideally everyone should be using sha256 values (see news a while ago about sha1 hashes potentially being vulnerable with modern compute resources) it seems like it should be encouraged to send the header, thus it should be in the bash script which I imagine is the starting point for a lot of users who want to quickly figure out how to upload stuff as a result of a build.

Given that it's pretty simple to add this I'll open a pull request with the changes for someone to review and decide if adding sha256 to the example is desirable.

Document docker pipeline integration

Would it be possible to have a basic example of artifactory build pull/push integration.

I tried on my side, it works but i have empty build info.

gradle-examples/4/gradle-example needs newer gradle-wrapper, 2.0 fails

This project declares a very old Gradle (2.0) in its wrapper and does not work:

* What went wrong:
Failed to notify build listener.
> Could not find method getPluginManager() for arguments [] on root project 'gradle-example'.
> Could not find method getPluginManager() for arguments [] on root project 'gradle-example'.
> Could not find method getPluginManager() for arguments [] on root project 'gradle-example'.
> Could not find method getPluginManager() for arguments [] on root project 'gradle-example'.
> Could not find method getPluginManager() for arguments [] on root project 'gradle-example'.

Should upgrade to latest Gradle 4.3.1.

Build failure in Travis: https://travis-ci.org/javabrett/project-examples/builds/306531512
Improved build failure in Travis (resolves this issue), exposes new issue: https://travis-ci.org/javabrett/project-examples/builds/306532953

DSL for "Deploy artifacts to Artifactory" post-build action

Is there a pipeline DSL method for "Deploy artifacts to Artifactory" with maven build on version 2.7.2? I see that we can build and publish build info, but there doesn't seem to be a way to deploy the artifact using the artifactoryMaven.deployer information.

Is this currently available in the plugin for pipeline or is the uploadSpec the only method available at the moment?

Jenkins Post-Build promotion?

Since migrating to Jenkins' pipelines, the Artifactory Release Promotion link (see img) has disappeared. Is there any documentation or examples of how to enable this for pipelines jobs?

Promotion appears to be available as a build step, but all available examples publish build-info and then immediately trigger the promotion. Since promotion should occur after an event(s) (QA validation, for example), I don't understand this [publish-immediately] use-case

Ideally, we would set the promotionConfig to the promote-action for later execution via the missing Artifactory Release Promotion link. Is this already available?

screen shot 2016-12-23 at 12 41 47 pm

Publication type 'xxxxxxxx_closure' not supported in task ':de.uvdms.util:artifactoryPublish'.

In my multiproject I defined the publishing task and artifactory task in a subprojects closure in the root build script. Because I have to set the artifactId for the POM dependent on the individual subprojects I have a publishing closure in the build script of the subproject like this:
publishing { publications { mavenJava(MavenPublication) { artifactId = 'util' } } }

Now while this works and deploys the jar to Artifactory, the build run outputs:
Publication type 'build_d2zb6onx4stjn2hga3jlbnnpi$_run_closure10$_closure63$_closure68$_closure71$_closure72' not supported in task ':de.uvdms.util:artifactoryPublish'.

I have no idea what this might mean.

Also, the script outputs an response from Artifactory stating:
Checksum deploy failed. No existing file with SHA1: 96a54ecd6fd00c5ab05a0a8e9d684550f7ddf130

What's going on? Any help?

with the bash deploy-file.sh my artifacts are published but build-info gives errors

ERROR: Could not publish build-info: Error occurred while requesting version information: Unauthorized
java.io.IOException: Could not publish build-info: Error occurred while requesting version information: Unauthorized
at org.jfrog.build.extractor.clientConfiguration.client.ArtifactoryBuildInfoClient.sendBuildInfo(ArtifactoryBuildInfoClient.java:244)
at org.jfrog.hudson.generic.GenericBuildInfoDeployer.deploy(GenericBuildInfoDeployer.java:62)
at org.jfrog.hudson.generic.ArtifactoryGenericConfigurator$1.tearDown(ArtifactoryGenericConfigurator.java:309)
at hudson.model.Build$BuildExecution.doRun(Build.java:173)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381)
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered

Deploy artifacts to Artifactory Through Pipeline Job Giving Exception -RejectedAccessException

org.jfrog.hudson.pipeline.types.buildInfo.BuildInfo
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:113)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:16)
at WorkflowScript.run(WorkflowScript:36)
at cps.transform(Native Method)
at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
at sun.reflect.GeneratedMethodAccessor3452.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:76)
at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
at sun.reflect.GeneratedMethodAccessor4288.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
at com.cloudbees.groovy.cps.Next.step(Next.java:58)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:163)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:324)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:78)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:224)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:63)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Please help in above issue.

How to upload Java Libray to Artifactory in Android Studio ?

I want to use android library like Butter Knife,for example:

dependencies {
  compile 'com.jakewharton:butterknife:8.8.1'
  annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}

But how should I do to upload Java module?

My gradle config:

apply plugin: 'java'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'
···
task sourceJar(type: Jar) {
    from sourceSets.main.allSource
    classifier = 'sources'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            groupId GROUP_ID
            version = VERSION_NAME
            artifactId ARTIFACT_ID
            from components.java
            artifact sourceJar
            artifact javadocJar
            pom.withXml {
                asNode().children().last() + {
                    resolveStrategy = Closure.DELEGATE_FIRST
                    name 'project-name'
                    description 'description for project'
                }
            }
        }
    }
}

artifactory {
    contextUrl = MAVEN_LOCAL_PATH
    publish {
        repository {
            repoKey = MAVEN_LOCAL_DIR
            username = "user"
            password = "pwd"
        }
        defaults {
            // Reference to Gradle publications defined in the build script.
            // This is how we tell the Artifactory Plugin which artifacts should be
            // published to Artifactory.
            publications('mavenJava')
            publishArtifacts = true
            // Properties to be attached to the published artifacts.
            properties = ['qa.level': 'basic', 'dev.team' : 'core']
            // Publish generated POM files to Artifactory (true by default)
            publishPom = true
        }
    }
    resolve {
        repoKey = 'jcenter'
    }
}

Http(s) proxy System properties not honored

It seems the plugins is missing the ability to specify http(s) proxy settings and does not honor system property - is this a know issue or are the settings just undocumented but available?

newMavenBuild resolver not fetching plugins

Hi just found out you release the Jenkins pipeline DSL support for maven and gradle artifacts.
Great news :))
I am using your exapmle at maven-example/Jenkinsfile
And I get the following in Jenkins

Jenkins Artifactory Plugin version: 2.7.1
Artifactory integration is enabled
[workspace] $ java -classpath /opt/apache/maven/3.3.9/boot/plexus-classworlds-2.5.2.jar -Dmaven.home=/opt/apache/maven/3.3.9 -DbuildInfoConfig.propertiesFile=/tmp/buildInfo6269602944685285109.properties -Dm3plugin.lib=/var/lib/jenkins/cache/artifactory-plugin/2.7.1 -Dclassworlds.conf=/tmp/classworlds4171397471264072306conf -Dmaven.multiModuleProjectDirectory=/var/lib/jenkins/jobs/test-jenkinsfile/workspace org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml clean install -DskipTests 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant - [buildinfo] Properties file found at '/tmp/buildInfo6269602944685285109.properties'
[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -                                                                         
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building spring-boot-jenkinsfile 0.0.1-SNAPSHOT
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] WARN org.codehaus.plexus.PlexusContainer - The POM for org.springframework.boot:spring-boot-maven-plugin:jar:1.3.6.RELEASE is missing, no dependency information available
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 0.502 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2016-09-26T16:20:12+03:00
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 11M/153M
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] ERROR org.apache.maven.cli.MavenCli - Plugin org.springframework.boot:spring-boot-maven-plugin:1.3.6.RELEASE or one of its dependencies could not be resolved: Failure to find org.springframework.boot:spring-boot-maven-plugin:jar:1.3.6.RELEASE in http://maven.logicea.net/libs-release was cached in the local repository, resolution will not be reattempted until the update interval of artifactory-release has elapsed or updates are forced -> [Help 1]
[main] ERROR org.apache.maven.cli.MavenCli - 
[main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch.
[main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
[main] ERROR org.apache.maven.cli.MavenCli - 
[main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
[main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
ERROR: Couldn't read generated build info at : /var/lib/jenkins/jobs/test-jenkinsfile/workspace/generated.build.info1261598547730512895.json

more detail here http://pastebin.com/C3ZX1mZP
should artifactory use plugins-release and plugins-snapshot from artifactory?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.