Problem with Google Web Toolkit Maven Plugin - gwt

I got an error following the PetClinic GWT application in less then 30 minutes Any idea?
SOLVED after delete the C:\Users\user.m2 directory
C:\Users\user\Desktop\petclinic>mvn -e gwt:run
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building petclinic
[INFO] task-segment: [gwt:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing gwt:run
[INFO] [aspectj:compile {execution: default}]
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
Downloading: http://repository.springsource.com/maven/bundles/release/org/codeha
us/plexus/plexus-components/1.1.6/plexus-components-1.1.6.pom
[INFO] Unable to find resource 'org.codehaus.plexus:plexus-components:pom:1.1.6'
in repository com.springsource.repository.bundles.release (http://repository.sp
ringsource.com/maven/bundles/release)
Downloading: http://repository.springsource.com/maven/bundles/external/org/codeh
aus/plexus/plexus-components/1.1.6/plexus-components-1.1.6.pom
[INFO] Unable to find resource 'org.codehaus.plexus:plexus-components:pom:1.1.6'
in repository com.springsource.repository.bundles.external (http://repository.s
pringsource.com/maven/bundles/external)
Downloading: http://repository.springsource.com/maven/bundles/milestone/org/code
haus/plexus/plexus-components/1.1.6/plexus-components-1.1.6.pom
[INFO] Unable to find resource 'org.codehaus.plexus:plexus-components:pom:1.1.6'
in repository com.springsource.repository.bundles.milestone (http://repository.
springsource.com/maven/bundles/milestone)
Downloading: http://maven.springframework.org/milestone/org/codehaus/plexus/plex
us-components/1.1.6/plexus-components-1.1.6.pom
[INFO] Unable to find resource 'org.codehaus.plexus:plexus-components:pom:1.1.6'
in repository spring-maven-milestone (http://maven.springframework.org/mileston
e)
Downloading: http://google-web-toolkit.googlecode.com/svn/2.1.0.M1/gwt/maven/org
/codehaus/plexus/plexus-components/1.1.6/plexus-components-1.1.6.pom
[INFO] Unable to find resource 'org.codehaus.plexus:plexus-components:pom:1.1.6'
in repository gwt-repo (http://google-web-toolkit.googlecode.com/svn/2.1.0.M1/g
wt/maven)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-components
/1.1.6/plexus-components-1.1.6.pom
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.codehaus.plexus:plexus-components:pom:1.1.6
Reason: Cannot find parent: org.codehaus.plexus:plexus for project: org.codehaus
.plexus:plexus-components:pom:1.1.6 for project org.codehaus.plexus:plexus-compo
nents:pom:1.1.6
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get dependency
information: Unable to read the metadata file for artifact 'org.codehaus.plexus
:plexus-compiler-api:jar': Cannot find parent: org.codehaus.plexus:plexus for pr
oject: org.codehaus.plexus:plexus-components:pom:1.1.6 for project org.codehaus.
plexus:plexus-components:pom:1.1.6
org.codehaus.plexus:plexus-compiler-api:jar:1.5.3
from the specified remote repositories:
com.springsource.repository.bundles.release (http://repository.springsource.co
m/maven/bundles/release),
com.springsource.repository.bundles.milestone (http://repository.springsource.
com/maven/bundles/milestone),
spring-maven-snapshot (http://maven.springframework.org/snapshot),
com.springsource.repository.bundles.external (http://repository.springsource.c
om/maven/bundles/external),
spring-maven-milestone (http://maven.springframework.org/milestone),
central (http://repo1.maven.org/maven2),
gwt-repo (http://google-web-toolkit.googlecode.com/svn/2.1.0.M1/gwt/maven),
codehaus.org (http://snapshots.repository.codehaus.org),
JBoss Repo (http://repository.jboss.com/maven2)
Path to dependency:
1) org.codehaus.mojo:gwt-maven-plugin:maven-plugin:1.3.1.google
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:711)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unabl
e to get dependency information: Unable to read the metadata file for artifact '
org.codehaus.plexus:plexus-compiler-api:jar': Cannot find parent: org.codehaus.p
lexus:plexus for project: org.codehaus.plexus:plexus-components:pom:1.1.6 for pr
oject org.codehaus.plexus:plexus-components:pom:1.1.6
org.codehaus.plexus:plexus-compiler-api:jar:1.5.3
from the specified remote repositories:
com.springsource.repository.bundles.release (http://repository.springsource.co
m/maven/bundles/release),
com.springsource.repository.bundles.milestone (http://repository.springsource.
com/maven/bundles/milestone),
spring-maven-snapshot (http://maven.springframework.org/snapshot),
com.springsource.repository.bundles.external (http://repository.springsource.c
om/maven/bundles/external),
spring-maven-milestone (http://maven.springframework.org/milestone),
central (http://repo1.maven.org/maven2),
gwt-repo (http://google-web-toolkit.googlecode.com/svn/2.1.0.M1/gwt/maven),
codehaus.org (http://snapshots.repository.codehaus.org),
JBoss Repo (http://repository.jboss.com/maven2)
Path to dependency:
1) org.codehaus.mojo:gwt-maven-plugin:maven-plugin:1.3.1.google
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:430)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(D
efaultArtifactCollector.java:74)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:316)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:304)
at org.apache.maven.plugin.DefaultPluginManager.ensurePluginContainerIsC
omplete(DefaultPluginManager.java:835)
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
tPluginManager.java:647)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:468)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
: Unable to read the metadata file for artifact 'org.codehaus.plexus:plexus-comp
iler-api:jar': Cannot find parent: org.codehaus.plexus:plexus for project: org.c
odehaus.plexus:plexus-components:pom:1.1.6 for project org.codehaus.plexus:plexu
s-components:pom:1.1.6
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocat
edProject(MavenMetadataSource.java:200)
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocat
edArtifact(MavenMetadataSource.java:94)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:387)
... 24 more
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent
: org.codehaus.plexus:plexus for project: org.codehaus.plexus:plexus-components:
pom:1.1.6 for project org.codehaus.plexus:plexus-components:pom:1.1.6
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1396)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1407)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1407)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
aultMavenProjectBuilder.java:823)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromReposito
ry(DefaultMavenProjectBuilder.java:255)
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocat
edProject(MavenMetadataSource.java:163)
... 26 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Parse error re
ading POM. Reason: expected START_TAG or END_TAG not TEXT (position: TEXT seen .
..<role>Developer</role>\n 6878/?\r</... #163:16) for project org.codehaus
.plexus:plexus at C:\Users\user\.m2\repository\org\codehaus\plexus\plexus\1.0.8\
plexus-1.0.8.pom
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1610)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1571)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:562)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1392)
... 31 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: expected ST
ART_TAG or END_TAG not TEXT (position: TEXT seen ...<role>Developer</role>\n
6878/?\r</... #163:16)
at hidden.org.codehaus.plexus.util.xml.pull.MXParser.nextTag(MXParser.ja
va:1095)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseDeveloper(MavenXp
p3Reader.java:1389)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Re
ader.java:1944)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.j
ava:3912)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1606)
... 34 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Fri May 21 20:28:23 BST 2010
[INFO] Final Memory: 45M/205M
[INFO] ------------------------------------------------------------------------

