How do I add an Implementation-Version value to a jar manifest using Maven?

You would use the Maven Archiver: <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> </manifest> </archive> </configuration> </plugin> </plugins> This will add the following to the manifest file: Implementation-Title: ${pom.name} Implementation-Version: ${pom.version} Implementation-Vendor-Id: ${pom.groupId} Implementation-Vendor: ${pom.organization.name}

Generate manifest class-path from in Ant

<path id=”build.classpath”> <fileset dir=”${basedir}”> <include name=”lib/*.jar”/> </fileset> </path> <pathconvert property=”manifest.classpath” pathsep=” “> <path refid=”build.classpath”/> <mapper> <chainedmapper> <flattenmapper/> <globmapper from=”*.jar” to=”lib/*.jar”/> </chainedmapper> </mapper> </pathconvert> <target depends=”compile” name=”buildjar”> <jar jarfile=”${basedir}/${test.jar}”> <fileset dir=”${build}” /> <manifest> <attribute name=”Main-Class” value=”com.mycompany.TestMain”/> <attribute name=”Class-Path” value=”${manifest.classpath}”/> </manifest> </jar> </target> For further information check out this article.

Setting “task affinity” programmatically

You cannot. taskAffinity is contained by ActivityInfo, which is member of Activity. Source code of Activity public class Activity extends ContextThemeWrapper … … { // set by the thread after the constructor and before // onCreate(Bundle savedInstanceState) is called. @UnsupportedAppUsage /*package*/ ActivityInfo mActivityInfo; } And ActivityInfo has taskAffinity. Source code of ActivityInfo /** * Information …

Read more

What is the difference between “asInvoker” and “highestAvailable” execution levels?

This is described on MSDN: Basically, “asInvoker” will use the user’s default security settings. It’s described as “The application runs with the same access token as the parent process.”, which means the same security token is used as the calling process, which is typically the desktop shell (or the process that launches this, if you …

Read more