Results 1 to 10 of 10
  1. #1
    ShedoSurashu is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default How to set JAR version in IntelliJ IDEA?

    In Visual Studio, there is a place to set the version of my project whenever I publish it and also an option to auto-increment it. What is the equivalent of this option in Java while in the IntelliJ IDEA IDE?

    How to set JAR version in IntelliJ IDEA?-hzsjj.png

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,083
    Rep Power
    4

    Default Re: How to set JAR version in IntelliJ IDEA?

    I've never seen this feature in IntelliJ IDEA v5 to v12.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,354
    Rep Power
    6

    Default Re: How to set JAR version in IntelliJ IDEA?

    Its already not a good idea to be in the mindset of "I have this in Visual Studio / .NET, what is the equivalent in Java" because that operates under the assumption that the two are similar, while they are incredibly not. They have overlapping problem domains, but other than that the design philosophy is completely and utterly different.

    For example: in .NET you do basically everything within one development environment (Visual Studio) while for Java development you tend to utilize a set of tools each with their own purpose, and for each tool you have multiple choices developed by different parties because oh boy do we like the freedom of choice. An IDE (Netbeans, Eclipse, IntelliJ, JDeveloper, ...) helps you to facilitate the programming of an application, a build tool (ANT+Ivy, Maven, Gradle, ...) helps to package, deploy and version the application, something like Hudson/Jenkins/Continuum manages continuous integration, etc. etc.

    Luckily over the years integration has become more of a thing so you can for example hook up ANT and Maven into an IDE and add their features (such as release management) to the tools that the IDE exposes itself. Some IDEs do that more smoothly than others.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    ShedoSurashu is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Re: How to set JAR version in IntelliJ IDEA?

    Quote Originally Posted by gimbal2 View Post
    Its already not a good idea to be in the mindset of "I have this in Visual Studio / .NET, what is the equivalent in Java" because that operates under the assumption that the two are similar, while they are incredibly not. They have overlapping problem domains, but other than that the design philosophy is completely and utterly different.

    For example: in .NET you do basically everything within one development environment (Visual Studio) while for Java development you tend to utilize a set of tools each with their own purpose, and for each tool you have multiple choices developed by different parties because oh boy do we like the freedom of choice. An IDE (Netbeans, Eclipse, IntelliJ, JDeveloper, ...) helps you to facilitate the programming of an application, a build tool (ANT+Ivy, Maven, Gradle, ...) helps to package, deploy and version the application, something like Hudson/Jenkins/Continuum manages continuous integration, etc. etc.

    Luckily over the years integration has become more of a thing so you can for example hook up ANT and Maven into an IDE and add their features (such as release management) to the tools that the IDE exposes itself. Some IDEs do that more smoothly than others.
    I see... Okay so let me rephrase my question, how do I assign versions to my jar files? (I originally posted this thread to the newbie section since I'm a newbie but it was moved here)

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,882
    Rep Power
    25

    Default Re: How to set JAR version in IntelliJ IDEA?

    Is there a tool that will display a jar's version number? There might be a line in the manifest file that could hold that info, I've never noticed if there was.
    If you don't understand my response, don't ignore it, ask a question.

  6. #6
    ShedoSurashu is offline Member
    Join Date
    Nov 2013
    Posts
    13
    Rep Power
    0

    Default Re: How to set JAR version in IntelliJ IDEA?

    Quote Originally Posted by Norm View Post
    Is there a tool that will display a jar's version number? There might be a line in the manifest file that could hold that info, I've never noticed if there was.
    Okay, so how do Java developers/users determine the version of the app they're making/running?

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: How to set JAR version in IntelliJ IDEA?

    Usually that functionality is part of the build tool used (see gimbal's list).
    So the "how" comes down to what tool you are planning on using.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  8. #8
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,083
    Rep Power
    4

    Default Re: How to set JAR version in IntelliJ IDEA?

    Quote Originally Posted by ShedoSurashu View Post
    Okay, so how do Java developers/users determine the version of the app they're making/running?
    I have an AppVersion class with a static final VERSION="1.2.3". I know when my version changes, I control that myself. Besides that, I have a static final REVISION="$Rev: 45678$", which is automatically updated when I commit this file in SVN. (Using svn hooks and svn propset).
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  9. #9
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,882
    Rep Power
    25

    Default Re: How to set JAR version in IntelliJ IDEA?

    If you distribute your jar files to many users, how are they able to get the version info when they report a problem?
    If you don't understand my response, don't ignore it, ask a question.

  10. #10
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,083
    Rep Power
    4

    Default Re: How to set JAR version in IntelliJ IDEA?

    The version info can be read from several places: Help -> About, in the application logfile, in the problem helper component which sends the logfiles to our helpdesk, the user will see it in many places, but not in the JAR/manifest.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

Similar Threads

  1. Getting started with IntelliJ IDEA
    By Bodachi in forum IntelliJ IDEA
    Replies: 2
    Last Post: 12-21-2012, 07:22 PM
  2. Lua for IntelliJ IDEA 1.0a21
    By java software in forum Java Software
    Replies: 0
    Last Post: 11-21-2011, 06:36 PM
  3. Using GWT with Intellij IDEA
    By turanan in forum IntelliJ IDEA
    Replies: 0
    Last Post: 07-13-2009, 08:51 PM
  4. Modifying JSP using IntelliJ IDEA 6.0.5
    By ddeokarb in forum IntelliJ IDEA
    Replies: 0
    Last Post: 11-28-2008, 02:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •