Skip to content

Instantly share code, notes, and snippets.

@ocap-kirk
Last active March 8, 2019 19:35
Show Gist options
  • Save ocap-kirk/3c2ab2797904607772f12cb56597b4dd to your computer and use it in GitHub Desktop.
Save ocap-kirk/3c2ab2797904607772f12cb56597b4dd to your computer and use it in GitHub Desktop.
Okta SAML Toolkit Fix

Fix Okta SAML Toolkit issues

Errors from mvn package

Could not resolve dependencies for project com.okta:saml-toolkit:jar:2.0.5-fa68307: Could not find artifact jndi:jndi:jar:1.2.1 in central (https://repo.maven.apache.org/maven2)

Could not resolve dependencies for project com.okta:saml-toolkit:jar:2.0.5-fa68307: Failure to find jndi:jndi:jar:1.2.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

Fix

Extract and local-install jndi jar

cd Okta-SAMLToolkit/examples/webapp/target
cp webapp-2.0.5-fa68307.war webapp-2.0.5-fa68307.zip
unzip webapp-2.0.5-fa68307.zip
cd WEB-INF/lib/
mvn install:install-file -Dfile=jndi-1.2.1.jar -DgroupId=jndi -DartifactId=jndi -Dversion=1.2.1 -Dpackaging=jar

Update parent pom.xml

The problem is with the above jndi jar. There is no other need (as of current) for the Okta hosted repositories.

cd ../../../../../
vi pom.xml

Comment out or remove:

<!-- 
	<pluginRepositories>
	        <pluginRepository>
	            <id>central-okta</id>
	            <name>okta-master</name>
	            <url>https://artifacts.aue1d.saasure.com/artifactory/okta-master</url>
	            <snapshots>
	                <enabled>false</enabled>
	            </snapshots>
	        </pluginRepository>
	    </pluginRepositories>
	    
	    <repositories>
	        <repository>
	            <id>central-okta-topic</id>
	            <name>topic</name>
	            <url>https://artifacts.aue1d.saasure.com/artifactory/topic</url>
	            <snapshots>
	                <enabled>false</enabled>
	            </snapshots>
	        </repository>
	        <repository>
	            <id>central-okta-thirdparty</id>
	            <name>thirdparty</name>
	            <url>https://artifacts.aue1d.saasure.com/artifactory/thirdparty</url>
	            <snapshots>
	                <enabled>false</enabled>
	            </snapshots>
	        </repository>
	    </repositories> 
-->

Install all projects (skip tests)

mvn install -DskipTests	
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment