Browse Source

Fixing maven build file and packaging scripts to make sure that the deployment file is executable.

master
Drew Short 11 years ago
parent
commit
14593ef20a
  1. 2
      build.sh
  2. 7
      package.sh
  3. 35
      pom.xml

2
build.sh

@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
mvn clean package
mvn clean jfx:jar

7
package.sh

@ -7,8 +7,13 @@ PACKAGETAR=$PACKAGENAME.tar.gz
PACKAGEZIP=$PACKAGENAME.zip PACKAGEZIP=$PACKAGENAME.zip
TARGET=$PWD/target TARGET=$PWD/target
cd target/build/
#Packaging Jar Distributable
cd target/jfx/app/
echo "creating $PACKAGETAR in $TARGET" echo "creating $PACKAGETAR in $TARGET"
tar -zcvf $TARGET/$PACKAGETAR . tar -zcvf $TARGET/$PACKAGETAR .
echo "creating $PACKAGEZIP in $TARGET" echo "creating $PACKAGEZIP in $TARGET"
zip -r $TARGET/$PACKAGEZIP ./* zip -r $TARGET/$PACKAGEZIP ./*
#Removing prebuilt jar in target
rm $TARGET/*.jar
#Copying Jar to target for archiving
cp ./*.jar $TARGET

35
pom.xml

@ -176,39 +176,6 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<outputDirectory>${project.build.directory}/build/</outputDirectory>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.sothr.imagetools.App</mainClass>
<classpathPrefix>lib</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/build/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>2.6</version> <version>2.6</version>
<executions> <executions>
@ -235,7 +202,7 @@
<goal>copy-resources</goal> <goal>copy-resources</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory>${project.build.directory}/build</outputDirectory>
<outputDirectory>${project.build.directory}/jfx/app</outputDirectory>
<resources> <resources>
<resource> <resource>
<directory>src/includes</directory> <directory>src/includes</directory>

Loading…
Cancel
Save