Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by imen · Jan 09, 2015 at 11:37 AM · androidunity 4nexus

Publishing of an artifact Unity in a repository

Hi,

My goal is to publish an APK in a repository like (Nexus). This APK is built in Jenkins with Unity3dBuilder plugin.

To do this, I need to add some plugins in my pom.xml file. Does anyone have an idea about this problem ??

This is my pom.xml file :

 <?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>
     <groupId>com.company</groupId>
     <artifactId>UnityAppTest</artifactId>
     <version>1.7-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Application Unity de test</name>
     <scm>
         ...
     </scm>
     <distributionManagement>
         <repository>
         ...
         </repository>
         <snapshotRepository>
         ...
         </snapshotRepository>
     </distributionManagement>
     <repositories>
         <repository>
         ...
         </repository>
     </repositories>        
     <build>
         <plugins>            
             <plugin>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>2.3.2</version>
                 <configuration>
                     <source>1.6</source>
                     <target>1.6</target>
                 </configuration>
             </plugin>
             
             <!-- Attach apk to release -->
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
                 <configuration>
                     <artifacts>
                         <artifact>
                             <file>AngryBirdsAndroid.apk</file>
                             <type>apk</type>
                         </artifact>
                     </artifacts>
                 </configuration>
                 <executions>
                     <execution>
                         <phase>package</phase>
                         <goals>
                             <goal>attach-artifact</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
             <!-- Fin -->
         
             <!-- Archivage repo Nexus -SiFAST- -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-release-plugin</artifactId>
                 <version>2.2.2</version>
                 <configuration>
                     <tagBase>...</tagBase>
                 </configuration>
             </plugin>
             <plugin>
                 <groupId>com.github.danielflower.mavenplugins</groupId>
                 <artifactId>maven-gitlog-plugin</artifactId>
                 <version>1.4.7</version>
                 <executions>
                     <execution>
                         <phase>package</phase>
                         <goals>
                             <goal>generate</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
             <!-- Fin -->
         </plugins>
     </build>
 </project>
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by imen · Feb 09, 2015 at 09:58 AM

Hi :) The solution of this problem is to use build-helper-maven-plugin to attach an additional artifact to the package pom

 <!-- Attach apk to release -->
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
                 <version>1.9.1</version>
                 <executions>
                   <execution>
                     <id>attach-artifacts</id>
                     <phase>package</phase>
                     <goals>
                       <goal>attach-artifact</goal>
                     </goals>
                     <configuration>
                       <artifacts>
                         <artifact>
                           <file>${WORKSPACE}\builds\jenkinsTest\jenkinsTest.html</file>
                           <type>html</type>
                         </artifact>
                       </artifacts>
                     </configuration>
                   </execution>
                 </executions>
             </plugin>
             <!-- Fin -->

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Problems with loading asset bundles on android 1 Answer

[Unity Android]Game crashes(exit to home screen) just after the "Powered by Unity" splash screen. 3 Answers

Why is my build working on Unity but doesn't work on android? 1 Answer

how to access and modify my existing database made by DB browser for SQLite in unity after build 0 Answers

Dynamic Shadow not building to Nexus 10 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges