If you write the following in Maven's pom.xml, an error will occur when deploying heroku. systemPath doesn't seem to allow it.
pom.xml
<dependency>
<groupId>com.hoge</groupId>
<artifactId>fuga</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.baseDir}/lig/fuga.jar</systemPath>
</dependency>
Execute the following command in Maven.
command
mvn deploy:deploy-file -Durl=(1) -Dfile=(2) -DgroupId=com.hoge -DartifactId=fuga -Dpackaging=jar -Dversion=1.0.0
number | Settings | value |
---|---|---|
(1) | Full path of the directory where the referenced project jar is placed | file://~/ |
(2) | Relative path of jar from referrer project root | target/fuga-1.0.0-SNAPSHOT.jar |
Executing the above command will create a jar file in the repo folder of the referenced project.
Add the following contents to pom.xml.
pom.xml
<repositories>
<repository>
<id>project.local</id>
<name>project</name>
<url>file:${project.basedir}/repo</url>
</repository>
</repositories>
<dependencies>
・ ・ ・
<dependency>
<groupId>com.hoge</groupId>
<artifactId>fuga</artifactId>
<version>1.0.0</version>
<!--Remove scope and systemPath-->
</dependency>
</dependencies>
Recommended Posts