Error when submitting a sitemap through Google Webmaster Tools - sitemap

I keep getting an "Unsupported File Format" error when I submit a sitemap to Google Webmaster Tools. I always use hwww.xml-sitemaps.com to create my sitemaps and I've never had an issue before, so I have no idea how to fix this. Your advice is appreciated!
Here's the specific error I'm getting from Webmaster Tools :
XML Parsing Error: junk after document element
Location: http://www.joshgoodman.com/sitemap.xml
Line Number 3, Column 1:http://www.joshgoodman.com/main.phpweekly0.85
Here is the beginning and end code of my sitemap:
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>http://www.joshgoodman.com/</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/main.php</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/blog/</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/faqs.html</loc>
<lastmod>2014-05-20T01:13:17+00:00</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/il-cielo-wedding.html</loc>
<lastmod>2014-05-20T01:13:19+00:00</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/inland-empire-wedding-photographer.html</loc>
<lastmod>2014-05-20T01:13:19+00:00</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/palm-springs-wedding-photographer.html</loc>
<lastmod>2014-05-20T01:13:28+00:00</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/blog/niko-and-joshuas-sls-hotel-wedding/</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/blog/ashley-and-walters-four-seasons-il-cielo-wedding/</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/blog/four-seasons-beverly-hills-wedding-emilia-and-anthony/</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/oviatt-penthouse-wedding.html</loc>
<lastmod>2014-05-20T01:13:28+00:00</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/blog/get-out-and-vote/</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.joshgoodman.com/blog/?s=powershot&searchsubmit=Search</loc>
<changefreq>weekly</changefreq>
</url>
</urlset>

You've missed a beginning <urlset> tag. And the sitemap.xml on your website differs from the XML sitemap you've specified in your question.

Related

Add Github Package to maven