Maven can't find the plexus artifact in one of it's known repositories. Are there any repositories in the pom.xml? Have you set up your distribution correctly? Which repositories do you have in your settings.xml?
You might want to try and add maven central to your settings.xml (http://repo2.maven.org/maven2)

Related

Non parseable POM causing Maven build, installs to fail

I am unable to run Maven configuration using my Eclipse IDE hosted on my Mac. It keeps on failing with the message that it is unable to parse a maven enforcer plugin file (see message below). There has not been any change to my Eclipse environment, my Maven project, my Maven configuration or my POM file. This was working fine 3-4 months back. Yesterday I cleaned up my entire repository (under $home/.m2) folder along with files under it and after that I am getting this error. It appears the maven download process is encountering issue. My eclipse plugin (m2e) uses version 1.10. I know it is a maven related issue but any help will be greatly appreciated
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: fda-spl-fhir:fda-spl-fhir:war:3.8.0
[DEBUG] Tasks: [install]
[DEBUG] Style: Regular
[DEBUG] =======================================================================
[INFO]
[INFO] ---------------------< fda-spl-fhir:fda-spl-fhir >----------------------
[INFO] Building HAPI FHIR JPA Server - Starter Project 3.8.0
[INFO] --------------------------------[ war ]---------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[WARNING] The POM for org.apache.maven.plugins:maven-enforcer-plugin:jar:3.0.0-M2 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model
[FATAL] Non-parseable POM /Users/XXXXXX/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin/3.0.0-M2/maven-enforcer-plugin-3.0.0-M2.pom: entity reference name can not contain character =' (position: START_TAG seen ...com/main?ParticipantID=euekiz39ksg8nwp7iqj2fp5wzfwi5q76&FailedURI=... #1:270) # line 1, column 270
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.220 s
[INFO] Finished at: 2020-02-06T13:38:42-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-enforcer-plugin:jar:3.0.0-M2: 1 problem was encountered while building the effective model
[ERROR] [FATAL] Non-parseable POM /Users/XXXXXX/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin/3.0.0-M2/maven-enforcer-plugin-3.0.0-M2.pom: entity reference name can not contain character =' (position: START_TAG seen ...com/main?ParticipantID=euekiz39ksg8nwp7iqj2fp5wzfwi5q76&FailedURI=... #1:270) # line 1, column 270
[ERROR] -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-enforcer-plugin:jar:3.0.0-M2
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:117)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:181)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:286)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:244)
at org.apache.maven.lifecycle.internal.DefaultLifecycleMappingDelegate.calculateLifecycleMappings(DefaultLifecycleMappingDelegate.java:115)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateLifecycleMappings(DefaultLifecycleExecutionPlanCalculator.java:265)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:216)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:126)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:144)
at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan(BuilderCommon.java:96)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:110)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven.plugins:maven-enforcer-plugin:jar:3.0.0-M2
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:332)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:192)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:253)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:103)
... 27 more
Caused by: org.apache.maven.model.building.ModelBuildingException: 1 problem was encountered while building the effective model
[FATAL] Non-parseable POM /Users/XXXXXX/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin/3.0.0-M2/maven-enforcer-plugin-3.0.0-M2.pom: entity reference name can not contain character =' (position: START_TAG seen ...com/main?ParticipantID=euekiz39ksg8nwp7iqj2fp5wzfwi5q76&FailedURI=... #1:270) # line 1, column 270
at org.apache.maven.model.building.DefaultModelProblemCollector.newModelBuildingException(DefaultModelProblemCollector.java:197)
at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:582)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:276)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:314)
... 30 more
[ERROR]
[ERROR]
Thanks in advance for your help
As you probably know, Maven uses HTTP/HTTPS to fetch remote dependencies.
Sometimes the Maven repository that it uses is available only when you are connected to a VPN, or is otherwise sometimes unreachable. For example, your employer may have a private Maven repository that works when you're at work, but is unreachable at home.
Some Internet service providers (wrongly) do not return 404 error codes when you ask your browser to locate an unreachable URL. Instead, they return an HTML page with ads or other stuff on it that "help" you try to locate what you were looking for.
When you put all of these concepts together, if Maven uses HTTP to try to fetch a dependency from an unreachable Maven repository URL, it will fetch a page of HTML instead. In your case, you can see from your error message that there is something in that .pom file that looks like perhaps this is what happened.
The solution is to remove the containing directory from your local Maven cache (e.g. /Users/XXXXXX/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin/) and run Maven again when you know that you have a reliable network connection.

Eclipse Tycho complaining about Missing Constraint but showing bundle as RESOLVED at the same time

I want to use logback.slf4j in my Eclipse plugin, so I added it as a requirement to my MANIFEST.MF file:
Require-Bundle: org.eclipse.equinox.app,
org.eclipse.equinox.launcher,
...,
ch.qos.logback.slf4j;bundle-version="1.0.7"
Then I start the build with additional debug (mvn clean package -X) and in the output I can see that logback.slf4j is properly downloaded along with its dependencies:
[INFO] Fetching 201705151400&countryCode=us&timeZone=1&format=xml from http://www.eclipse.org/downloads/download.php?format=xml&file=/releases/neon/
[INFO] Fetching ch.qos.logback.classic_1.0.7.v20121108-1250.jar.pack.gz from http://download.eclipse.org/releases/neon/201705151400/plugins/ (79,74kB)
[INFO] Fetching ch.qos.logback.classic_1.0.7.v20121108-1250.jar.pack.gz from http://download.eclipse.org/releases/neon/201705151400/plugins/ (79,74kB)
[INFO] Fetching ch.qos.logback.core_1.0.7.v20121108-1250.jar.pack.gz from http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/releases/neon/201705151400/plugins/ (112,71kB)
[INFO] Fetching ch.qos.logback.core_1.0.7.v20121108-1250.jar.pack.gz from http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/releases/neon/201705151400/plugins/ (112,71kB)
[INFO] Fetching org.slf4j.api_1.7.2.v20121108-1250.jar.pack.gz from http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/releases/neon/201705151400/plugins/ (16,96kB)
[INFO] Fetching org.slf4j.api_1.7.2.v20121108-1250.jar.pack.gz from http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/releases/neon/201705151400/plugins/ (16,96kB)
[INFO] Fetching ch.qos.logback.slf4j_1.0.7.v201505121915.jar.pack.gz from http://mirror.tspu.ru/eclipse/releases/neon/201705151400/plugins/ (7,59kB)
[INFO] Fetching ch.qos.logback.slf4j_1.0.7.v201505121915.jar.pack.gz from http://mirror.tspu.ru/eclipse/releases/neon/201705151400/plugins/ (7,59kB)
[INFO] Resolving class path of MavenProject: com.example.myplugin:com.example.myplugin:0.0.1 # ~\Desktop\tycho_example\bundles\com.example.myplugin\.polyglot.build.properties
Then Tycho prints the list of resolved bundles, which also confirms that the newly downloaded plugins are properly resolved:
[DEBUG] Equinox resolver state:
Resolved OSGi state
RESOLVED org.eclipse.osgi_3.11.3.v20170209-1843 : ~\.m2\repository\p2\osgi\bundle\org.eclipse.osgi\3.11.3.v20170209-1843\org.eclipse.osgi-3.11.3.v20170209-1843.jar
RESOLVED ch.qos.logback.classic_1.0.7.v20121108-1250 : ~\.m2\repository\p2\osgi\bundle\ch.qos.logback.classic\1.0.7.v20121108-1250\ch.qos.logback.classic-1.0.7.v20121108-1250.jar
RESOLVED ch.qos.logback.core_1.0.7.v20121108-1250 : ~\.m2\repository\p2\osgi\bundle\ch.qos.logback.core\1.0.7.v20121108-1250\ch.qos.logback.core-1.0.7.v20121108-1250.jar
RESOLVED org.slf4j.api_1.7.2.v20121108-1250 : ~\.m2\repository\p2\osgi\bundle\org.slf4j.api\1.7.2.v20121108-1250\org.slf4j.api-1.7.2.v20121108-1250.jar
RESOLVED ch.qos.logback.slf4j_1.0.7.v201505121915 : ~\.m2\repository\p2\osgi\bundle\ch.qos.logback.slf4j\1.0.7.v201505121915\ch.qos.logback.slf4j-1.0.7.v201505121915.jar
RESOLVED org.eclipse.equinox.app_1.3.400.v20150715-1528 : ~\.m2\repository\p2\osgi\bundle\org.eclipse.equinox.app\1.3.400.v20150715-1528\org.eclipse.equinox.app-1.3.400.v20150715-1528.jar
...
However, in the end I get the following:
NOT RESOLVED com.example.myplugin_0.0.1 : ~\Desktop\tycho_example\bundles\com.example.myplugin
Missing Constraint: Require-Bundle: ch.qos.logback.slf4j; bundle-version="1.0.7"
[ERROR] Internal error: java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle com.example.myplugin cannot be resolved
[ERROR] Resolution errors:
[ERROR] Bundle com.example.myplugin - Missing Constraint: Require-Bundle: ch.qos.logback.slf4j; bundle-version="1.0.7"
[ERROR] -> [Help 1]
Has anyone seen similar issue?
As described in https://stackoverflow.com/a/45190630/301049
I managed to add a dependency on a fragment for a test plugin explicitly in pom.xml with the following target-platform-configuration plugin configuration:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-plugin</type>
<id>org.acme.module.fragment</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>

Numenta - htm.java-examples - Ubuntu - Eclipse - NetworkAPIDemo - NoClassDefFoundError: no/uib/cipr/matrix/sparse/FlexCompRowMatrix

I am facing problems, while trying to run the NetworkAPIDemo example with reference to the htm.java-examples
If I try to run the code, I get the error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/sparse/FlexCompRowMatrix
at org.numenta.nupic.algorithms.SDRClassifier.<init>(SDRClassifier.java:180)
at org.numenta.nupic.algorithms.SDRClassifier.<init>(SDRClassifier.java:159)
at org.numenta.nupic.network.Layer.makeClassifiers(Layer.java:1947)
at org.numenta.nupic.network.Layer.close(Layer.java:504)
at org.numenta.nupic.network.Region.close(Region.java:199)
at org.numenta.nupic.network.Region.observe(Region.java:315)
at org.numenta.nupic.network.Network.observe(Network.java:535)
at Intro2.NetworkAPIDemo.<init>(NetworkAPIDemo.java:66)
at Intro2.NetworkAPIDemo.main(NetworkAPIDemo.java:242)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.sparse.FlexCompRowMatrix
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
If I add the dependency to the POM file:
com.googlecode.matrix-toolkits-java.mtj.1.0.2
I get the error:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "Sensor Layer [Region 1:Layer 5] Thread" java.lang.NoSuchMethodError: no.uib.cipr.matrix.sparse.FlexCompRowMatrix.addCol([D)V
at org.numenta.nupic.algorithms.SDRClassifier.compute(SDRClassifier.java:280)
at org.numenta.nupic.network.Layer$FunctionFactory$3.call(Layer.java:2372)
at org.numenta.nupic.network.Layer$FunctionFactory$3.call(Layer.java:2345)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorCast$1.onNext(OperatorCast.java:50)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.subjects.SubjectSubscriptionManager$SubjectObserver.onNext(SubjectSubscriptionManager.java:224)
at rx.subjects.PublishSubject.onNext(PublishSubject.java:114)
at org.numenta.nupic.network.Layer.compute(Layer.java:956)
at org.numenta.nupic.network.Region$2.onNext(Region.java:653)
at org.numenta.nupic.network.Region$2.onNext(Region.java:646)
at org.numenta.nupic.network.Layer$3.onNext(Layer.java:1863)
at org.numenta.nupic.network.Layer$3.onNext(Layer.java:1843)
at rx.Observable$33.onNext(Observable.java:7480)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:130)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorCast$1.onNext(OperatorCast.java:50)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.subjects.SubjectSubscriptionManager$SubjectObserver.onNext(SubjectSubscriptionManager.java:224)
at rx.subjects.PublishSubject.onNext(PublishSubject.java:114)
at org.numenta.nupic.network.Layer.compute(Layer.java:956)
at org.numenta.nupic.network.Region$2.onNext(Region.java:653)
at org.numenta.nupic.network.Region$2.onNext(Region.java:646)
at org.numenta.nupic.network.Layer$3.onNext(Layer.java:1863)
at org.numenta.nupic.network.Layer$3.onNext(Layer.java:1843)
at rx.Observable$33.onNext(Observable.java:7480)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:130)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
at rx.internal.operators.OperatorCast$1.onNext(OperatorCast.java:50)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:54)
at rx.subjects.SubjectSubscriptionManager$SubjectObserver.onNext(SubjectSubscriptionManager.java:224)
at rx.subjects.PublishSubject.onNext(PublishSubject.java:114)
at org.numenta.nupic.network.Layer.compute(Layer.java:956)
at org.numenta.nupic.network.Layer$5.lambda$run$1(Layer.java:2039)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.numenta.nupic.network.Layer$5.run(Layer.java:2036)
Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: org.numenta.nupic.network.ManualInput.class
at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:101)
at rx.internal.operators.OperatorFilter$1.onNext(OperatorFilter.java:60)
... 46 more
Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: [I.class
at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:101)
at rx.internal.operators.OperatorCast$1.onNext(OperatorCast.java:52)
... 16 more
I encountered the problem with both openjdk1.8 and oracle_jdk1.8 as well.
com.googlecode.matrix-toolkits-java.mtj.1.0.2 can be found in the .m2 folder (I'm using Maven with Eclipse).
I tried running it on two computers, it worked with one of the computers, but the same code did not work with another computer. I did not bother with the Cortico examples, so external libraries should not cause any problem. In the POM file, I specify only the dependency
org.numenta.htm.java.0.6.13
If I add the external libraries (which can be found in the libs folder), I get the error:
Exception in thread "main" java.lang.NoSuchMethodError: org.numenta.nupic.Parameters.set(Lorg/numenta/nupic/Parameters$KEY;Ljava/lang/Object;)V
at Intro2.NetworkDemoHarness.getParameters(NetworkDemoHarness.java:211)
at Intro2.NetworkAPIDemo.createMultiLayerNetwork(NetworkAPIDemo.java:105)
at Intro2.NetworkAPIDemo.<init>(NetworkAPIDemo.java:62)
at Intro2.NetworkAPIDemo.main(NetworkAPIDemo.java:242)
I did not build the project from source, I only specified the dependencies in the POM.xml File. org.numenta.htm.java.0.6.12 can be found in the .m2 folder. I tried using 0.6.13 version of htm.java, but encountered the same problem.
POM.xml includes:
Specifying maven compiler to java 1.8
Specifying htm.java dependency
I am using Ubuntu 16.04 with Java:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Running:
mvn clean install
is successful with two warnings and 1 error:
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[ERROR] error reading /home/szi/.m2/repository/algorithmfoundry/algorithmfoundry-shade-culled/1.3/algorithmfoundry-shade-culled-1.3.jar; invalid LOC header (bad signature)
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
Running:
mvn -e exec:java -Dexec.mainClass="/home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java"
Gives the error:
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HTM.Intro 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) # HTM.Intro ---
[WARNING]
java.lang.ClassNotFoundException: /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:270)
at java.lang.Thread.run(Thread.java:748)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.990 s
[INFO] Finished at: 2017-05-23T12:03:37+02:00
[INFO] Final Memory: 12M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project HTM.Intro: An exception occured while executing the Java class. /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project HTM.Intro: An exception occured while executing the Java class. /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:339)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.ClassNotFoundException: /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:270)
at java.lang.Thread.run(Thread.java:748)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Can someone please give me an advice on what can be wrong? I copy-pasted the code from the github repository without modification.
Thank you for any help!
Problem solved!
If anyone encountered the same problem, you should add the library algorithmfoundry-shade-culled-1.3.jar to your project .

