logo
down
shadow

Maven artifact benchmarking


Maven artifact benchmarking

By : shyam babu
Date : November 22 2020, 10:48 AM
it fixes the issue It is of not that size that you should be worrying about, for example: see this artifact's size 18M,
You can browse around randomly or you can script it out on your local maven cache to determine average, max and min size, I don't know of any site which does this, at least I don't see a real usecase of it
code :


Share : facebook icon twitter icon
How to create a JarJar'd artifact with Maven, where use of artifact does not pull transitive dependencies?

How to create a JarJar'd artifact with Maven, where use of artifact does not pull transitive dependencies?


By : user2977786
Date : March 29 2020, 07:55 AM
this will help I found a solution to this problem by ditching the jarjar-maven-plugin, and reverting to the maven-shade-plugin. This allows repackaging classes within your own namespace, setting the main class of the jar, and crucially, rewriting the generated pom to not include the compile time dependencies which are now bundled.
The part of my pom.xml which acheived this is:
code :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.4</version>
<executions>
    <execution>
        <phase>package</phase>
        <goals>
            <goal>shade</goal>
        </goals>
        <configuration>

            <shadedArtifactAttached>false</shadedArtifactAttached>
            <createDependencyReducedPom>true</createDependencyReducedPom>

            <relocations>
                <relocation>
                    <pattern>org.objectweb.asm</pattern>
                    <shadedPattern>${repackage.base}.org.objectweb.asm</shadedPattern>
                </relocation>
            </relocations>
            <transformers>
                <transformer
                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                    <mainClass>${package.base}.my.MainClass</mainClass>
                </transformer>
            </transformers>
        </configuration>
    </execution>
</executions>
build-helper-maven-plugin : attach-artifact doesn't copy artifact into repository

build-helper-maven-plugin : attach-artifact doesn't copy artifact into repository


By : DzReal
Date : March 29 2020, 07:55 AM
I wish this helpful for you The problem was simple order of operations. The assembly was generate during the install phase which meant the installer-plugin couldn't locate it. I don't have evidence for how this got blocked build-helper but I suspect that assemble-plugin attached, installer-failed to install and recorded the item. When build-help executed it may have been attempting to work which installer plugin already tried.
Solution
Unable to execute dex: Multiple dex files define Lorg/apache/maven/artifact/Artifact

Unable to execute dex: Multiple dex files define Lorg/apache/maven/artifact/Artifact


By : fataj
Date : March 29 2020, 07:55 AM
will help you After some investigation it appears to be a m2e-android related issue
How to upload an artifact to Artifactory / consume it in a build system (Gradle Maven Ant) where the artifact does not h

How to upload an artifact to Artifactory / consume it in a build system (Gradle Maven Ant) where the artifact does not h


By : colea vasy
Date : March 29 2020, 07:55 AM
seems to work fine Answer 1 (will cover 2 as well in a different sense): Using Artifactory "Artifact Bundle" feature section under "Deploy" tab can do the TRICK for AT LEAST uploading the artifacts in a way we want, by creating a zip file first (containing the structure and artifacts in it) --OR you can upload the artifacts using/calling Artifactory REST API way.
High level idea:
code :
com/company/project/gigaproject/9.8.0/linux/gigainstall
com/company/project/gigaproject/9.8.0/solaris/gigainstall
com/company/project/gigaproject/9.8.0/win32/gigainstall.exe
com/company/project/gigaproject/9.8.0/gigafile.dtd
com/company/project/gigaproject/9.8.0/gigaanotherfile.dtd
com/company/project/gigaproject/9.8.0/giga.jar
com/company/project/gigaproject/9.8.0/giga.war
compile 'com.company.project:gigaproject:CANNOTSAY_HOW_TO_GET_GIGA_JARorGIGAINSTALL_with_without_extension'
com/company/project/gigainstall/9.8.0/gigainstall-9.8.0.linux
com/company/project/gigainstall/9.8.0/gigainstall-9.8.0.solaris
com/company/project/gigainstall/9.8.0/gigainstall-9.8.0.exe
com/company/project/gigafile/9.8.0/gigafile-9.8.0.dtd
com/company/project/gigaanotherfile/9.8.0/gigaanotherfile-9.8.0.dtd
com/company/project/giga/9.8.0/giga-9.8.0.jar
com/company/project/giga/9.8.0/giga-9.8.0.war
Successfully deployed 7 artifacts from archive: gigaproject.zip (1 seconds).
dependencies {
  compile "com.company.project:gigainstall:9.8.0@linux"
  compile "com.company.project:gigainstall:9.8.0@solaris"
  compile "com.company.project:gigainstall:9.8.0@linux"
  compile "com.company.project:giga:9.8.0
  compile "com.company.project:giga:9.8.0@war
  compile "com.company.project:gigafile:9.8.0@dtd
  compile "com.company.project:gigaanotherfile:9.8.0@dtd
}
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve com.company.project:gigafile:0.0.0.
  Required by:
      com.company.project:ABCProjectWhichConsumesGIGAProjectArtifacts:1.64.0
   > Could not GET 'http://artifactoryserver:8081/artifactory/ext-snapshot-local/com/company/project/gigafile/0.0.0/gigafile-0.0.0.pom'. Received status code 409 from server: Conflict
gigaproject/linux/gigainstall
gigaproject/solaris/gigainstall
gigaproject/win32/gigainstall.exe
gigaproject/gigafile.dtd
gigaproject/gigaanotherfile.dtd
gigaproject/gigaproject.zip
gigaproject/giga.jar
gigaproject/giga.war
dependencies {
   // This is the only line we need now.
   compile "com.company.project:gigaproject:9.8.0@zip"
}
dependencies {
   // See nothing mentioned after - x.x.x@
   compile "com.company.package:gigainstall:9.8.0@"
}
Maven artifact cannot be resolved; attempting to resolve artifact from the wrong repository

Maven artifact cannot be resolved; attempting to resolve artifact from the wrong repository


By : user3607686
Date : March 29 2020, 07:55 AM
Hope this helps You usually define the repos under repositories and each of it has an identifier. This identifier is then used for the mirrors. In your config you mirror the repo with id central
code :
<mirrors>
    <mirror>
        <id>Nexus</id>
        <name>Nexus Public Mirror</name>
        <url>https://myinternalnexushost.net/nexus/content/repositories/central</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
</mirrors>
<mirrors>
    <mirror>
        <id>Nexus</id>
        <name>Nexus Public Mirror</name>
        <url>https://myinternalnexushost.net/nexus/content/repositories/central</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
        <id>Spring</id>
        <name>Nexus Public Mirror</name>
        <url>https://myinternalnexushost.net/nexus/content/repositories/spring-milestone</url>
        <mirrorOf>spring-milestone</mirrorOf>
    </mirror>
</mirrors>
<mirrors>
    <mirror>
        <id>Nexus</id>
        <name>Nexus Public Mirror</name>
        <url>https://myinternalnexushost.net/nexus/content/repositories/maven-group</url>
        <mirrorOf>*</mirrorOf>
    </mirror>
</mirrors>
Related Posts Related Posts :
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org