eclipse-ee4j / grizzly

Grizzly
https://eclipse-ee4j.github.io/grizzly
Other
147 stars 69 forks source link

jakarta.servlet:jakarta.servlet-api:6.0.0 is not available in maven central #2157

Closed kuldeepiitg closed 2 years ago

kuldeepiitg commented 2 years ago

jakarta.servlet:jakarta.servlet-api:6.0.0 is not present in maven central. Latest version I can see is 5.0.x https://repo.maven.apache.org/maven2/jakarta/servlet/jakarta.servlet-api/

Are you using some different maven repository? If yes, please share.

kuldeepiitg commented 2 years ago

Logs for mvn clean install

` [INFO] grizzly-extras ..................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 14.695 s [INFO] Finished at: 2022-03-17T07:12:46+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project grizzly-http-servlet: Could not resolve dependencies for project org.glassfish.grizzly:grizzly-http-servlet:bundle:4.0.0-SNAPSHOT: jakarta.servlet:jakarta.servlet-api:jar:6.0.0 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR]

`

kuldeepiitg commented 2 years ago

This is in reference to main branch

pzygielo commented 2 years ago

Are you using some different maven repository? If yes, please share.

Yes, activate staging profile to have it configured.

kuldeepiitg commented 2 years ago

@pzygielo How do we do that? Can you please share any link for reference?

arjantijms commented 2 years ago

@kuldeepiitg just add -Pstaging, e.g.

mvn clean install -Pstaging

Alternatively, add a profile like this to your ~/.m2/settings.xml:

  <profile>
      <id>default</id>
      <activation>
          <activeByDefault>true</activeByDefault>
      </activation>
           <repositories>
                <repository>
                    <id>sonatype-nexus-staging</id>
                    <name>Sonatype Nexus Staging</name>
                    <url>https://jakarta.oss.sonatype.org/content/repositories/staging/ </url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>

            <pluginRepositories>
                <pluginRepository>
                    <id>sonatype-nexus-staging</id>
                    <name>Sonatype Nexus Staging</name>
                    <url>https://jakarta.oss.sonatype.org/content/repositories/staging/ </url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
kuldeepiitg commented 2 years ago

@arjantijms Thank you. It worked.

Resharing the setting.xml I am using.

<settings
    xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>sonatype-nexus-staging</id>
                    <name>Sonatype Nexus Staging</name>
                    <url>https://jakarta.oss.sonatype.org/content/repositories/staging/ </url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>sonatype-nexus-staging</id>
                    <name>Sonatype Nexus Staging</name>
                    <url>https://jakarta.oss.sonatype.org/content/repositories/staging/ </url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
</settings>