Installing Tycho via Maven with offline flag

I want to run Tycho in an offline environment. Therefore, I mirrored a demo repository on GitHub and executed the command mvn clean install on a computer with internet access. The build succeeded, however when I try to run mvn -o install to install all dependencies in offline mode, I recieve the following exception:
C:\Users\user\Documents\MVN_Test\itp01>mvn clean -e -o install
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[INFO] Computing target platform for MavenProject: tycho.demo.itp01:tycho.demo.itp01:1.0.0-SNAPSHOT # C:\Users\user\Documents\MVN_Test\itp01\tycho.demo.itp01\pom.xml
[INFO] Adding repository http://download.eclipse.org/releases/helios
[ERROR] Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'helios' from location http://download.eclipse.org/releases/helios: Repository system is offline and no local cache available for http://download.eclipse.org/releases/helios -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'helios' from location http://download.eclipse.org/releases/helios
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.RuntimeException: Failed to load p2 repository with ID 'helios' from location http://download.eclipse.org/releases/helios
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.loadMetadataRepository(TargetPlatformFactoryImpl.java:302)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.gatherExternalInstallableUnits(TargetPlatformFactoryImpl.java:270)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:176)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:128)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:1)
at org.eclipse.tycho.p2.manager.ReactorRepositoryManagerImpl.computePreliminaryTargetPlatform(ReactorRepositoryManagerImpl.java:84)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.computePreliminaryTargetPlatform(P2DependencyResolver.java:223)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:109)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:95)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
... 11 more
Caused by: org.eclipse.equinox.p2.core.ProvisionException: Repository system is offline and no local cache available for http://download.eclipse.org/releases/helios
at org.eclipse.tycho.p2.remote.RemoteRepositoryCacheManager.createCache(RemoteRepositoryCacheManager.java:57)
at org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory.getLocalFile(SimpleMetadataRepositoryFactory.java:66)
at org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory.load(SimpleMetadataRepositoryFactory.java:88)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:768)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:668)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:61)
at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:53)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.loadMetadataRepository(TargetPlatformFactoryImpl.java:298)
... 22 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException
I have found the following information, these may be a bug:
Demo project which demonstrates offline build failure
The problem is reproducible always with the following steps:
rm -rf ~/.m2/repository
unzip demo-project.zip
cd mvn-demo-parent/releng
mvn clean install
Build succeeds
mvn clean -o clean install
Build fails because "Repository system is offline and no local cache available for http:// download.eclipse.org/releases/mars"
From Bug 474885 - Build with -o flag fails with "Failed to resolve target definition" message:
This was a bug in tycho 0.24.0 and fixed in Tycho 0.25.0.
To use tycho 0.25.0 From Tycho/Release Notes/0.25
Tycho 0.25.0 is currently in development. To try out the most recent snapshot build of 0.25.0, simply add the following snippet to your (parent) pom.xml or settings.xml, and set the property for the Tycho version (e.g. tycho-version) to 0.25.0-SNAPSHOT.
<pluginRepositories>
<pluginRepository>
<id>tycho-snapshots</id>
<url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url>
</pluginRepository>
</pluginRepositories>

