the application written in java , running on heroku. not want jars test-scope in production environment. 1 reason size of heroku-slug. example junit, selenium , green mail jars in target/dependency directory , prefer not.
is there can pom or maven option stop maven putting test-scope jars in target/dependency?
i have couple of solutions require maintain second list of files not include. manually synching 2 lists have tendency fail sooner rather later.
i believe need add <includescope>compile</includescope> maven-dependency-plugin config:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-dependency-plugin</artifactid> <version>2.4</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals><goal>copy-dependencies</goal></goals> <configuration> <includescope>compile</includescope> </configuration> </execution> </executions> </plugin> the included scopes defaults test, includes test dependencies, compile exclude them.
Comments
Post a Comment