android - No artifacts found that match the file pattern "**/target/*.apk" -
i got output jenkins console while trying compile android project: notice didn't make change on main class jenkins console:
[info] build success [info] ------------------------------------------------------------------------ [info] total time: 10.701s [info] finished at: thu may 29 17:56:45 cest 2014 [info] final memory: 24m/491m [info] ------------------------------------------------------------------------ [jenkins] archiving /var/opt/jenkins/workspace/android-project-app/trunk/pom.xml com.proj.android.project.mobile/project-android/0.0.1-snapshot/project-android-0.0.1-snapshot.pom [jenkins] archiving /var/opt/jenkins/workspace/android-project-app/trunk/assets/build/project-android.apk com.proj.android.project.mobile/project-android/0.0.1-20140529.155643-5/project-android-0.0.1-20140529.155643-5.apk [jenkins] archiving /var/opt/jenkins/workspace/android-project-app/trunk/assets/build/project-android.jar com.proj.android.project.mobile/project-android/0.0.1-20140529.155643-5/project-android-0.0.1-20140529.155643-5.jar channel stopped archiving artifacts error: no artifacts found match file pattern "**/target/*.apk". configuration error? error: ‘**/target/*.apk’ doesn’t match anything: ‘**’ exists not ‘**/target/*.apk’ build step 'archive artifacts' changed build result failure irc notifier plugin: sending notification to: #jenkins finished: failure
and pom:
<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <parent> <groupid>com.proj</groupid> <artifactid>android</artifactid> <version>1.1-snapshot</version> </parent> <groupid>com.proj.android.project.mobile</groupid> <artifactid>project-android</artifactid> <version>0.0.1-snapshot</version> <packaging>apk</packaging> <name>project android application</name> <description>project mobile application android client</description> <url>http://maven.apache.org</url> <issuemanagement> <system>jira</system> <url>http://www/jira/browse/${jira.project.key}</url> </issuemanagement> <scm> <connection>scm:svn:http://svn/android/project-mobile-app/trunk/</connection> <developerconnection>scm:svn:https://svn/android/project-mobile-app/trunk/</developerconnection> <url>http://svn/web/wsvn/android/project-mobile-app/</url> </scm> <dependencymanagement> <dependencies> <!-- android dependencies --> <dependency> <groupid>android</groupid> <artifactid>android</artifactid> <scope>provided</scope> <version>4.0.3_r2</version> </dependency> <dependency> <groupid>android</groupid> <artifactid>support-v4</artifactid> <version>r6</version> </dependency> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <scope>test</scope> <version>${junit.version}</version> </dependency> <dependency> <groupid>org.apache.maven</groupid> <artifactid>maven-plugin-api</artifactid> <version>3.1</version> </dependency> <dependency> <groupid>bouncycastle</groupid> <artifactid>bcprov-jdk14</artifactid> <version>138</version> </dependency> <!-- <dependency> --> <!-- <groupid>com.proj.android.sample</groupid> --> <!-- <artifactid>pdf-viewer-ng</artifactid> --> <!-- <type>apklib</type> --> <!-- <version>1.0-snapshot</version> --> <!-- </dependency> --> <dependency> <groupid>com.proj.project.client</groupid> <artifactid>project-client</artifactid> <version>${project-client.version}</version> </dependency> </dependencies> </dependencymanagement> <build> <finalname>${project.artifactid}</finalname> <sourcedirectory>build</sourcedirectory> <directory>${project.basedir}/assets/build</directory> <pluginmanagement> <plugins> <plugin> <groupid>com.jayway.maven.plugins.android.generation2</groupid> <artifactid>android-maven-plugin</artifactid> <version>2.4</version> <configuration> <extractduplicates>true</extractduplicates> </configuration> </plugin> </plugins> </pluginmanagement> </build> <properties> <android.version>4.0.3_r2</android.version> <android.sdk>15</android.sdk> <android.emulator.avd>avd_15_4_0_3</android.emulator.avd> <jira.project.key>uniappand-1</jira.project.key> <junit.version>4.11</junit.version> <com.proj.project.client>1.0-snapshot</com.proj.project.client> </properties> </project>
i think problem come target directory because jenkins mentioned that. had 3 directories @ jenkins: assets ,res et src should add more these 3 folders? example libs or target ??
the archive artifacts post-build step not care pom. files in workspace folder, i.e $workspace
(also accessible through http://[jenkins-url]/job/[job-name]/ws
) , archives within jenkin's build history.
the files trying archive must exist in $workspace
. configuration, trying archive **/target/*.apk
means "under path, folder target
file , extension .apk
". can't find that, since workspace doesn't have folder target
anywhere, hence error: ‘**/target/*.apk’ doesn’t match anything: ‘**’ exists not ‘**/target/*.apk’
in pom file, have following line: <directory>${project.basedir}/assets/build</directory>
identifies built files end up. [base-dir-of-pom]/assets/build
, not target
.
also, form console log:
[jenkins] archiving /var/opt/jenkins/workspace/android-project-app/trunk/assets/build/project-android.apk
further proves .apk
artifact in fact located under trunk/assets/build
for archive artifacts file pattern, need use:
**/assets/build/*.apk
and matter of fact, use just:
**/build/*.apk
or even
**/*.apk
but question is: want archiving artifacts on jenkins (which takes space) when archiving artifacts maven?
Comments
Post a Comment