Skip to content

Commit

Permalink
Merge pull request gousiosg#10 from bitslab/fix-movejar-to-enable-mov…
Browse files Browse the repository at this point in the history
…ing-all-jar

Fix movejar to enable moving all jar
  • Loading branch information
jcoultas authored Apr 8, 2022
2 parents 008c322 + 92c79fc commit 4bc2cba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
21 changes: 0 additions & 21 deletions artifacts/configs/mph-table/mph-table.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,6 @@ index 65f0f80..508b290 100644
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.3.0</version>
+
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.2.0</version>
+ <executions>
Expand Down
8 changes: 1 addition & 7 deletions src/main/java/gr/gousiosg/javacg/stat/support/RepoTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,7 @@ public static Optional<RepoTool> obtainTool(String folderName){
private void moveJars() throws IOException {
Path sourceDir = Paths.get(System.getProperty("user.dir"), getProjectDir(), "target");
Path targetDir = Paths.get(System.getProperty("user.dir"), "artifacts", "output");

// @todo may want to be able to override this in the yaml file on a project basis...
String depGlob = this.name + "*-with-dependencies.jar";
String testGlob = this.name + "*-tests.jar";

moveFiles(sourceDir, targetDir, depGlob);
moveFiles(sourceDir, targetDir, testGlob);
moveFiles(sourceDir, targetDir, "*.jar");
}

private void moveFiles(Path sourceDir, Path targetDir, String glob) throws IOException {
Expand Down

0 comments on commit 4bc2cba

Please sign in to comment.