i want to build the developing environment of sakai oae on windows 7,but i don't know how to do it? - sakai

my OS is windows7.in the cmd, i run:
cd sakai3/3akai-ux
mvn clean install
i got:
[INFO] BUILD SUCCESS
then i run:
cd sakai3/nakamura
set MAVEN_OPTS="-Xmx256m -XX:PermSize=256m"
mvn clean install
i got this error:
[ERROR] Failed to execute goal org.apache.sling:maven-launchpad-plugin:2.1.0:pre
pare-package (prepare-package-jar) on project org.sakaiproject.nakamura.app: Una
ble to find artifact. Failure to find org.sakaiproject.nakamura:org.sakaiproject
.nakamura.ojdbc:jar:CURRENT-VERSION in http://repo1.maven.org/maven2/ was cached
in the local repository, resolution will not be reattempted until the update in
terval of maven repo has elapsed or updates are forced
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.sakaiproject.nakamura -DartifactI
d=org.sakaiproject.nakamura.ojdbc -Dversion=CURRENT-VERSION -Dpackaging=jar -Dfi
le=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file t
here:
[ERROR] mvn deploy:deploy-file -DgroupId=org.sakaiproject.nakamura -DartifactId=
org.sakaiproject.nakamura.ojdbc -Dversion=CURRENT-VERSION -Dpackaging=jar -Dfile
=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] org.sakaiproject.nakamura:org.sakaiproject.nakamura.ojdbc:jar:CURRENT-VE
RSION
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] maven repo (http://repo1.maven.org/maven2/, releases=true, snapshots=fal
se),
[ERROR] apache-snapshots (http://repository.apache.org/snapshots/, releases=fals
e, snapshots=true),
[ERROR] sakai-releases (http://source.sakaiproject.org/maven2/, releases=true, s
napshots=false),
[ERROR] sakai-snapshots (http://source.sakaiproject.org/maven2-snapshots, releas
es=false, snapshots=true),
[ERROR] java.net (http://download.java.net/maven/2, releases=true, snapshots=fal
se),
[ERROR] modularity-releases (http://m2.modularity.net.au/releases, releases=true
, snapshots=false),
[ERROR] modularity-snapshots (http://m2.modularity.net.au/snapshots, releases=fa
lse, snapshots=true),
[ERROR] OPS4J (http://repository.ops4j.org/maven2, releases=true, snapshots=fals
e),
[ERROR] sonatype (https://oss.sonatype.org/content/repositories/releases/, relea
ses=true, snapshots=false),
[ERROR] sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/
snapshots, releases=false, snapshots=true),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=f
alse)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.sakaiproject.nakamura.app
then i install the org.sakaiproject.nakamura.ojdbc.jar use this command under the folder D:\sakai3\nakamura\contrib\oracle-jdbc:
mvn deploy:deploy-file -DgroupId=org.sakaiproject.nakamura -DartifactId=org.sakaiproject.nakamura.ojdbc -Dversion=1.4.2 -Dpackaging=jar -Dfile=ojdbc6.jar -Durl=url -DrepositoryId=repositoryId
mvn install:install-file -DgroupId=org.sakaiproject.nakamura -DartifactI
d=com.oracle-jdbc -Dversion=1.4.2 -Dpackaging=jar -Dfi
le=ojdbc6.jar
then i got a new error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy-file (default-cli) on project org.sakaiproject.nakamura.ojdbc: No transfe
r protocol found. -> [Help 1]
what should i do next???i have searched many website,but i haven't got a good idea.i don't know where i wrong or what i missing?
I an a chinese.please forgive my broken English.Thank you!

Your best bet is to ask on the Sakai OAE developers list.
But I believe the problem is the same as what I answered here.

Related

Maven dependency: import cannot be resolved but is present in local repository (Eclipse Oomph Unzip Setup Task)