NPE when building OSGi bundles with Maven Tycho

I have several OSGi-bundles that I want to build using Maven Tycho. While the dependencies of the first 4 bundles can be resolved without problem, Tycho quits with the following cryptic exception at the 5th:
[INFO] Resolving dependencies of MavenProject: my.parent:my.module:0.0.1-SNAPSHOT # D:\Path\To\Project\pom.xml
[WARNING] The following locally built units have been used to resolve project dependencies:
[WARNING] my-other-module/0.0.1.201407011334
[INFO] Resolving class path of MavenProject: my.parent:my.module:0.0.1-SNAPSHOT # D:\Path\To\Project\pom.xml
[ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.NullPointerException
at org.eclipse.tycho.core.osgitools.OsgiBundleProject.resolveClassPath(OsgiBundleProject.java:187)
at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:122)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:75)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
... 11 more
Following is the MANIFEST.MF of that bundle (Import-Package section):
Import-Package: my.other.module.package;version="[0.0,1)",
org.apache.commons.lang3.builder;version="[3.3,4)",
org.dozer;version="[5.5,6)",
org.osgi.service.blueprint;version="[1.0.0,2.0.0)"
Resolving the dependencies from the repository shouldn't be a problem, as launching the bundles from within eclipse works fine.
Interesting aspect: I'm working on Windows 7x64. On my coworker's pc with Linux it runs fine.
I'm not really sure where to start finding the error - the exception doesn't really give a hint, so I'd appreciate every tip. If you need further information, I'd be happy to clarify.