A few days ago I created a Github Package for a java library.
Now I wanted to add the dependency from Github Packages to another Maven Project, but I get the following error:
Could not transfer artifact io.geilehner:storyblok-java-sdk:pom:1.0.1 from/to github (https://maven.pkg.github.com/geilix10/): Transfer failed for https://maven.pkg.github.com/geilix10/io/geilehner/storyblok-java-sdk/1.0.1/storyblok-java-sdk-1.0.1.pom 400 Bad Request
My ~/.m2/settings.xml
<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
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>github</id>
<username>geilix10</username>
<password>ghp__ PERSONAL_ACCESS_TOKEN....</password>
</server>
</servers>
</settings>
My pom.xml from the project where I want to add my package.
<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/geilix10/</url>
</repository>
</repositories>
and the dependency itself:
<dependency>
<groupId>io.geilehner</groupId>
<artifactId>storyblok-java-sdk</artifactId>
<version>1.0.1</version>
</dependency>
I need the repository tag in the pom.xml because later on GitHub Actions should build this project and otherwise it would not find the package.
Link to the package: https://github.com/geilix10/storyblok-java-sdk/packages/716104?version=1.0.1
#Edit
After adjusting my settings.xml to (as suggested):
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<activeProfiles>
<activeProfile>default</activeProfile>
</activeProfiles>
<servers>
<server>
<id>github</id>
<username>geilix10</username>
<password>TOKEN</password>
</server>
</servers>
<profiles>
<profile>
<id>default</id>
<repositories>
<repository>
<id>github</id>
<name>GitHub Apache Maven Packages</name>
<url>https://maven.pkg.github.com/geilix10/*</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>
And my pom.xml :
<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/geilix10/storyblok-java-sdk/</url>
</repository>
</repositories>
<dependency>
<groupId>io.geilehner</groupId>
<artifactId>storyblok-java-sdk</artifactId>
<version>1.0.1</version>
</dependency>
And using the command to retrieve the package suggested by Allen D. I receive the following error message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:get (default-cli) on project regiolix: Couldn't download artifact: org.eclipse.aether.resolution.DependencyResolutionException: Failed to read artifact descriptor for io.geilehner:storyblok-java-sdk:jar:1.0.1: Could not transfer artifact io.geilehner:storyblok-java-sdk:pom:1.0.1 from/to github (https://maven.pkg.github.com/geilix10/): Failed to transfer file https://maven.pkg.github.com/geilix10/io/geilehner/storyblok-java-sdk/1.0.1/storyblok-java-sdk-1.0.1.pom with status code 400 -> [Help 1]
Explicitly add your repository to the URLs.
In your settings.xml:
<repositories>
...
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/geilix10/*</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
...
(Snapshots setting as you need...)
In you POM:
<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/geilix10/storyblok-java-sdk/</url>
</repository>
</repositories>
Refer to https://github.com/allen-ball/ganymede for reference.
I was able to download your artifact with:
mvn dependency:get -DremoteRepositories=https://maven.pkg.github.com/geilix10/storyblok-java-sdk -Dartifact=io.geilehner:storyblok-java-sdk:1.0.1
after updating my settings.xml with:
<?xml version="1.0" encoding="UTF-8"?>
<settings ...>
<activeProfiles>
<activeProfile>default</activeProfile>
</activeProfiles>
<servers>
<server>
<id>github</id>
<username>allen-ball</username>
<password>REDACTED</password>
</server>
...
</servers>
<profiles>
<profile>
<id>default</id>
...
<repositories>
...
<repository>
<id>github</id>
<name>GitHub Apache Maven Packages</name>
<url>https://maven.pkg.github.com/geilix10/*</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
...
</repositories>
...
</profile>
</profiles>
</settings>

401 Unauthorized when running mvn compile

I'm running mvn compile -e -X in a JMeter project directory from cmd prompt and I'm getting a 401 unauthorized:
What I'd imagine the HTTP request to be, works fine in Powershell and gives me a 200 response.
So the token I'm using does work.
$MyPat = 'passwordHere'
$B64Pat = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$MyPat"))
$result = Invoke-WebRequest -UseBasicParsing -Uri 'https://mycompanyproject.pkgs.visualstudio.com/_packaging/maven/maven/v1/microsoft/aspnet/signalr/signalr-client-sdk/1.0/signalr-client-sdk-1.0.pom' -Headers #{"Authorization"="Basic $B64Pat"}
I tried running Wireshark to view the HTTP request but nothing comes up for some reason.
Here is the settings.xml:
<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">
<servers>
<server>
<id>maven#Release</id>
<username>mycompanyproject</username>
<password>passwordHere</password>
</server>
<server>
<id>mycompany</id>
<username>mycompanyproject</username>
<password>passwordHere</password>
</server>
</servers>
</settings>
Here's is the pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>au.com.mycompany</groupId>
<artifactId>mycompany-jmeter-plugins</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>mycompany</id>
<url>https://mycompanyproject.pkgs.visualstudio.com/_packaging/mycompany/maven/v1</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>mycompanyproject-visualstudio-com-mycompanyproject-maven</id>
<url>https://mycompanyproject.pkgs.visualstudio.com/_packaging/maven/maven/v1</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>mycompany</id>
<url>https://mycompanyproject.pkgs.visualstudio.com/_packaging/mycompany/maven/v1</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<snapshotRepository>
<id>mycompanyproject-visualstudio-com-mycompanyproject-maven</id>
<url>https://mycompanyproject.pkgs.visualstudio.com/_packaging/maven/maven/v1</url>
</snapshotRepository>
</distributionManagement>
<modules>
<module>signalr</module>
<module>hoconreader</module>
<module>propertyfilereader</module>
<module>jsonbackendlistener</module>
<module>samplerjavaexample</module>
<module>tokengenerator</module>
<module>data-tenantdownload</module>
<module>data-invoicegenius</module>
<module>data-unittests</module>
<module>common</module>
<module>ratio-data-generator</module>
<module>timinglistener</module>
</modules>
</project>
I should have paid closer attention to the suggestions at:
https://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
It was because the for my in settings.xml didn't match what I had in pom.xml.
Making them the same fixed my issue.

Maven - external repositories issue

If I hardcode repository id/url values directly inside pom.xml as shown below, it's working perfectly fine. I am getting dependencies.
<project ......>
.......
<repositories>
<repository>
<id>myownservice</id>
<url>https://dev.externalrepo.com/account/devenvironment/_packaging/myownservice/maven/v1</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
But if i pass the values from command, I am struggling to pull the dependencies from external repositories (Azure Artifacts).
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.weather</groupId>
<artifactId>weather-myproject</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>com.company.weather.service</groupId>
<artifactId>weather-service</artifactId>
<version>1.1.9</version>
</parent>
<properties>
<service.destinationID>${service.destinationID}</service.destinationID>
<service.destinationURL>${service.destinationURL}</service.destinationURL>
</properties>
<repositories>
<repository>
<id>${service.destinationID}</id>
<url>${service.destinationURL}</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
Below command used to pass parameters:
mvn package -Dservice.destinationID=myownservice -Dservice.destinationURL=https://dev.externalrepo.com/account/devenvironment/_packaging/myownservice/maven/v1
Below error, look like it's not able to replace parameters dynamically:
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.company.weather:weather-service:1.0-SNAPSHOT: Could not transfer artifact com.company.weather.service:weather-service:pom:1.1.9 from/to ${service.distFeed
Id} (${service.destinationURL}): Cannot access ${service.destinationURL} with type default using the available connector factories: BasicRepositoryConnectorFactory and 'parent.relativePath' points at wrong lo
cal POM # line 11, column 13
How can i make it generalize, that's is, Developers should use it with out any change to their project, DevOps should use mvn package command without change to the command.
Please suggest.
Edited:
added settings.xml, using same file to deploy artifacts to external repository:
<?xml version="1.0" encoding="UTF-8"?>
<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">
<localRepository>C:\Users\myusername\.m2\repository</localRepository>
<interactiveMode />
<usePluginRegistry />
<offline />
<pluginGroups />
<servers>
<server>
<id>myownservice</id>
<username>myownserviceusername</username>
<password>dsdsqpyx6cpi3dkb5667andiud3oigi3sdcdkhjv2sgkssdswzfds6azs2aaa</password>
</server>
</servers>
<profiles>
<profile>
<id>distributionManagement</id>
<properties>
<destinationID>myownservice</destinationID>
<destinationURL>https://dev.externalrepo.com/account/devenvironment/_packaging/myownservice/maven/v1</destinationURL>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>distributionManagement</activeProfile>
</activeProfiles>
<mirrors />
<proxies />
</settings>

Can't import any downloaded maven dependency, if IntelliJ IDEA behind proxy

I was configure my settings.xml for corp proxy server like this
<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 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles>
<activeProfile>securecentral</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>securecentral</id>
<repositories>
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>***.***.***.***</host>
<port>****</port>
<username>******</username>
<password>******</password>
<nonProxyHosts>www.google.com|*.example.com</nonProxyHosts>
</proxy>
</proxies>
</settings>
and got the possibility of downloading dependencies. But if with downloading its ok, when i try to import something to class, idea cant find any downloaded dependency and mark as red all after top domain level. Can to see only base libraries (which was included by default) when i put the dot after org. for example.
In .m2 folder all necessary libraries is downloaded
In settings -> build tools -> maven all as default
Any new dependencies downloads successfully
pom.xml without any errors
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>groupId1</groupId>
<artifactId>untitled</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
</dependencies>
</project>
Somebody have any idea about that?
Any advise will be helpful!
Thanks a lot guys!

Missing artifacts from maven .m2 repository

I'm trying to add dependencies to my project through pom file. But while building workspace it's showing error as missing more than 400 artifacts. Seems like maven is not downloading related jars to my .m2 folder.
I tried cleaning and updating projects several times but errors are still there.
Any help would be appreciated.
check your connection to repository configured in pom or settings.xml..as below
...
<repositories>
<repository>
<id>my-repo1</id>
<name>your custom repo</name>
<url>http://jarsm2.dyndns.dk</url>
</repository>
<repository>
<id>my-repo2</id>
<name>your custom repo</name>
<url>http://jarsm2.dyndns.dk</url>
</repository>
</repositories>
...
</project>
Use this link
If your are using in restricted network, please check your private organization maven repository and also check authentication to the server proxy as given on the below link and snippet
Proxies
<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
http://maven.apache.org/xsd/settings-1.0.0.xsd">
...
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.somewhere.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>*.google.com|ibiblio.org</nonProxyHosts>
</proxy>
</proxies>
...
</settings>
link to set proxy in settings.xml

Resources