使用maven时,如果pom.xml不在项目目录下,在src下怎么办,在哪里配置pom.xml的位置

使用maven时,如果pom.xml不在项目目录下,在src下怎么办,在哪里配置pom.xml的位置

14个回答

首先,一个标准的 maven项目是必须拥有 pom.xml文件的,因为就是靠这个文件来管理所有的jar包的 至于你说的 这个文件所在位置的不同 这个还真没有遇到过 但是个人感觉问题不大 你看看是否能够正常运行项目 能正常引用就行

先建立maven项目,然后改一下pom中的配置,将war或者jar改为pom,删除其他的配置,

显然 ,你这个工程结构不是标准备的maven工程,要么将pom.xml移到根目录(另一种做法如楼上所说,新建标准maven工程,将代码移到新工程中)
方式二,不移,在用maven编译时,mvn -p参数来指定项目pom.xml文件的路径

POM怎么在src下面??

yy251066394
yy251066394 这个项目里面有多个项目。pom.xml放到src下了
大约 2 年之前 回复

显然你的maven项目建的有问题

这个项目是在eclipse从git上获取的

你的maven项目新建的时候,应该有问题,不然pom文件不应该出现在那个位置,百度一下新建maven项目的流程,新建maven项目,然后把代
码移动过去。

项目有问题把,不过你可以先试试能不能构建,如果能构建的话,就没问题.

你跑项目,有没有问题?,

新建的maven项目有问题