I have problems using Maven.
A Maven mvn clean package of the submodule "task-unzip" from the Eclipse Oomph's Unzip Setup Task repository (https://github.com/maybeec/oomph-task-unzip) fails with the following error on several machines/setups:
[INFO] --- tycho-compiler-plugin:0.22.0:compile (default-compile) # com.github.maybeec.oomph.task.unzip ---
[INFO] Compiling 13 source files to C:\FOLDER\repositories\oomph-task-unzip\task-unzip\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.983 s
[INFO] Finished at: 2020-10-28T18:35:49+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.22.0:compile (default-compile) on project com.github.maybeec.oomph.task.unzip: Compilation failure: Compilation failure:
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[7]
[ERROR] import org.apache.commons.compress.archivers.ArchiveEntry;
[ERROR] ^^^^^^^^^^^^^^^^^^
[ERROR] The import org.apache.commons cannot be resolved
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[8]
[ERROR] import org.apache.commons.compress.archivers.ArchiveInputStream;
[ERROR] ^^^^^^^^^^^^^^^^^^
[ERROR] The import org.apache.commons cannot be resolved
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[9]
[ERROR] import org.apache.commons.compress.archivers.ArchiveStreamFactory;
[ERROR] ^^^^^^^^^^^^^^^^^^
[ERROR] The import org.apache.commons cannot be resolved
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[10]
[ERROR] import org.apache.commons.compress.compressors.CompressorInputStream;
[ERROR] ^^^^^^^^^^^^^^^^^^
[ERROR] The import org.apache.commons cannot be resolved
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[11]
[ERROR] import org.apache.commons.compress.compressors.CompressorStreamFactory;
[ERROR] ^^^^^^^^^^^^^^^^^^
[ERROR] The import org.apache.commons cannot be resolved
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[12]
[ERROR] import org.apache.commons.compress.utils.IOUtils;
[ERROR] ^^^^^^^^^^^^^^^^^^
[ERROR] The import org.apache.commons cannot be resolved
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[47]
[ERROR] CompressorInputStream cIS = new CompressorStreamFactory().createCompressorInputStream(in);
[ERROR] ^^^^^^^^^^^^^^^^^^^^^
[ERROR] CompressorInputStream cannot be resolved to a type
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[47]
[ERROR] CompressorInputStream cIS = new CompressorStreamFactory().createCompressorInputStream(in);
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] CompressorStreamFactory cannot be resolved to a type
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[64]
[ERROR] ArchiveInputStream archiveIS = new ArchiveStreamFactory().createArchiveInputStream(fileIS);
[ERROR] ^^^^^^^^^^^^^^^^^^
[ERROR] ArchiveInputStream cannot be resolved to a type
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[64]
[ERROR] ArchiveInputStream archiveIS = new ArchiveStreamFactory().createArchiveInputStream(fileIS);
[ERROR] ^^^^^^^^^^^^^^^^^^^^
[ERROR] ArchiveStreamFactory cannot be resolved to a type
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[65]
[ERROR] ArchiveEntry entry;
[ERROR] ^^^^^^^^^^^^
[ERROR] ArchiveEntry cannot be resolved to a type
[ERROR] C:\FOLDER\repositories\oomph-task-unzip\task-unzip\src\com\github\maybeec\oomph\task\unzip\core\impl\UnzipUtilImpl.java:[77]
[ERROR] IOUtils.copy(archiveIS, out);
[ERROR] ^^^^^^^
[ERROR] IOUtils cannot be resolved
[ERROR] 12 problems (12 errors)
[ERROR] -> [Help 1]
Maven is actually downloading the Apache commons-compress-1.19.jar to the local Maven repository and it is also being copied to the project's lib folder. So that is working and the dependency is actually present on the filesystem.
However, Maven can not find this dependency. Adding it manually to the project, the resolve failure can be solved, but that is not a solution to the problem it's not working with Maven.
Importing the submodule in Eclipse shows the same. Eclipse isn't able to auto-complete an "import" statement to "org.apache.commons.*":
The Properties > Build path of that submodule doesn't show any Maven dependencies (actually the "Maven Dependencies" list wasn't even there! I had to follow https://stackoverflow.com/a/27337064/5446400 and edit the .classpath file for that). However it's still empty:
Searching and working for hours on that problem I couldn't come up with an explanation why Maven behaves the way it does.
Thank you for any support!
Maven dependencies shouldn't need to be added to the build path of Eclipse plugins. The plugin dependencies are enough and in this case commons-compress-1.19.jar will be loaded as a library from within the plugin's lib directory (this is defined in the build.properties file), not directly as a Maven dependency.
I'm not sure if downloading a Maven dependency and using it in the same build will work this way. If it gets copied to the correct location, you might just need to refresh the workspace, otherwise the jar could get ignored in the Eclipse build.
For debugging the issue I would probably download the artifact and place the jar in the lib directory manually once and ditch the automated process. Then at least you see if this unusual handling of Maven dependencies is the issue or something else.

