Вопрос по intellij-idea, java – Как правильно построить банки из IntelliJ?

403

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded Steve the Maker
Error: User Rate Limit Exceeded ed22
Error: User Rate Limit Exceeded Etamar Laron
Error: User Rate Limit Exceeded SteelToe

Ваш Ответ

16   ответов
0

src/main/java

5

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceededstackoverflow.com/questions/41746177/…
1

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit Exceeded.

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
0

Error: User Rate Limit Exceeded

mvn package -DskipTests

Error: User Rate Limit Exceeded

0

Error: User Rate Limit ExceededIntelliJ IDEA 2018.3 HelpError: User Rate Limit Exceeded

To build a JAR file from a module;

  1. On the main menu, choose Build | Build Artifact.

  2. From the drop-down list, select the desired artifact of the type JAR. The list shows all the artifacts configured for the current project. To have all the configured artifacts built, choose the Build all artifacts option.

0

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

1

Error: User Rate Limit Exceeded

 <build>
    <plugins>

        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <mainClass>[path you class main]</mainClass>
                    </manifest>
                </archive>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
            <executions>
                <execution>
                    <id>make-assembly</id>
                    <phase>package</phase> 
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
0

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

java -jar xxxxx.jar

no main manifest attribute, in xxxxx.jar

and solution is:

Error: User Rate Limit Exceeded

<project folder>\src\main\java 

Error: User Rate Limit Exceeded

<project folder>\src\main\resources
127

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded.jarError: User Rate Limit Exceeded

  1. File > Save All.
  2. Run driver or class with main method.
  3. File > Project Structure.
  4. Select Tab "Artifacts".
  5. Click green plus button near top of window.
  6. Select JAR from Add drop down menu. Select "From modules with dependencies"
  7. Select main class.
  8. The radio button should be selecting "extract to the target JAR." Press OK.
  9. Check the box "Build on make"
  10. Press apply and OK.
  11. From the main menu, select the build dropdown.
  12. Select the option build artifacts.
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceededstackoverflow.com/questions/40636790/…
Error: User Rate Limit Exceeded
139

Error: User Rate Limit Exceeded

1. Creating artifact from IntelliJ:

  • Go to project structure:

File menu

  • Create a new artifact:

Create a new artifact

  • Select the main class, and be sure to change the manifest folder:

enter image description here

Error: User Rate Limit Exceeded

<project folder>\src\main\java 

Error: User Rate Limit Exceeded

<project folder>\src\main\resources

Error: User Rate Limit Exceeded

correct way for new manifest

  • Then you choose the dependencies what you want to be packed IN your jar, or NEAR your jar file

  • To build your artifact go to build artifacts and choose "rebuild". It will create an "out" folder with your jar file and its dependencies.

enter image description here

2. Using maven-assembly-plugin

Error: User Rate Limit Exceeded

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <finalName>ServiceCreate</finalName>
                    <appendAssemblyId>false</appendAssemblyId>
                    <archive>
                        <manifest>
                            <mainClass>com.svt.optimoo.App</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
  • Create a new run/debug configuration:

Create a new run/debug configuration:

  • Choose application:

Choose application

  • Fill in the form
  • Add the "assembly:single" maven goal after build to be executed last

enter image description here

Final setup

  • Save it, then run

enter image description here

Error: User Rate Limit Exceeded

JAR file location

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
1

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

3

Error: User Rate Limit Exceeded

Method 1: Build jar with maven and pom.xml

  1. File, new, project, maven
  2. create a package , create a java program inside that package enter image description here
  3. at pom.xml, add maven-jar-plugin.

        <plugin>
            <!-- Build an executable JAR -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.1.0</version>
            <configuration>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <classpathPrefix>lib/</classpathPrefix>
                        <mainClass>somePackage.sample</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
    

Error: User Rate Limit Exceededenter image description hereError: User Rate Limit Exceededenter image description here

  1. click on clean, then click on install enter image description here

  2. your jar file will show up inside the target folder enter image description here

  3. test your jar using java -jar

enter image description here

Method 2: Build jar with maven without pom.xml change

  1. File, new, project, maven
  2. create a package , create a java program inside that package (same as above)
  3. File -> Project Structure -> Project Settings -> Artifacts -> Click green plus sign -> Jar -> From modules with dependency

Very important!

Error: User Rate Limit Exceeded

enter image description here enter image description here

  1. then click build on menu , build artifacts, build

enter image description here

  1. find the jar in the out folder

enter image description here

  1. run it :)

enter image description here

468

Error: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
no main manifest attribute
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
0

Error: User Rate Limit Exceeded

File > Project Structure > Artifacts > '+' > JAR > From modules with dependencies > .....

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
0

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededProject Settings - Artifacts - Add (+) - Jar - From modules with dependenciesError: User Rate Limit ExceededEMPTYError: User Rate Limit Exceeded

Project Settings - Artifacts - Add (+) - Jar - EMPTY JARError: User Rate Limit ExceededresourcesError: User Rate Limit Exceedednote the presence of a folder META-INFError: User Rate Limit Exceeded

27

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

enter image description here

enter image description here

enter image description here

enter image description here

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded

Похожие вопросы