共14条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
新建maven工程,只有一个简单的src目录,和一个pom.xml文件其他的都没有怎么办?
maven是下载了eclipse javaEE版本的时候就自带的了, 开的是java视图, 图片说明](https://img-ask.csdn.net/upload/201701/25/1485326718_168171.png) 图片说明](https://img-ask.csdn.net/upload/201701/25/1485326707_708665.png)
SSM项目pom.xml引用jar包爆红 kaptcha.wso2 就是他
<?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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>orchard</groupId> <artifactId>system</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>system Maven Webapp</name> <url>http://www.example.com</url> <properties> <junit.version>4.12</junit.version> <spring.version>4.2.6.RELEASE</spring.version> <mybatis.version>3.2.8</mybatis.version> <mybatis.spring.version>1.2.2</mybatis.spring.version> <mybatis.paginator.version>1.2.15</mybatis.paginator.version> <mysql.version>5.1.32</mysql.version> <slf4j.version>1.7.7</slf4j.version> <logback.version>1.1.7</logback.version> <jackson.version>2.4.2</jackson.version> <druid.version>1.0.9</druid.version> <jstl.version>1.2</jstl.version> <servlet-api.version>2.5</servlet-api.version> <jsp-api.version>2.0</jsp-api.version> <commons-lang3.version>3.3.2</commons-lang3.version> <commons-io.version>1.3.2</commons-io.version> <commons-net.version>3.3</commons-net.version> <commons-logging.version>1.2</commons-logging.version> <pagehelper.version>3.4.2</pagehelper.version> <jsqlparser.version>0.9.1</jsqlparser.version> <commons-fileupload.version>1.3.1</commons-fileupload.version> </properties> <dependencies> <!-- Apache工具组件 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${commons-lang3.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-io</artifactId> <version>${commons-io.version}</version> </dependency> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>${commons-net.version}</version> </dependency> <!-- Jackson Json处理工具包 --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>${jackson.version}</version> </dependency> <!-- 单元测试 --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> <!-- 日志 --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>${logback.version}</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>${logback.version}</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>${commons-logging.version}</version> </dependency> <!-- Mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${mybatis.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>${mybatis.spring.version}</version> </dependency> <dependency> <groupId>com.github.miemiedev</groupId> <artifactId>mybatis-paginator</artifactId> <version>${mybatis.paginator.version}</version> </dependency> <!-- 分页 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>${pagehelper.version}</version> </dependency> <!-- MySql --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.version}</version> </dependency> <!-- 连接池 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>${druid.version}</version> </dependency> <!-- Spring --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <!-- 解密的jar包 --> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.6</version> </dependency> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15</artifactId> <version>1.46</version> </dependency> <!-- JSONObject --> <dependency> <groupId>top.jfunc.common</groupId> <artifactId>converter</artifactId> <version>1.8.0</version> </dependency> <!-- 微信小程序 --> <dependency> <groupId>kaptcha.wso2</groupId> <artifactId>kaptcha</artifactId> <version>2.3.0.wso2v1</version> </dependency> <!-- JSP相关 --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>${jstl.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>${servlet-api.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>${jsp-api.version}</version> <scope>provided</scope> </dependency> <!-- 文件上传组件 --> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>${commons-fileupload.version}</version> </dependency> </dependencies> <build> <finalName>${project.artifactId}</finalName> <defaultGoal>compile</defaultGoal> <plugins> <!-- 资源文件拷贝插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.7</version> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> <!-- java编译插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </plugin> <!-- 配置Tomcat插件 --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <port>8080</port> <path>/</path> </configuration> </plugin> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <!--配置文件的位置--> <configurationFile>src/main/resources/generatorConfig.xml</configurationFile> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> <executions> <execution> <id>Generate MyBatis Artifacts</id> <goals> <goal>generate</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> <version>1.3.2</version> </dependency> </dependencies> </plugin> </plugins> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> <include>**/*.ini</include> </includes> <filtering>false</filtering> </resource> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> </build> </project>
maven问题,编译错误,谁帮忙看下谢了
D:\code\maven01\src\main\java\com\imooc\maven01\model 里面有java文件如下 package com.imooc.maven01.model; public class HelloWorld{ public String sayHello(){ return "Hello World"; } } D:\code\maven01\src\test\java\com\imooc\maven01\model import org.junit.*; import org.junit.Assert.*; public class HelloWorldTest{ @Test public void testHello(){ Assert.assertEquals("Hello World!",new HelloWorld().sayHello()); } } 有导入junit包了 D:\code\maven01>mvn compile [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-parseable POM D:\code\maven01\pom.xml: expected = after attribute na me (position: START_DOCUMENT seen ....0.0" xmlns:xsi="http://www.w3.org/2001/XML Schema-instance" xsi:\ns... @4:2) @ line 4, column 2 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project (D:\code\maven01\pom.xml) has 1 error [ERROR] Non-parseable POM D:\code\maven01\pom.xml: expected = after attribut e name (position: START_DOCUMENT seen ....0.0" xmlns:xsi="http://www.w3.org/2001 /XMLSchema-instance" xsi:\ns... @4:2) @ line 4, column 2 -> [Help 2] [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/ProjectBuildin gException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseExce ption 编译错误
在idea中新建Maven web项目
![图片说明](https://img-ask.csdn.net/upload/201903/22/1553220336_407872.png) 在idea中新建Maven web项目时没有src目录和webapp目录只有.idea和pom.xml![图片说明](https://img-ask.csdn.net/upload/201903/21/1553138970_474699.png)
maven,自己的 程序包不存在?
文件结构如下 src src--package1 src--package2 src--package1--java文件 src--package2--java文件 src--package2--pom.xml pom.xml 根目录的pom.xml如下 ``` <groupId>com.company</groupId> <artifactId>parent</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>\src\package2</module> </modules> <name>helloworld</name> <dependencies> <dependency> </dependency> </dependencies> <build> <sourceDirectory>src</sourceDirectory><!--这里没起作用,因为src下没有什么东西--> </build> ``` 根目录下有两个package package2里的pom.xml如下 ``` <parent> <relativePath>..\..\</relativePath> <artifactId>parent</artifactId> <groupId>com.company</groupId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>package2</artifactId> <packaging>jar</packaging> <version>0.0.1-SNAPSHOT</version> <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> jar-with-dependencies </descriptorRefs> </configuration> </plugin> </plugins> <sourceDirectory>.</sourceDirectory> </build> ``` 因为package2依赖package1里的java,这时报找不到package1 简单说就是怎么打包能 把package2依赖的java都打进来
用maven package打包项目时,一直卡在 Reading assembly descriptor 无响应
# 一丶问题描述 使用的是自定义打包**maven-assembly-plugin** 以下为组件的pom.xml ``` <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>3.1.0</version> <configuration> <finalName>${project.artifactId}</finalName> <recompressZippedFiles>false</recompressZippedFiles> <appendAssemblyId>true</appendAssemblyId> <descriptors> <descriptor>package.xml</descriptor> </descriptors> <!-- 打包结果输出的基础目录 --> <outputDirectory>${project.build.directory}/</outputDirectory> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> ``` 以下为maven-assembly-plugin调用的 **package.xml** ``` <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd"> <id>release</id> <!-- 设置打包格式,可同时设置多种格式,常用格式有:dir、zip、tar、tar.gz dir 格式便于在本地测试打包结果 zip 格式便于 windows 系统下解压运行 tar、tar.gz 格式便于 linux 系统下解压运行 --> <formats> <format>dir</format> <!-- <format>zip</format>--> <format>tar.gz</format> </formats> <!-- 打 zip 设置为 true 会在包在存在总目录,打 dir 时设置为 false 少层目录 --> <includeBaseDirectory>true</includeBaseDirectory> <fileSets> <!-- src/main/resources 全部 copy 到 config 目录下 --> <fileSet> <directory>${basedir}/src/main/resources</directory> <outputDirectory>config</outputDirectory> </fileSet> <!-- src/main/webapp 全部 copy 到 webapp 目录下 --> <fileSet> <directory>${basedir}/src/main/webapp</directory> <outputDirectory>webapp</outputDirectory> </fileSet> <!-- 项目根下面的脚本文件 copy 到根目录下 --> <fileSet> <directory>${basedir}</directory> <outputDirectory>./</outputDirectory> <!-- 脚本文件在 linux 下的权限设为 755,无需 chmod 可直接运行 --> <fileMode>755</fileMode> <includes> <include>*.sh</include> <include>*.bat</include> </includes> </fileSet> </fileSets> <!-- 依赖的 jar 包 copy 到 lib 目录下 --> <dependencySets> <dependencySet> <outputDirectory>lib</outputDirectory> </dependencySet> </dependencySets> </assembly> ``` ## 结果: ![图片说明](https://img-ask.csdn.net/upload/201909/09/1567959005_109252.png) 一直卡在这个reading不动 项目文件大小: ![图片说明](https://img-ask.csdn.net/upload/201909/09/1567959066_267312.png) # 二丶个人的猜测 尝试package.xml顶部的网址浏览器打不开,而且 代码是标红的,可是问题在于别的示范xml的顶部网页也都是打不开的 ![图片说明](https://img-ask.csdn.net/upload/201909/09/1567959152_638069.png) 请大佬求助!!!
用maven进行install的时候报错Error injecting: org.apache.maven.plugin.install.InstallMojo
[code="java"] ------------------------------------------------------- T E S T S ------------------------------------------------------- There are no tests to run. Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ llemaicai --- [INFO] Packaging webapp [INFO] Assembling webapp [llemaicai] in [E:\dev\maicai\pro\llemaicai\target\llemaicai] [INFO] Processing war project [INFO] Copying webapp resources [E:\dev\maicai\pro\llemaicai\src\main\webapp] [INFO] Webapp assembled in [35 msecs] [INFO] Building war: E:\dev\maicai\pro\llemaicai\target\llemaicai.war [WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored (webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true') [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ llemaicai --- [WARNING] The POM for org.codehaus.plexus:plexus-digest:jar:1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details 2013-2-20 14:41:14 org.sonatype.guice.bean.reflect.LoadedClass 警告: Error injecting: org.apache.maven.plugin.install.InstallMojo java.lang.NoClassDefFoundError: org/codehaus/plexus/digest/DigesterException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getDeclaredConstructors(Class.java:1836) at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243) at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96) at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628) at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835) at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769) at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254) at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205) at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843) at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003) at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014) at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964) at com.google.inject.Scopes$1$1.get(Scopes.java:59) at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79) at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:235) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 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:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.digest.DigesterException at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) ... 47 more [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.669s [INFO] Finished at: Wed Feb 20 14:41:14 CST 2013 [INFO] Final Memory: 4M/15M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-install) on project llemaicai: Execution default-install of goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install failed: Unable to load the mojo 'install' in the plugin 'org.apache.maven.plugins:maven-install-plugin:2.3.1'. A required class is missing: org/codehaus/plexus/digest/DigesterException [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.apache.maven.plugins:maven-install-plugin:2.3.1 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/D:/javalib/repository/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.jar [ERROR] urls[1] = file:/D:/javalib/repository/junit/junit/3.8.1/junit-3.8.1.jar [ERROR] urls[2] = file:/D:/javalib/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar [ERROR] urls[3] = file:/D:/javalib/repository/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [ERROR] [ERROR] -----------------------------------------------------: org.codehaus.plexus.digest.DigesterException [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/PluginContainerException [/code]
maven 依赖 用 tomcat7-maven插件 run运行时报错 求解决
tomcat7 用maven依赖插件 运行报错 //项目框架 spring+springmvc ![图片说明](https://img-ask.csdn.net/upload/201908/08/1565260003_595830.png) //目录结构 ![图片说明](https://img-ask.csdn.net/upload/201908/08/1565260208_492937.png) //web.xml ``` <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <display-name>ss1</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <!-- SpringSecurity过滤器链 名字一定要叫做springSecurityFilterChain 是她内置的 --> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <!--/*代表拦截所有资源--> <url-pattern>/*</url-pattern> </filter-mapping> <!-- 启动Spring --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:applicationContext.xml classpath:spring-security.xml </param-value> </context-param> <!--启动SpringMVC--> <servlet> <servlet-name>ss1</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:springmvc.xml</param-value> </init-param> <!-- 服务器启动加载Servlet 默认第一次访问启动--> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>ss1</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> </web-app> ``` //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>cn.ruanlam</groupId> <artifactId>02.spring-security</artifactId> <version>1.0-SNAPSHOT</version> <modules> <module>../02.springsecurity</module> </modules> <packaging>pom</packaging> <url>http://www.example.com</url> <properties> <jdk.version>1.8</jdk.version> <spring.version>4.3.10.RELEASE</spring.version> <spring.security.version>4.2.3.RELEASE</spring.security.version> <jstl.version>1.2</jstl.version> <servlet.version>2.5</servlet.version> </properties> <dependencies> <!-- Spring dependencies --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <!-- Spring Security --> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>${spring.security.version}</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>${spring.security.version}</version> </dependency> <!-- jstl for jsp page --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>${jstl.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>${servlet.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.5</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.6</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> <!-- jdk版本插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> <showWarnings>true</showWarnings> </configuration> </plugin> <!-- tomcat7插件 --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <port>8080</port> <path>/ss1</path> <server>tomcat7</server> <uriEncoding>UTF-8</uriEncoding> </configuration> </plugin> </plugins> </build> </project> ``` //报错内容 ``` D:\career\Java\jdk1.8.0_152\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\career\workspaceTest\02.springsecurity -Dmaven.home=D:\career\Java\apache-maven-3.6.0 -Dclassworlds.conf=D:\career\Java\apache-maven-3.6.0\bin\m2.conf "-javaagent:D:\career\JetBrains\IntelliJ IDEA 2018.2.1\lib\idea_rt.jar=65491:D:\career\JetBrains\IntelliJ IDEA 2018.2.1\bin" -Dfile.encoding=UTF-8 -classpath D:\career\Java\apache-maven-3.6.0\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2018.2.1 -s D:\career\Java\apache-maven-3.6.0\conf\settings.xml org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Child module D:\career\workspaceTest\02.springsecurity\pom.xml of D:\career\workspaceTest\02.springsecurity\pom.xml forms aggregation cycle D:\career\workspaceTest\02.springsecurity\pom.xml -> D:\career\workspaceTest\02.springsecurity\pom.xml @ @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project cn.ruanlam:02.spring-security:1.0-SNAPSHOT (D:\career\workspaceTest\02.springsecurity\pom.xml) has 1 error [ERROR] Child module D:\career\workspaceTest\02.springsecurity\pom.xml of D:\career\workspaceTest\02.springsecurity\pom.xml forms aggregation cycle D:\career\workspaceTest\02.springsecurity\pom.xml -> D:\career\workspaceTest\02.springsecurity\pom.xml [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 Process finished with exit code 1 ``` //最终已解决 pom.xml 标签packaging里面改成war ``` <?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>cn.ruanlam</groupId> <artifactId>02.spring-security</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <name>rVideos</name> <url>http://maven.apache.org</url> <properties> <jdk.version>1.8</jdk.version> <spring.version>4.3.10.RELEASE</spring.version> <spring.security.version>4.2.3.RELEASE</spring.security.version> <jstl.version>1.2</jstl.version> <servlet.version>2.5</servlet.version> </properties> <dependencies> <!-- Spring dependencies --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <!-- Spring Security --> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>${spring.security.version}</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>${spring.security.version}</version> </dependency> <!-- jstl for jsp page --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>${jstl.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>${servlet.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.5</version> </dependency> <!-- JSON lib 开发包 以及它的依赖包 --> <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</artifactId> <classifier>jdk15</classifier> <version>2.4</version> </dependency> <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> <version>1.8.3</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>net.sf.ezmorph</groupId> <artifactId>ezmorph</artifactId> <version>1.0.5</version> </dependency> <!--mybaits相关依赖--> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.4</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.0</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.1.7</version> </dependency> <!--mysql的驱动--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.41</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <!--jdbc依赖--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.5</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>RELEASE</version> <scope>compile</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.6</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> <!-- jdk版本插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> <showWarnings>true</showWarnings> </configuration> </plugin> <!-- tomcat7插件 --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <port>8080</port> <path>/ss2</path> <server>tomcat7</server> <uriEncoding>UTF-8</uriEncoding> </configuration> </plugin> </plugins> <!-- idea不会自动把xml配置文件加载到target里面--> <resources> <resource> <directory>${basedir}/src/main/resource</directory> <includes> <!--<include>**/*.xml</include>--> <include>**/*.*</include> </includes> </resource> </resources> <!-- <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.*</include> </includes> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources>--> </build> </project> ```
Maven引入的jar包无法被找到?
使用IDEA IDE构建Maven项目,其他的依赖可以正常导入、使用,今天尝试集成阿里的P3C-PMD进行静态代码检查,遇到了如下问题: ![图片说明](https://img-ask.csdn.net/upload/201907/26/1564121475_719124.jpg) 提示找不到对应的类,但是在IDE中已经可以看到Maven成功下载了该jar包,![图片说明](https://img-ask.csdn.net/upload/201907/26/1564121534_318248.jpg) 与该依赖相关的POM.xml如下: ``` <dependency> <groupId>com.alibaba.p3c</groupId> <artifactId>p3c-pmd</artifactId> <version>2.0.0</version> </dependency> ``` ``` <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <configuration> <rulesets> <ruleset>/src/main/resources/rulesets/ali-comment.xml</ruleset> <ruleset>/src/main/resources/rulesets/ali-concurrent.xml</ruleset> <ruleset>/src/main/resources/rulesets/ali-constant.xml</ruleset> <ruleset>/src/main/resources/rulesets/ali-exception.xml</ruleset> <ruleset>/src/main/resources/rulesets/ali-flowcontrol.xml</ruleset> <ruleset>/src/main/resources/rulesets/ali-naming.xml</ruleset> <ruleset>/src/main/resources/rulesets/ali-oop.xml</ruleset> <ruleset>/src/main/resources/rulesets/ali-orm.xml</ruleset> <ruleset>/src/main/resources/rulesets/ali-other.xml</ruleset> <ruleset>/src/main/resources/rulesets/ali-set.xml</ruleset> </rulesets> <printFailingErrors>true</printFailingErrors> </configuration> <version>3.8</version> </plugin> ```
maven项目构建报错 难受
18-10-31 上午09时30分50秒: Generating sources /HDTW1/pom.xml 18-10-31 上午09时30分50秒: Build error for /HDTW1/pom.xml; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources (default-resources) on project HDTW1: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources failed: Unable to load the mojo 'resources' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-resources-plugin:3.0.2' 18-10-31 上午09时30分50秒: Adding source folder /HDTW1/src/main/java 18-10-31 上午09时30分50秒: Adding source folder /HDTW1/src/test/java 18-10-31 上午09时30分50秒: Update completed: 0 sec 18-10-31 上午09时30分50秒: Maven Builder: AUTO_BUILD 这是什么情况啊? 这个JAR包 存在的啊 我都能找到 有没大神告诉我一下咋个处理
maven的war包每次重启项目都需要重打吗?
在idea的tomcat里面,配deployment的时候选了项目的war包。由于项目搭建的时候出现了找不到mapper.xml的问题,因此在pom.xml总添加了以下代码: ``` <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> ``` 看网上的介绍说,它的作用是打包的时候强制将java下面的xml文件也进行打包。这样的话需要每次修改后都输入mvn package,打war包才能启动项目吗?
SpringBoot打包后无法读取到resources下的资源
项目调试运行没有什么问题,在maven package后就无法读取到resources下的资源了 项目中有两个外部jar包,放在resources的lib下,在pom中引用如下 ```java <dependency> <groupId>com.tossft</groupId> <artifactId>sssk</artifactId> <version>0.0.1-SNAPSHOT</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/lib/sssk.jar</systemPath> </dependency> ``` ```java <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webResources> <resource> <!-- 原路径 --> <directory>src/main/resources/lib</directory> <targetPath>WEB-INF/lib/</targetPath> <includes> <include>**/*.jar</include> </includes> </resource> </webResources> </configuration> </plugin> ``` 这个jar需要读取resources下config文件夹下的xxx.xml配置文件, 在IDE中调试运行是没有问题的,maven package再运行就报错,找不到这个xml了
idea配置mybits generate时报错,请问是哪配错了吗?
报错说找不到driver-class-name核对了很多次都没问题啊 报错: ``` D:\jdk1.8.0_121\bin\java.exe -Dmaven.multiModuleProjectDirectory=D:\mycode\demo_mybits\demo "-Dmaven.home=D:\software\idea\IntelliJ IDEA 2018.2.6\plugins\maven\lib\maven3" "-Dclassworlds.conf=D:\software\idea\IntelliJ IDEA 2018.2.6\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:D:\software\idea\IntelliJ IDEA 2018.2.6\lib\idea_rt.jar=7115:D:\software\idea\IntelliJ IDEA 2018.2.6\bin" -Dfile.encoding=UTF-8 -classpath "D:\software\idea\IntelliJ IDEA 2018.2.6\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.2.6 mybatis-generator:generate -e [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building demo 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ demo --- [INFO] Connecting to the Database [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.637 s [INFO] Finished at: 2019-11-11T09:52:35+08:00 [INFO] Final Memory: 14M/245M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project demo: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Exception getting JDBC Driver: {spring.datasource.driver-class-name} -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project demo: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Exception getting JDBC Driver 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) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Exception getting JDBC Driver at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 21 more Caused by: java.lang.RuntimeException: Exception getting JDBC Driver at org.mybatis.generator.internal.db.ConnectionFactory.getDriver(ConnectionFactory.java:85) at org.mybatis.generator.internal.db.ConnectionFactory.getConnection(ConnectionFactory.java:54) at org.mybatis.generator.config.Context.getConnection(Context.java:526) at org.mybatis.generator.config.Context.introspectTables(Context.java:436) at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:222) at org.mybatis.generator.maven.MyBatisGeneratorMojo.execute(MyBatisGeneratorMojo.java:203) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) ... 22 more Caused by: java.lang.ClassNotFoundException: {spring.datasource.driver-class-name} at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.mybatis.generator.internal.ObjectFactory.internalClassForName(ObjectFactory.java:150) at org.mybatis.generator.internal.ObjectFactory.externalClassForName(ObjectFactory.java:121) at org.mybatis.generator.internal.db.ConnectionFactory.getDriver(ConnectionFactory.java:82) ... 28 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/PluginExecutionException Process finished with exit code 1 ``` application.properties ``` ## 服务器端口,如果不配置默认是8080端口 server.port=9090 ## 数据库设置 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/boot_demo?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8 spring.datasource.username=root spring.datasource.password=x5 ## mybatis配置 # 参数类型的包别名设置 mybatis.typeAliasesPackage=com.example.demo.model # 指向映射xml文件目录 mybatis.mapperLocations=classpath:mapper/*.xml pagehelper.helperDialect=mysql pagehelper.reasonable=true pagehelper.supportMethodsArguments=true pagehelper.params=count=countSql ``` 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.0.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>demo</artifactId> <version>0.0.1-SNAPSHOT</version> <name>demo</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.10</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.7</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.18</version> <scope>runtime</scope> </dependency> </dependencies> </plugin> </plugins> </build> </project> ``` generatorConfig.xml ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"> <generatorConfiguration> <!--导入配置文件--> <properties resource="application.properties"></properties> <!-- 一个数据库一个context --> <context id="default"> <!-- 注释生成设置 --> <commentGenerator> <!-- 是否生成注释代时间戳--> <property name="suppressDate" value="true" /> <!-- 是否取消注释 --> <property name="suppressAllComments" value="true" /> </commentGenerator> <!--jdbc的数据库连接--> <jdbcConnection driverClass="{spring.datasource.driver-class-name}" connectionURL="{spring.datasource.url}" userId="{spring.datasource.username}" password="{spring.datasource.password}"> <property name="nullCatalogMeansCurrent" value="true" /> </jdbcConnection> <!-- 类型转换 --> <javaTypeResolver> <!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) --> <property name="forceBigDecimals" value="false" /> </javaTypeResolver> <!-- targetPackage:生成的实体类所在的包 --> <!-- targetProject:生成的实体类所在的硬盘位置 --> <javaModelGenerator targetPackage="com.example.demo.model" targetProject="src/main/java"> <!-- 是否允许子包 --> <property name="enableSubPackages" value="false" /> <!-- 是否对modal添加构造函数 --> <property name="constructorBased" value="true" /> <!-- 是否清理从数据库中查询出的字符串左右两边的空白字符 --> <property name="trimStrings" value="true" /> <!-- 建立modal对象是否不可改变 即生成的modal对象不会有setter方法,只有构造方法 --> <property name="immutable" value="false" /> </javaModelGenerator> <!-- targetPackage 和 targetProject:生成的 mapper xml 文件的包和位置 --> <sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources"> <!-- 是否在当前路径下新加一层schema,ex:false路径com.qikegu.demo.model, com.qikegu.demo.model.[schemaName] --> <property name="enableSubPackages" value="false" /> <!-- 是否针对string类型的字段在set的时候进行trim调用 --> <property name="trimStrings" value="true"/> </sqlMapGenerator> <!-- targetPackage 和 targetProject:生成的 java interface 文件的包和位置 --> <javaClientGenerator type="XMLMAPPER" targetPackage="com.example.demo.repository" targetProject="src/main/java"> <!-- 是否在当前路径下新加一层schema,ex:false路径com.qikegu.demo.model, com.qikegu.demo.model.[schemaName] --> <property name="enableSubPackages" value="false" /> </javaClientGenerator> <!-- 配置表信息 --> <!-- schema即为数据库名 tableName为对应的数据库表 domainObjectName是要生成的实体类 enable*ByExample, 是否生成 example类 --> <!-- 不同的表,修改tableName和domainObjectName就可以 --> <table tableName="user" domainObjectName="User" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"> </table> </context> </generatorConfiguration> ```
idea 中 maven项目不能打包子module中的资源文件
将eclipse中的项目移植到idea中,运行后提示 ``` org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.boca.modules.sys.dao.UserDao.getByLoginName ``` 原因是maven没有将子项目中mybatis的mapper.xml文件发布到classes文件中。 在主工程pom.xml文件中加入resource标签如下 ``` <resources> <resource> <directory>${basedir}/src/main/resources</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> </resources> ``` clean之后运行依然没有 不知是何原因
jpress mvn package失败,求大神指导
报错代码如下: [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:codegen:jar:1.0 [WARNING] 'version' contains an expression but should be a constant. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 10, column 14 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-commons:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-core:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:jpress-core:[unknown-version], D:\Program Files\jpress\jpress-core\pom.xml, line 55, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-web:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-service-api:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-service-provider:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-model:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-template:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article-model:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article-web:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article-service-api:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article-service-provider:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article:pom:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page-model:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page-web:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page-service-api:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page-service-provider:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page:pom:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:starter:jar:1.0 [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-remote-resources-plugin @ io.jpress:starter:[unknown-version], D:\Program Files\jpress\starter\pom.xml, line 203, column 21 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:starter:[unknown-version], D:\Program Files\jpress\starter\pom.xml, line 142, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:starter-tomcat:war:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:starter-tomcat:[unknown-version], D:\Program Files\jpress\starter-tomcat\pom.xml, line 164, column 21 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ io.jpress:starter-tomcat:[unknown-version], D:\Program Files\jpress\starter-tomcat\pom.xml, line 221, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:parent:pom:1.0 [WARNING] 'version' contains an expression but should be a constant. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 10, column 14 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] parent [pom] [INFO] codegen [jar] [INFO] jpress-commons [jar] [INFO] jpress-model [jar] [INFO] jpress-service-api [jar] [INFO] jpress-core [jar] [INFO] jpress-web [jar] [INFO] jpress-service-provider [jar] [INFO] jpress-template [jar] [INFO] module-article [pom] [INFO] module-article-model [jar] [INFO] module-article-service-api [jar] [INFO] module-article-service-provider [jar] [INFO] module-article-web [jar] [INFO] module-page [pom] [INFO] module-page-model [jar] [INFO] module-page-service-api [jar] [INFO] module-page-service-provider [jar] [INFO] module-page-web [jar] [INFO] starter [jar] [INFO] starter-tomcat [war] [INFO] [INFO] --------------------------< io.jpress:parent >-------------------------- [INFO] Building parent 1.0 [1/21] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] -------------------------< io.jpress:codegen >-------------------------- [INFO] Building codegen 1.0 [2/21] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ codegen --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 9 resources [INFO] skip non existing resourceDirectory D:\Program Files\jpress\codegen\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ codegen --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 7 source files to D:\Program Files\jpress\codegen\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] parent 1.0 ......................................... SUCCESS [ 0.228 s] [INFO] codegen ............................................ FAILURE [ 4.318 s] [INFO] jpress-commons ..................................... SKIPPED [INFO] jpress-model ....................................... SKIPPED [INFO] jpress-service-api ................................. SKIPPED [INFO] jpress-core ........................................ SKIPPED [INFO] jpress-web ......................................... SKIPPED [INFO] jpress-service-provider ............................ SKIPPED [INFO] jpress-template .................................... SKIPPED [INFO] module-article ..................................... SKIPPED [INFO] module-article-model ............................... SKIPPED [INFO] module-article-service-api ......................... SKIPPED [INFO] module-article-service-provider .................... SKIPPED [INFO] module-article-web ................................. SKIPPED [INFO] module-page ........................................ SKIPPED [INFO] module-page-model .................................. SKIPPED [INFO] module-page-service-api ............................ SKIPPED [INFO] module-page-service-provider ....................... SKIPPED [INFO] module-page-web .................................... SKIPPED [INFO] starter ............................................ SKIPPED [INFO] starter-tomcat 1.0 ................................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.688 s [INFO] Finished at: 2018-10-27T17:50:59+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project codegen: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [ERROR] [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 :codegen mvn -version运行正常: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T02:33:14+08:00) Maven home: D:\Program Files\Apache\maven3.5.4\bin\.. Java version: 1.8.0_141, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jre1.8.0_141 Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" 阿里云镜像配置没问题: <mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>
pom文件标签问题求大神指点
pom.xml文件的filter标签值是src/main/filters/${env}.properties 但此pom.xml中有四个env标签,系统怎么知道用的是哪个env的值? ![图片说明](https://img-ask.csdn.net/upload/201804/18/1524056145_128301.png)
maven打包成jar包的时候,文件缺失
# 问题描述 最近在学习大数据,在运行第一个demo的时候出了问题 ## 项目结构: ![图片说明](https://img-ask.csdn.net/upload/201709/01/1504231732_118088.png) 用idea给maven项目打包的时候显示以下警告: ``` [WARNING] JAR will be empty - no content was marked for inclusion! ``` ## pom.xml配置 ```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>java</groupId> <artifactId>hadoop-demo</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-jobclient</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-hdfs</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-common</artifactId> <version>2.6.0</version> </dependency> </dependencies> </project> ``` ## 反编译Jar包 ![图片说明](https://img-ask.csdn.net/upload/201709/01/1504232328_147299.png) 少了src下的文件,而且好像依赖也没有,到底是什么情况...如何修改... 刚刚接触idea和maven不久,还不是很熟悉,百度的结果情况也都不太相同,第一次在csdn上提问,希望各位高手多多指点一下,谢谢!
Maven多渠道打包报错,求解!
## 这是异常: D:\makeApk\MavenBuild>D:\makeApk\MavenBuild\build.bat [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building mavenbuild-test 1.0.0 [INFO] ------------------------------------------------------------------------ Exception in thread "pool-1-thread-1" java.lang.NoClassDefFoundError: org/eclips e/aether/spi/connector/Transfer$State at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.r un(WagonRepositoryConnector.java:608) at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(Runn ableErrorForwarder.java:67) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:615) at java.lang.Thread.run(Thread.java:724) [INFO] ------------------------------------------------------------------------C aused by: java.lang.ClassNotFoundException: org.eclipse.aether.spi.connector.Tra nsfer$State at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass( SelfFirstStrategy.java:50)[INFO] BUILD FAILURE at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadCl ass(ClassRealm.java:271)[INFO] ------------------------------------------------- ----------------------- at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm .java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm .java:239) ... 5 more [INFO] Total time: 2.117 s [INFO] Finished at: 2015-07-23T11:06:57+08:00 [INFO] Final Memory: 14M/213M [INFO] ------------------------------------------------------------------------ --------------------------------------------------- constituent[0]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-api-1.0.2.v20150114. jar constituent[1]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-connector-basic-1.0. 2.v20150114.jar constituent[2]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-impl-1.0.2.v20150114 .jar constituent[3]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-spi-1.0.2.v20150114. jar constituent[4]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-transport-wagon-1.0. 2.v20150114.jar constituent[5]: file:/D:/Soft/apache-maven-3.3.3/lib/aether-util-1.0.2.v20150114 .jar constituent[6]: file:/D:/Soft/apache-maven-3.3.3/lib/aopalliance-1.0.jar constituent[7]: file:/D:/Soft/apache-maven-3.3.3/lib/cdi-api-1.0.jar constituent[8]: file:/D:/Soft/apache-maven-3.3.3/lib/commons-cli-1.2.jar constituent[9]: file:/D:/Soft/apache-maven-3.3.3/lib/commons-io-2.2.jar constituent[10]: file:/D:/Soft/apache-maven-3.3.3/lib/commons-lang-2.6.jar constituent[11]: file:/D:/Soft/apache-maven-3.3.3/lib/guava-18.0.jar constituent[12]: file:/D:/Soft/apache-maven-3.3.3/lib/javax.inject-1.jar constituent[13]: file:/D:/Soft/apache-maven-3.3.3/lib/jsoup-1.7.2.jar constituent[14]: file:/D:/Soft/apache-maven-3.3.3/lib/jsr250-api-1.0.jar constituent[15]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-aether-provider-3.3. 3.jar constituent[16]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-artifact-3.3.3.jar constituent[17]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-builder-support-3.3. 3.jar constituent[18]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-compat-3.3.3.jar constituent[19]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-core-3.3.3.jar constituent[20]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-embedder-3.3.3.jar constituent[21]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-model-3.3.3.jar constituent[22]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-model-builder-3.3.3. jar constituent[23]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-plugin-api-3.3.3.jar constituent[24]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-repository-metadata- 3.3.3.jar constituent[25]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-settings-3.3.3.jar constituent[26]: file:/D:/Soft/apache-maven-3.3.3/lib/maven-settings-builder-3.3 .3.jar constituent[27]: file:/D:/Soft/apache-maven-3.3.3/lib/org.eclipse.sisu.inject-0. 3.0.jar constituent[28]: file:/D:/Soft/apache-maven-3.3.3/lib/org.eclipse.sisu.plexus-0. 3.0.jar constituent[29]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-cipher-1.7.jar constituent[30]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-component-annotatio ns-1.5.5.jar constituent[31]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-interpolation-1.21. jar constituent[32]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-sec-dispatcher-1.3. jar constituent[33]: file:/D:/Soft/apache-maven-3.3.3/lib/plexus-utils-3.0.20.jar constituent[34]: file:/D:/Soft/apache-maven-3.3.3/lib/sisu-guice-3.2.5-no_aop.ja r constituent[35]: file:/D:/Soft/apache-maven-3.3.3/lib/slf4j-api-1.7.5.jar constituent[36]: file:/D:/Soft/apache-maven-3.3.3/lib/slf4j-simple-1.7.5.jar constituent[37]: file:/D:/Soft/apache-maven-3.3.3/lib/wagon-file-2.9.jar constituent[38]: file:/D:/Soft/apache-maven-3.3.3/lib/wagon-http-2.9-shaded.jar constituent[39]: file:/D:/Soft/apache-maven-3.3.3/lib/wagon-http-shared-2.9.jar constituent[40]: file:/D:/Soft/apache-maven-3.3.3/lib/wagon-provider-api-2.9.jar constituent[41]: file:/D:/Soft/apache-maven-3.3.3/conf/logging/ --------------------------------------------------- Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/aether/sp i/connector/Transfer$State at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.r un(WagonRepositoryConnector.java:608) at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(Runn ableErrorForwarder.java:67) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:615) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.ClassNotFoundException: org.eclipse.aether.spi.connector.Tr ansfer$State at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass( SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadCl ass(ClassRealm.java:271) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm .java:247) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm .java:239) ... 5 more 系统找不到指定的路径。 子目录或文件 assets 已经存在。 'assets/common.properties'... 正在添加: META-INF/MANIFEST.MF 正在添加: META-INF/DREAMZON.SF 正在添加: META-INF/DREAMZON.RSA 正在签名: assets/common.properties 子目录或文件 assets 已经存在。 'assets/common.properties'... 正在添加: META-INF/MANIFEST.MF 正在添加: META-INF/DREAMZON.SF 正在添加: META-INF/DREAMZON.RSA 正在签名: assets/common.properties 子目录或文件 assets 已经存在。 'assets/common.properties'... 正在添加: META-INF/MANIFEST.MF 正在添加: META-INF/DREAMZON.SF 正在添加: META-INF/DREAMZON.RSA 正在签名: assets/common.properties D:\makeApk> ## 这是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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example.mavenbuild</groupId> <artifactId>mavenbuild-test</artifactId> <version>1.0.0</version> <packaging>apk</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>com.google.android</groupId> <artifactId>android</artifactId> <version>4.1.1.4</version> <scope>provided</scope> </dependency> </dependencies> <build> <sourceDirectory>src</sourceDirectory> <finalName>${project.artifactId}</finalName> <pluginManagement> <plugins> <plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <version>3.8.2</version> <extensions>true</extensions> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <configuration> <sdk> <!-- platform as api level (api level 16 = platform 4.1)--> <platform>16</platform> </sdk> <sign> <debug>false</debug> </sign> </configuration> </plugin> </plugins> </build> </project>
Maven 项目UTF-8编码问题
我在我电脑上的G:\AdobeCQ路径下面有两个相同的项目: BMWPDF PDFGeneration ![图片说明](https://img-ask.csdn.net/upload/201511/19/1447909321_791529.png) 以前我在BMWPDF项目中的POM.xml文件里面加了以下的语句: ``` <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.compiler.encoding>UTF-8</maven.compiler.encoding> ``` 并且将这个项目Text file encoding 改为了UTF-8。做这个两个操作的目的是为了让这个项目能够支持在代码中写入中文字符。后来这样编译并没有什么问题,而且中文也能够顺利的输出到相对应的PDF中。 可是,昨天晚上大概11点半左右,我发现打开eclipse的时候出现了错误,提示“error shows in .metadata/.log”。项目打不开,我只好把.metadata文件删掉之后,重新打开eclipse,导入项目之后,用maven进行编译,出现以下的错误: [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr (generate-scr-descriptor) on project bmwpdf-bundle: Execution generate-scr-descriptor of goal org.apache.felix:maven-scr-plugin:1.7.4:scr failed: syntax error @[861,2] in file:/G:/AdobeCQ/bmwpdf/bundle/src/main/java/com/bmw/pdf/generator/GeneratorProcess.java -> [Help 1] 看了具体的错误信息,我有点懵了。因为提示的错误文件中根本没有861行,最多859行。后来具体的去看错误信息,知道是因为这个文件存在中文引起的,但是我又不能讲中文去掉。于是,我只能想着碰运气,重新创建了一个项目PDFGeneration,代码一样,POM文件也是一样的。但是并没有改动项目配置中的Text file encoding,默认是GBK,这个时候,中文乱码,于是,我直接拷贝这些含有中文的文件内容到对应的新项目中。保存,编译,没有错误。运行包之后,只要是在代码中出现的中文字符,全部乱码。于是,我将Text file encoding改为UTF-8。编译之后同原来的项目一样,出现以下错误: [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr (generate-scr-descriptor) on project bmwpdf-bundle: Execution generate-scr-descriptor of goal org.apache.felix:maven-scr-plugin:1.7.4:scr failed: syntax error @[861,2] in file:/G:/AdobeCQ/bmwpdf/bundle/src/main/java/com/bmw/pdf/generator/GeneratorProcess.java -> [Help 1] 于是我试着将POM文件中的以下内容去掉: ``` <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.compiler.encoding>UTF-8</maven.compiler.encoding> ``` 并将Text file encoding改为GBK。保存,编译,运行,中文正常出现。 以上总结一下就是项目编码的问题导致的,最后改为默认的编码解决了。具体问题是代码中出现了中文字符,如何让这些中文字符输出到PDF中不出现乱码,就出现了要将项目配置中的编译POM文件进行相应的编码改动措施,然并卵,后来又改回去了。只是奇怪的是第一个项目做了两个月左右,一直没出错,从昨天开始就奇怪的出现因为编码出现的问题。 说实话,这个项目的编码问题花了我不少的时间,但终究还是没有弄得太懂,有的时候只能是凭着感觉去具体的解决问题。哎,这种感觉真是不爽。花时间去弄懂这个问题吧,其他的事情又是一大堆;不花时间吧,以后可能又是同样的问题。这也许就是程序员的无奈。
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载 点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。 ...
字节跳动视频编解码面经
三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时想着能进去就不错了,管他哪个岗呢,就同意了面试...
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
Python 基础(一):入门必备知识
Python 入门必备知识,你都掌握了吗?
兼职程序员一般可以从什么平台接私活?
这个问题我进行了系统性的总结,以下将进行言简意赅的说明和渠道提供,希望对各位小猿/小媛们有帮助~ 根据我们的经验,程序员兼职主要分为三种:兼职职位众包、项目整包和自由职业者驻场。 所谓的兼职职位众包,指的是需求方这边有自有工程师配合,只需要某个职位的工程师开发某个模块的项目。比如开发一个 app,后端接口有人开发,但是缺少 iOS 前端开发工程师,那么他们就会发布一个职位招聘前端,来配合公司一...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
写了很久,这是一份最适合/贴切普通大众/科班/非科班的『学习路线』
说实话,对于学习路线这种文章我一般是不写的,大家看我的文章也知道,我是很少写建议别人怎么样怎么样的文章,更多的是,写自己的真实经历,然后供大家去参考,这样子,我内心也比较踏实,也不怕误导他人。 但是,最近好多人问我学习路线,而且很多大一大二的,说自己很迷茫,看到我那篇 普普通通,我的三年大学 之后很受激励,觉得自己也能行,(是的,别太浪,你一定能行)希望我能给他个学习路线,说...
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
碎片化的时代,如何学习
今天周末,和大家聊聊学习这件事情。 在如今这个社会,我们的时间被各类 APP 撕的粉碎。 刷知乎、刷微博、刷朋友圈; 看论坛、看博客、看公号; 等等形形色色的信息和知识获取方式一个都不错过。 貌似学了很多,但是却感觉没什么用。 要解决上面这些问题,首先要分清楚一点,什么是信息,什么是知识。 那什么是信息呢? 你一切听到的、看到的,都是信息,比如微博上的明星出轨、微信中的表情大战、抖音上的...
so easy! 10行代码写个"狗屁不通"文章生成器
前几天,GitHub 有个开源项目特别火,只要输入标题就可以生成一篇长长的文章。 背后实现代码一定很复杂吧,里面一定有很多高深莫测的机器学习等复杂算法 不过,当我看了源代码之后 这程序不到50行 尽管我有多年的Python经验,但我竟然一时也没有看懂 当然啦,原作者也说了,这个代码也是在无聊中诞生的,平时撸码是不写中文变量名的, 中文...
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的回答,对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalking,作者吴晟、刘浩杨 等等 仓库地址: apache/skywalking 更...
相关热词 c#处理浮点数 c# 生成字母数字随机数 c# 动态曲线 控件 c# oracle 开发 c#选择字体大小的控件 c# usb 批量传输 c#10进制转8进制 c#转base64 c# 科学计算 c#下拉列表获取串口
立即提问