Dependency Resolution Is Failing The Build Process on Circle CI : androidx.annotation

My Circle CI build is failing because of this error:
[error] sbt.librarymanagement.ResolveException: Error downloading androidx.annotation:annotation:1.1.0
[error] Not found
[error] Not found
[error] not found: /home/circleci/.ivy2/local/androidx.annotation/annotation/1.1.0/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/androidx/annotation/annotation/1.1.0/annotation-1.1.0.pom
[error] at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:246)
[error] at lmcoursier.CoursierDependencyResolution.$anonfun$update$34(CoursierDependencyResolution.scala:215)
Locally my project builds w/o an issue so not sure why the Circle CI build doesn't work. Any ideas how to fix this?
According to https://mvnrepository.com/artifact/androidx.annotation/annotation/1.1.0, this artifact is only available from the Google repository.
You probably have this added as a resolver on your local machine?
resolvers += "google" at "https://maven.google.com/"

Build Failure for JDT Core with Maven

I'm trying to build the JDT Core library with maven. I downloaded the git repository and in that folder I issued: mvn -P build-individual-bundles package
I get the error below after a few minutes. Any ideas? TIA!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5:04.943s
[INFO] Finished at: Wed Sep 24 08:36:51 PDT 2014
[INFO] Final Memory: 82M/455M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.21.0:compile (default-compile) on project org.eclipse.jdt.annotation: Compilation failure: Compilation failure:
[ERROR] F:\Workspace\git\eclipse-jdt-core\org.eclipse.jdt.annotation\src\org\eclipse\jdt\annotation\NonNull.java:[14]
[ERROR] import static java.lang.annotation.ElementType.TYPE_USE;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import java.lang.annotation.ElementType.TYPE_USE cannot be resolved
[ERROR] F:\Workspace\git\eclipse-jdt-core\org.eclipse.jdt.annotation\src\org\eclipse\jdt\annotation\NonNull.java:[52]
[ERROR] #Target({ TYPE_USE })
[ERROR] ^^^^^^^^
[ERROR] TYPE_USE cannot be resolved to a variable
[ERROR] F:\Workspace\git\eclipse-jdt-core\org.eclipse.jdt.annotation\src\org\eclipse\jdt\annotation\Nullable.java:[14]
[ERROR] import static java.lang.annotation.ElementType.TYPE_USE;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import java.lang.annotation.ElementType.TYPE_USE cannot be resolved
[ERROR] F:\Workspace\git\eclipse-jdt-core\org.eclipse.jdt.annotation\src\org\eclipse\jdt\annotation\Nullable.java:[43]
[ERROR] #Target({ TYPE_USE })
[ERROR] ^^^^^^^^
[ERROR] TYPE_USE cannot be resolved to a variable
[ERROR] 4 problems (4 errors)
[ERROR] -> [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]
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :org.eclipse.jdt.annotation
Version information:
F:\Workspace\git\eclipse-jdt-core>mvn -version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 08:22:22-0700)
Maven home: C:\Apps\Java\apache-maven-3.1.1\bin\..
Java version: 1.7.0_67, vendor: Oracle Corporation
Java home: C:\Apps\Java\jdk1.7.0_67\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Looks like it needs to be compiled with Java 8.
java.lang.annotation.ElementType.TYPE_USE is new in Java 8.

I'm getting the following when trying to compile the Program

