Browse Source

Add Main-Class for cpp-build tools JAR.

- Adds the manifest entries to the basic tools JAR.

- Creates a symlink named like the dependencies JAR that was used
  previously.

- Creates a symlink to the protobuf JAR.

In the manifest, the classpath reference to the protobuf JAR is a
relative filename. The second symbolic link satisfies that by linking to
the installed JAR.

This is only needed for people building packages

People who build normally with Maven will find that "mvn package" still
produces the original tools JAR which has its own Main-Class attribute

Author: daniel@pocock.pro
pull/567/head
Daniel Pocock 11 years ago
committed by Mihaela Rosca
parent
commit
d2d7a2cd78
2 changed files with 14 additions and 0 deletions
  1. +2
    -0
      debian/rules
  2. +12
    -0
      tools/java/cpp-build/pom.xml

+ 2
- 0
debian/rules View File

@ -62,6 +62,8 @@ configure/libphonenumber6::
# ln -s /usr/share/java/junit4.jar java/lib/junit-4.8.1.jar
# $(ANT) -f $(JAVA_BUILD).xml jar
build/libphonenumber6::
ln -sf cpp-build-1.0-SNAPSHOT.jar tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar
ln -sf /usr/share/java/protobuf.jar tools/java/cpp-build/target/protobuf-java-debian.jar
$(MAKE) -C $(CPP_BUILD) phonenumber phonenumber-shared
#override_dh_auto_test:


+ 12
- 0
tools/java/cpp-build/pom.xml View File

@ -91,6 +91,18 @@
</arguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.google.i18n.phonenumbers.EntryPoint</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Build a JAR with its dependencies (protocol buffers and common library). This JAR
contains the C++ build tools invoked by CMake during the libphonenumber C++ build. -->
<plugin>


Loading…
Cancel
Save