The artifact can be deployed in the local repository

This commit is contained in:
Luca Frosini 2020-04-28 18:38:03 +02:00
parent f30629c806
commit bd3eed3289
5 changed files with 108 additions and 7 deletions

View File

@ -8,8 +8,8 @@ gCubePrefix=org.gcube
gCubeGroupId=org.gcube.common
#for i in jackson-core jackson-annotations jackson-databind
for i in jackson-core
for i in jackson-core jackson-annotations jackson-databind
#for i in jackson-core
do
jacksonArtifactId=$i
@ -47,19 +47,17 @@ do
zip -r ../${gCubeArtifactJar} .
cd ${projectDir}/target
#mvn install:install-file -DgroupId=${gCubeGroupId} -DartifactId=${gCubeArtifactId} -Dversion=${jacksonVersion} -Dpackaging=jar -Dfile=${gCubeArtifactJar}
cp ../pom.deploy.template.${jacksonArtifactId}.xml deploy.pom.xml
sed -i 's/GCUBE_ARTIFACT_ID/'"${gCubeArtifactId}"'/g' deploy.pom.xml
sed -i 's/JACKSON_ARTIFACT_ID/'"${jacksonArtifactId}"'/g' deploy.pom.xml
sed -i 's/JACKSON_VERSION/'"${jacksonVersion}"'/g' deploy.pom.xml
mvn install:install-file -DpomFile=deploy.pom.xml -Dfile=${gCubeArtifactJar}
#mvn deploy:deploy-file -DpomFile=deploy.pom.xml -Dfile=${gCubeArtifactJar}
cd ${projectDir}
mvn clean
rm pom.xml
rm dependency-reduced-pom.xml
done

View File

@ -0,0 +1,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.common</groupId>
<artifactId>gcube-JACKSON_ARTIFACT_ID</artifactId>
<version>JACKSON_VERSION</version>
<description>JACKSON_ARTIFACT_ID repackaged as gCube artifact</description>
<packaging>jar</packaging>
</project>

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.common</groupId>
<artifactId>GCUBE_ARTIFACT_ID</artifactId>
<artifactId>gcube-JACKSON_ARTIFACT_ID</artifactId>
<version>JACKSON_VERSION</version>
<description>JACKSON_ARTIFACT_ID repackaged as gCube artifact</description>
<packaging>jar</packaging>

View File

@ -0,0 +1,25 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.common</groupId>
<artifactId>gcube-JACKSON_ARTIFACT_ID</artifactId>
<version>JACKSON_VERSION</version>
<description>JACKSON_ARTIFACT_ID repackaged as gCube artifact</description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>gcube-jackson-core</artifactId>
<version>JACKSON_VERSION</version>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>gcube-jackson-annotations</artifactId>
<version>JACKSON_VERSION</version>
</dependency>
</dependencies>
</project>

66
pom.xml Normal file
View File

@ -0,0 +1,66 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.common</groupId>
<artifactId>repackaged-jackson-databind</artifactId>
<version>2.10.3</version>
<description>jackson-databind repackaged artifact</description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<artifactSet>
<includes>
<include>com.fasterxml.jackson.core:jackson-databind</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>org.gcube.com.fasterxml.jackson</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/license/**</exclude>
<exclude>META-INF/*</exclude>
<exclude>META-INF/maven/**</exclude>
<exclude>LICENSE</exclude>
<exclude>NOTICE</exclude>
<exclude>/*.txt</exclude>
<exclude>build.properties</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
</project>