<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dzikoysk ✨</title>
    <description>The latest articles on DEV Community by dzikoysk ✨ (@dzikoysk).</description>
    <link>https://dev.to/dzikoysk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F87004%2Fd6f40fc1-db3a-4ac2-94a9-bfd2c8e1e3a9.jpeg</url>
      <title>DEV Community: dzikoysk ✨</title>
      <link>https://dev.to/dzikoysk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dzikoysk"/>
    <language>en</language>
    <item>
      <title>Huge RCE in log4j logging library in JVM ecosystem</title>
      <dc:creator>dzikoysk ✨</dc:creator>
      <pubDate>Fri, 10 Dec 2021 01:22:54 +0000</pubDate>
      <link>https://dev.to/dzikoysk/huge-rce-in-log4j-logging-library-in-jvm-ecosystem-4d1g</link>
      <guid>https://dev.to/dzikoysk/huge-rce-in-log4j-logging-library-in-jvm-ecosystem-4d1g</guid>
      <description>&lt;p&gt;5 days ago log4j received hot-fix for huge RCE. It's not quite known topic and today it has been expolited in multiple projects.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/dzikoysk/status/1469091718867951618"&gt;https://twitter.com/dzikoysk/status/1469091718867951618&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's really easy to reproduce, you should take a look at dependencies in your projects to address this issue. At least bump it to 2.15, the best choice is to move to e.g. logback, at least for a while.&lt;/p&gt;

</description>
      <category>java</category>
      <category>jvm</category>
      <category>kotlin</category>
      <category>scala</category>
    </item>
    <item>
      <title>Publishing your artifacts to the Reposilite - a new self-hosted repository manager</title>
      <dc:creator>dzikoysk ✨</dc:creator>
      <pubDate>Fri, 10 Jul 2020 13:19:44 +0000</pubDate>
      <link>https://dev.to/dzikoysk/publishing-your-artifacts-to-the-reposilite-a-new-self-hosted-repository-manager-3n0h</link>
      <guid>https://dev.to/dzikoysk/publishing-your-artifacts-to-the-reposilite-a-new-self-hosted-repository-manager-3n0h</guid>
      <description>&lt;p&gt;Maven ecosystem is a part of every Java developer’s life. It doesn't matter if you use Maven or Gradle, Kotlin or Scala &lt;em&gt;(etc.)&lt;/em&gt;, artifacts are exchanged via the same protocol - Maven protocol ✨.&lt;/p&gt;

&lt;p&gt;We can publish our public projects to the official Maven Central repository, but in case of the private ones, for such a long time we could only use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.sonatype.com/product-nexus-repository" rel="noopener noreferrer"&gt;Nexus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://archiva.apache.org/" rel="noopener noreferrer"&gt;Archiva&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jfrog.com/artifactory/" rel="noopener noreferrer"&gt;Artifactory&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These powerful projects are a great solution for large companies, but it does not really work well for hobbyist projects and environments focused on simplicity and reduced usage of resources due to limited budget.&lt;/p&gt;

&lt;p&gt;It's why I've created &lt;a href="https://reposilite.com/" rel="noopener noreferrer"&gt;Reposilite&lt;/a&gt;, lightweight and open source repository manager for Maven artifacts. It is a simple solution to replace managers like Nexus, Archiva or Artifactory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Efficient, reduce usage of your resources to even 10MB of RAM, instead of e.g. 2GB&lt;/li&gt;
&lt;li&gt;Extremely easy to use&lt;/li&gt;
&lt;li&gt;Approved and listed on &lt;a href="https://maven.apache.org/repository-management.html" rel="noopener noreferrer"&gt;Apache Site&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Open source ❤️&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;May have lack of extra features, but you can always request for them in the &lt;a href="//github.com/dzikoysk/reposilite/issues"&gt;issues&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Focused on performance, some of heavy features may not be implemented at all&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Install
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Project changes dynamically, so the some part of this article, like screenshots, may get outdated.&lt;/p&gt;