I am getting a mojofailure exception error.
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project maven-war-plugin: Compilation failure: Compilation failure:
[ERROR] \Users\admin\Desktop\Virtual_class\src\main\java\com\iws\controller\LoginController.java:[42,25] error: package javax.servlet.http does not exist
[ERROR] \Users\admin\Desktop\Virtual_class\src\main\java\com\iws\controller\LoginController.java:[43,25] error: package javax.servlet.http does not exist
[ERROR] \Users\admin\Desktop\Virtual_class\src\main\java\com\iws\controller\LoginController.java:[92,3] error: cannot find symbol
[ERROR] \Users\admin\Desktop\Virtual_class\src\main\java\com\iws\controller\LoginController.java:[93,3] error: cannot find symbol
[ERROR] \Users\admin\Desktop\Virtual_class\src\main\java\com\iws\controller\LoginController.java:[117,3] error: cannot find symbol
[ERROR] \Users\admin\Desktop\Virtual_class\src\main\java\com\iws\controller\LoginController.java:[117,31] error: cannot find symbol
[ERROR] -> [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]
[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/MojoFailureException
I have seen this happen when you do not include the servlet-api.jar on your classpath. The servlet-api.jar is found in your container or application server.
For example, if you are running your application on Tomcat, be sure that tomcat is included on your classpath.

pom.xml error in eclipse(indigo) when creating jboss-as-helloworld project

I have a problem when i create jboss-as-helloworld project and it first gives quick fix dialog box.
project build error non-resolvable import POM: failure to transfer org.jboss.spec:jboss-javaee-6.0:pom:3.0.0.beta1 from http:\\repo1.maven2 was cashed in the local repository,resolution will not be reattempted until the update interval of central
Project build error:'dependencies.dependency.version'for javax.enterprise:cdi-api:jar is missing.
Project build error:'dependencies.dependency.version'for org.jboss.spec.javax.annotation:jboss-annotation-api_1.1_spec:jar is missing.
Project build error:'dependencies.dependency.version'for org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar is missing.
It gives this errors when it start to run..
[INFO] Scanning for projects...
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.
Downloading: http:\\repo1.maven.org/maven2/org/jboss/spec/jboss-javaee-6.0/3.0.0.Beta1/jboss-javaee-6.0-3.0.0.Beta1.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.jboss.as.quickstarts:jboss-as-helloworld:7.1.1-SNAPSHOT (C:\Users\Heshan\workspace\helloworld\jboss-as-helloworld\pom.xml) has 4 errors
[ERROR] Non-resolvable import POM: Could not transfer artifact org.jboss.spec:jboss-javaee-6.0:pom:3.0.0.Beta1 from/to central (http://repo1.maven.org/maven2): Connect times out # line 39, column 22 -> [Help 2]
[ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. # line 53, column 19
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar is missing. # line 61, column 19
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar is missing. # line 69, column 19
[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]
[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/ProjectBuildingException
[ERROR] [Help 2] http:\\cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
[INFO] Scanning for projects...
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.
Downloading: http:\\repo1.maven.org/maven2/org/jboss/spec/jboss-javaee-6.0/3.0.0.Beta1/jboss-javaee-6.0-3.0.0.Beta1.pom.
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.jboss.as.quickstarts:jboss-as-helloworld:7.1.1-SNAPSHOT (C:\Users\Heshan\workspace\helloworld\jboss-as-helloworld\pom.xml) has 4 errors
[ERROR] Non-resolvable import POM: Could not transfer artifact org.jboss.spec:jboss-javaee-6.0:pom:3.0.0.Beta1 from/to central (http://repo1.maven.org/maven2): Connect times out # line 39, column 22 -> [Help 2]
[ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. # line 53, column 19
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar is missing. # line 61, column 19
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar is missing. # line 69, column 19
[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]
[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/ProjectBuildingException
[ERROR] [Help 2] http:\\cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Non-resolvable import POM: Could not transfer artifact
org.jboss.spec:jboss-javaee-6.0:pom:3.0.0.Beta1 from/to central
(http://repo1.maven.org/maven2): Connect times out # line 39, column
22 -> [Help 2
Your connection to maven central repo times out. You have a network connectivity issue. Maybe you don't have network connection, or maybe you need to configure a proxy if you do.
By using this link you can see the file actually is in there, so you should be able to download it.