&lt;p&gt;At this moment &lt;em&gt;(Reposilite 2.6.1)&lt;/em&gt; you can use standalone jar version of Reposilite or &lt;a href="https://reposilite.com/docs/install#docker" rel="noopener noreferrer"&gt;Docker Image 🐳&lt;/a&gt;. If you're looking for always up to date installation guide, visit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://reposilite.com/docs/install" rel="noopener noreferrer"&gt;reposilite.com/docs/install&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We'll focus on standalone version in this article, which can be downloaded from GitHub Releases page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/dzikoysk/reposilite/releases" rel="noopener noreferrer"&gt;github.com/dzikoysk/reposilite/releases&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To launch Reposilite, just run the jar archive:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;java &lt;span class="nt"&gt;-Xmx16M&lt;/span&gt; &lt;span class="nt"&gt;-jar&lt;/span&gt; reposilite.jar


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Voilà, that's pretty much all, you've just become owner of a new Maven repository in less than 1 minute ฅ^•ﻌ•^ฅ You should be able to see the result on &lt;a href="http://localhost:80/" rel="noopener noreferrer"&gt;localhost:80&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Freposilite.com%2Fimg%2Fabout-preview.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Freposilite.com%2Fimg%2Fabout-preview.png" alt="Preview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That was quick, so let's do something else. Since 2.x version,  instead of complicated permission based system between users and projects, Reposilite uses access token system to authorize requests. To fully understand access tokens, visit: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="//reposilite.com/docs/authorization"&gt;reposilite.com/docs/authorization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;First of all, we need to tell Maven, where we want to upload our project. For this purpose, you should declare distribution management property in your &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;

&lt;span class="nt"&gt;&amp;lt;distributionManagement&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;repository&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;id&amp;gt;&lt;/span&gt;local-repository&lt;span class="nt"&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;url&amp;gt;&lt;/span&gt;http://localhost:80/releases&lt;span class="nt"&gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/repository&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/distributionManagement&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To generate access token for administrator, we need to use &lt;code&gt;keygen&lt;/code&gt; command in Reposilite CLI:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;keygen / admin
| Generated new access token &lt;span class="k"&gt;for &lt;/span&gt;admin&lt;span class="o"&gt;(&lt;/span&gt;/&lt;span class="o"&gt;)&lt;/span&gt;
| AW7-kaXSSXTRVL_Ip9v7ruIiqe56gh96o1XdSrqZCyTX2vUsrZU3roVOfF-YYF-y
| Stored tokens: 1


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;/&lt;/code&gt; separator means, that requests signed by this token may access all the paths, e.g:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Request URI&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;td&gt;Authorized&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/releases&lt;/td&gt;
&lt;td&gt;Authorized&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/snapshots&lt;/td&gt;
&lt;td&gt;Authorized&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;/releases/our/awesome/project&lt;/td&gt;
&lt;td&gt;Authorized&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now, you have to add a new server entry with generated token to your &lt;a href="https://maven.apache.org/settings.html" rel="noopener noreferrer"&gt;~/.m2/settings.xml&lt;/a&gt; file:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;server&amp;gt;
  &amp;lt;!-- The id just has to match the id provided in pom.xml --&amp;gt;
  &amp;lt;id&amp;gt;local-repository&amp;lt;/id&amp;gt;
  &amp;lt;username&amp;gt;admin&amp;lt;/username&amp;gt;
  &amp;lt;password&amp;gt;AW7-kaXSSXTRVL_Ip9v7ruIiqe56gh96o1XdSrqZCyTX2vUsrZU3roVOfF-YYF-y&amp;lt;/password&amp;gt;
&amp;lt;/server&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To publish your artifact, just run:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ mvn deploy


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you configured everything properly, you should be able to see a new version of your artifact in the repository browser! 🎉&lt;/p&gt;

&lt;p&gt;To discover more functionalities of Reposilite, like a dashboard or remote CLI:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F4235722%2F86064986-d1f6c200-ba6e-11ea-8c5f-d552b0163ce7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F4235722%2F86064986-d1f6c200-ba6e-11ea-8c5f-d552b0163ce7.gif" alt="CLI Preview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Visit the &lt;a href="https://reposilite.com/docs/about" rel="noopener noreferrer"&gt;Reposilite - Guide&lt;/a&gt; and &lt;a href="https://github.com/dzikoysk/reposilite" rel="noopener noreferrer"&gt;GitHub - Reposilite&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Good luck and happy deploying 🚀,&lt;br&gt;
dzikoysk&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>java</category>
      <category>maven</category>
      <category>gradle</category>
    </item>
  </channel>
</rss>
